carloscsrm / googleanalytics
Use google analytics in Laravel 4.
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2022-02-01 12:44:15 UTC
README
Plugin for Laravel 4 just to include Google Analytics script in your views
Installation
- Add
carloscsrm/googleanalytics
tocomposer.json
.
"carloscsrm/googleanalytics": "1.1.*"
-
Run composer update to pull down the latest version of Google Analytics package.
-
Now open up app/config/app.php and add the service provider to your providers array.
'providers' => array( 'Carloscsrm\Googleanalytics\GoogleanalyticsServiceProvider', ),
The Alias is automatically added by the system, you don't need add it manually. The alias is Googleanalytics
Configuration
Run php artisan config:publish carloscsrm/googleanalytics
and modify the config file with your own Analytics ID.
Usage
For using this package you can add this code in your templates
{{Googleanalytics::render()}}