PHPackages                             cldt/laravel-google-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. cldt/laravel-google-analytics

ActiveLibrary

cldt/laravel-google-analytics
=============================

A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

v1.9.0(1y ago)01.1k↓35%MITPHPPHP ^8.0

Since Mar 25Pushed 1y agoCompare

[ Source](https://github.com/c-delouvencourt/laravel-google-analytics)[ Packagist](https://packagist.org/packages/cldt/laravel-google-analytics)[ Docs](https://github.com/akki-io/laravel-google-analytics)[ RSS](/packages/cldt-laravel-google-analytics/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

 [![Hero](https://raw.githubusercontent.com/akki-io/laravel-google-analytics/master/images/hero.png)](https://raw.githubusercontent.com/akki-io/laravel-google-analytics/master/images/hero.png)

Laravel Google Analytics
========================

[](#laravel-google-analytics)

[![Latest Version](https://camo.githubusercontent.com/d19f54d2d2333f04319519940db68a11f9c86a230a6aea50f9adcb91b13bae2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616b6b692d696f2f6c61726176656c2d676f6f676c652d616e616c79746963732e7376673f7374796c653d666c61742d737175617265)](https://github.com/akki-io/laravel-google-analytics/releases)[![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/2bc65299dc67b4cd52271e5c5461b8c821a616a04ab6925e6b3a91ebd1ad6158/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d676f6f676c652d616e616c79746963732f746573742e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/2bc65299dc67b4cd52271e5c5461b8c821a616a04ab6925e6b3a91ebd1ad6158/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6b692d696f2f6c61726176656c2d676f6f676c652d616e616c79746963732f746573742e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)[![StyleCI](https://camo.githubusercontent.com/deb89f3497b47ab48b863c6fd6d24abd31bd6ed0c255c24c24ac57e865c2f4f0/68747470733a2f2f7374796c6563692e696f2f7265706f732f3434313733353134322f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/441735142)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/5eb9965d32f0bf067327c905cf3a59c58672f93ae9d95dd5abce66d459284760/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616b6b692d696f2f6c61726176656c2d676f6f676c652d616e616c79746963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akki-io/laravel-google-analytics)

A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

TL;DR
-----

[](#tldr)

Using this package you can easily retrieve data from Google Analytics 4.

Below are some examples.

```
use AkkiIo\LaravelGoogleAnalytics\Facades\LaravelGoogleAnalytics;
use AkkiIo\LaravelGoogleAnalytics\Period;
use Google\Analytics\Data\V1beta\Filter\StringFilter\MatchType;
use Google\Analytics\Data\V1beta\MetricAggregation;
use Google\Analytics\Data\V1beta\Filter\NumericFilter\Operation;

// get the top 20 most viewed pages for last 30 days
LaravelGoogleAnalytics::getMostViewsByPage(Period::days(30), $count = 20);

// get the top 20 dates with most users for last 12 months
LaravelGoogleAnalytics::getMostUsersByDate(Period::months(12), $count = 20);

// build a query using the `get()` method
LaravelGoogleAnalytics::dateRanges(Period::days(30), Period::days(60))
    ->metrics('active1DayUsers', 'active7DayUsers')
    ->dimensions('browser', 'language')
    ->metricAggregations(MetricAggregation::TOTAL, MetricAggregation::MINIMUM)
    ->whereDimension('browser', MatchType::CONTAINS, 'firefox')
    ->whereMetric('active7DayUsers', Operation::GREATER_THAN, 50)
    ->orderByDimensionDesc('language')
    ->get();
```

Please refer to the [wiki](https://github.com/akki-io/laravel-google-analytics/wiki) for more details.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Akki Khare](https://github.com/akki-io)
- [All Contributors](../../contributors)
- [spatie/laravel-analytics](https://github.com/spatie/laravel-analytics)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance46

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9f297bd2d9cafd14dc7b7f55220bb058c82eaee69181facc3df0e0fc5b32cc3?d=identicon)[cldt](/maintainers/cldt)

---

Top Contributors

[![akki-io](https://avatars.githubusercontent.com/u/34255218?v=4)](https://github.com/akki-io "akki-io (48 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (6 commits)")[![MaxGiting](https://avatars.githubusercontent.com/u/9828591?v=4)](https://github.com/MaxGiting "MaxGiting (2 commits)")[![nsinisterra](https://avatars.githubusercontent.com/u/17008744?v=4)](https://github.com/nsinisterra "nsinisterra (2 commits)")[![JayBizzle](https://avatars.githubusercontent.com/u/340752?v=4)](https://github.com/JayBizzle "JayBizzle (2 commits)")[![cldt-fr](https://avatars.githubusercontent.com/u/26087186?v=4)](https://github.com/cldt-fr "cldt-fr (1 commits)")[![marispro](https://avatars.githubusercontent.com/u/5610414?v=4)](https://github.com/marispro "marispro (1 commits)")[![GeorgeFourkas](https://avatars.githubusercontent.com/u/66795055?v=4)](https://github.com/GeorgeFourkas "GeorgeFourkas (1 commits)")[![GC-Mark](https://avatars.githubusercontent.com/u/1477806?v=4)](https://github.com/GC-Mark "GC-Mark (1 commits)")

---

Tags

laravel google analyticsakki-io

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cldt-laravel-google-analytics/health.svg)

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

###  Alternatives

[irazasyed/laravel-gamp

Send analytics data to Google Analytics from Laravel. A package for GA Measurement Protocol API

3361.6M1](/packages/irazasyed-laravel-gamp)[akki-io/laravel-google-analytics

A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

49120.6k](/packages/akki-io-laravel-google-analytics)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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