Skip to content

Latest commit

 

History

History
executable file
·
36 lines (22 loc) · 1.68 KB

README.md

File metadata and controls

executable file
·
36 lines (22 loc) · 1.68 KB

Google Analytics for Laravel 4

Plugin for Laravel 4 just to include Google Analytics script in your views

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

Installation

  1. Add carloscsrm/googleanalytics to composer.json.

"carloscsrm/googleanalytics": "1.1.*"

  1. Run composer update to pull down the latest version of Google Analytics package.

  2. 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()}}