New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ivancevich/analytics

Google Analytics for Laravel 4
1,864 2

Larablocks Analysis

ivancevich/analytics has no release yet to check Laravel compatibility against.

Recommendation checks

Use with care

Use with care: meets 0 of 3 checks.

  • No dated releases
  • 0 downloads a month (needs 10,000)
  • 2 GitHub stars (needs 100)

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require ivancevich/analytics:dev-master
PHP:>=5.3.0
License:MIT
Last Updated:May 23, 2014
Links: GitHub  ·  Packagist
Maintainer: ivancevich

Analytics

Port of Laravel 3 bundle lordcoste/analytics-s2s for Laravel 4

Installation

Add ivancevich/analytics to composer.json.

"ivancevich/analytics": "dev-master"

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

Now open up app/config/app.php and add the service provider to your providers array.

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

Now add the alias.

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

Configuration

Run php artisan config:publish ivancevich/analytics and modify the config file with your own informations.

Usage

Querying the API for visits and pageviews in the last week.

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

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

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

Related Packages

kudobuzz/google-analytics-php

Kudobuzz Google Analytics Is A PHP Library For Making Google Analytics And OAuth...

2,568 0
academe/googleapi

Package to access the API of a Google account authorised by a user, for Laravel...

55 1
andrewboy/google-analytics-statistics

Laravel package for google analytics panel.

15 0
cornford/googlitics

An easy way to integrate Google Analytics with Laravel.

10,234 32
michaelcrowcroft/google-search-console-laravel

A Laravel package for Google Search Console API integration

1,138 1