carloscsrm/googleanalytics

This package is abandoned and no longer maintained. No replacement package was suggested.

Use google analytics in Laravel 4.

v2.0.0 2015-05-22 19:06 UTC

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

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