PHPackages                             thujohn/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. [API Development](/categories/api)
4. /
5. thujohn/analytics

ActiveLibrary[API Development](/categories/api)

thujohn/analytics
=================

Google Analytics for Laravel 4

1.0.23(11y ago)113108.7k31[9 issues](https://github.com/thujohn/analytics-l4/issues)[4 PRs](https://github.com/thujohn/analytics-l4/pulls)1MITPHPPHP &gt;=5.3.0

Since Jun 20Pushed 10y ago16 watchersCompare

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

READMEChangelogDependencies (2)Versions (23)Used By (1)

Analytics
=========

[](#analytics)

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

[![Build Status](https://camo.githubusercontent.com/b2056c9fd8e3904c4009fb86baaa4d153ace5f12c3791f23bd6a7c8f45c064ba/68747470733a2f2f7472617669732d63692e6f72672f7468756a6f686e2f616e616c79746963732d6c342e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/thujohn/analytics-l4)

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

[](#installation)

Add `thujohn/analytics` to `composer.json`.

```
"thujohn/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(
    'Thujohn\Analytics\AnalyticsServiceProvider',
)

```

Now add the alias.

```
'aliases' => array(
    'Analytics' => 'Thujohn\Analytics\AnalyticsFacade',
)

```

Configuration
-------------

[](#configuration)

Run `php artisan config:publish thujohn/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($site_id, '7daysAgo', 'yesterday', 'ga:visits,ga:pageviews');
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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.

###  Release Activity

Cadence

Every ~25 days

Recently: every ~16 days

Total

22

Last Release

4179d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07ffecefd3c4a8243b696afb7905cdefc5bcc41dde71fd4ca85f64b38b0dc6ee?d=identicon)[thujohn](/maintainers/thujohn)

---

Top Contributors

[![thujohn](https://avatars.githubusercontent.com/u/580699?v=4)](https://github.com/thujohn "thujohn (24 commits)")[![mjaschen](https://avatars.githubusercontent.com/u/328130?v=4)](https://github.com/mjaschen "mjaschen (2 commits)")[![BasMulders](https://avatars.githubusercontent.com/u/179246666?v=4)](https://github.com/BasMulders "BasMulders (1 commits)")[![bramdevries](https://avatars.githubusercontent.com/u/1002245?v=4)](https://github.com/bramdevries "bramdevries (1 commits)")[![morsdyce](https://avatars.githubusercontent.com/u/1665570?v=4)](https://github.com/morsdyce "morsdyce (1 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (1 commits)")

---

Tags

laravelgoogleanalyticslaravel4

### Embed Badge

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

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

###  Alternatives

[ozankurt/google-analytics

Laravel Google Analytics

7616.7k](/packages/ozankurt-google-analytics)[schulzefelix/laravel-search-console

A Laravel package to retrieve data from Google Search Console

5037.8k1](/packages/schulzefelix-laravel-search-console)[scottybo/laravel-google-my-business

A package for Laravel which implements the Google My Business API

3360.3k](/packages/scottybo-laravel-google-my-business)

PHPackages © 2026

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