2017 © Pedro Peláez
 

library analytics

Google Analytics for Laravel 4

image

ivancevich/analytics

Google Analytics for Laravel 4

  • Friday, May 23, 2014
  • by ivancevich
  • Repository
  • 1 Watchers
  • 1 Stars
  • 876 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 37 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Analytics

Port of Laravel 3 bundle lordcoste/analytics-s2s for Laravel 4, (*1)

Installation

Add ivancevich/analytics to composer.json., (*2)

"ivancevich/analytics": "dev-master"

Run composer update to pull down the latest version of Analytics., (*3)

Now open up app/config/app.php and add the service provider to your providers array., (*4)

'providers' => array(
    'Ivancevich\Analytics\AnalyticsServiceProvider',
)

Now add the alias., (*5)

'aliases' => array(
    'Analytics' => 'Ivancevich\Analytics\AnalyticsFacade',
)

Configuration

Run php artisan config:publish ivancevich/analytics and modify the config file with your own informations., (*6)

Usage

Querying the API for visits and pageviews in the last week., (*7)

More information about this calling the Google Analytics API can be found here https://developers.google.com/apis-explorer/#s/analytics/v3/analytics.data.ga.get A list of all Google Analytics metrics can be found here https://developers.google.com/analytics/devguides/reporting/core/dimsmets, (*8)

$site_id = Analytics::getSiteIdByUrl('http://github.com/'); // return something like 'ga:11111111'

$stats = Analytics::query($siteID, '7daysAgo', 'yesterday', 'ga:visits,ga:pageviews');

The Versions

23/05 2014

dev-master

9999999-dev

Google Analytics for Laravel 4

  Sources   Download

MIT

The Requires

 

by JC Ivancevich

laravel analytics google laravel4