PHPackages                             ivancevich/analytics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ivancevich/analytics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ivancevich/analytics
====================

Google Analytics for Laravel 4

21.9kPHP

Since May 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/ivancevich/analytics-l4)[ Packagist](https://packagist.org/packages/ivancevich/analytics)[ RSS](/packages/ivancevich-analytics/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Analytics
=========

[](#analytics)

Port of Laravel 3 bundle [lordcoste/analytics-s2s](https://github.com/lordcoste/analytics-s2s) for Laravel 4

Installation
------------

[](#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
-------------

[](#configuration)

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

Usage
-----

[](#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 A list of all Google Analytics metrics can be found here

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

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2357833?v=4)[JC Ivancevich](/maintainers/ivancevich)[@ivancevich](https://github.com/ivancevich)

---

Top Contributors

[![thujohn](https://avatars.githubusercontent.com/u/580699?v=4)](https://github.com/thujohn "thujohn (14 commits)")[![ivancevich](https://avatars.githubusercontent.com/u/2357833?v=4)](https://github.com/ivancevich "ivancevich (3 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (1 commits)")

### Embed Badge

![Health badge](/badges/ivancevich-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/ivancevich-analytics/health.svg)](https://phpackages.com/packages/ivancevich-analytics)
```

###  Alternatives

[rakutentech/laravel-request-docs

Automatically generate Laravel docs from request rules, controllers and routes

7861.2M2](/packages/rakutentech-laravel-request-docs)[datlechin/flarum-link-preview

Automatically display a rich preview of the link contents.

1715.9k](/packages/datlechin-flarum-link-preview)[schmeits/filament-pan-analytics-widget

A widget for pan (lightweight and privacy-focused PHP product analytics library)

221.9k](/packages/schmeits-filament-pan-analytics-widget)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
