PHPackages                             wikichua/ga - 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. wikichua/ga

ActiveLibrary

wikichua/ga
===========

148PHP

Since Oct 29Pushed 11y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ga (Google Analytic) for Laravel 4
==================================

[](#ga-google-analytic-for-laravel-4)

Setup
-----

[](#setup)

1. Add `wikichua/ga` to `composer.json`.

```
# composer require google/apiclient 1.0.*@dev wikichua/ga dev-master

```

1. Add `'Wikichua\Ga\GaServiceProvider',` to `app/config/app.php` under providers array.
2. Add `'Ga'  =>  'Wikichua\Ga\Facades\Ga'` to `app/config/app.php` under aliases array.
3. Publish configuration.

```
# php artisan config:publish wikichua/ga

```

1. Create your CLIENT ID, EMAIL ADDRESS and download PUBLIC KEY FINGERPRINTS (P12 key) from [Google Developer Console](https://console.developers.google.com)
2. Fill up `app/config/wikichua/config/ga.php`

Usage
-----

[](#usage)

1. Retrieve rows data in array.

```
$Ga = Ga::make('74924308')
	->from('360daysAgo')
	->to('today')
	->metrics('sessions')
	->metrics('entrances')
	->dimensions('country')
	->dimensions('region')
	->filters('country==Malaysia')
	->filters('country==Canada')
	->get();
	echo '';
	print_r($Ga);
	echo '';

```

```
$Ga = Ga::make('74924308')
	->range('2014-01-01','yesterday')
	->metrics('sessions','entrances')
	->dimensions('country','region')
	->filters('country==Malaysia','country==Canada')
	->get();
	echo '';
	print_r($Ga);
	echo '';

```

1. Retrive all in Object

```
$Ga = Ga::make('74924308')
	->range('2014-01-01','yesterday')
	->metrics('sessions','entrances')
	->dimensions('country','region')
	->filters('country==Malaysia','country==Canada')
	->all();
	echo '';
	print_r($Ga);
	echo '';

```

Tips
----

[](#tips)

Explore this [Google Analytics Query Explorer 2](http://ga-dev-tools.appspot.com/explorer/)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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://www.gravatar.com/avatar/209854cbd063f50c1804d196f18787fb6ee5d9c2ca1410b36c6f52f8900be35d?d=identicon)[wikichua](/maintainers/wikichua)

---

Top Contributors

[![wikichua](https://avatars.githubusercontent.com/u/1870466?v=4)](https://github.com/wikichua "wikichua (4 commits)")

### Embed Badge

![Health badge](/badges/wikichua-ga/health.svg)

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

PHPackages © 2026

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