spatie/laravel-analytics
A Laravel package to retrieve pageviews and other data from Google Analytics observed · 2026-08-28
Health v2 · maintenance only
84/100
- Activity 89
- Release rhythm 69
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 36.0
- age_days: 4192
- days_rel: 127
- days_push: 68
- n_releases_24m: 9
Adoption not part of the score
3239 stars · 472 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Laravel PHP package that provides a simple, fluent API for retrieving pageviews, visitors, top pages, browsers, and other data from Google Analytics (GA4). It wraps the verbose Google Analytics API responses into convenient Laravel Collections.
Use cases
- show pageviews and visitor stats in a Laravel admin dashboard
- fetch most visited pages for the last 7 days
- get top browsers of my site visitors
- display total visitors and page views for a period
- run custom Google Analytics GA4 queries from PHP
- embed site statistics into a Laravel app
When to choose
- you have a Laravel app and want Google Analytics data with minimal setup
- you want GA4 responses converted to clean PHP collections
- you need clear guidance for Google service account authentication
When to avoid
- your project is not Laravel/PHP
- you need real-time or server-side event tracking rather than reporting data
- you use a different analytics provider like Plausible or Matomo
Facets
library · maturity active
analytics api-framework http-client analytics web-development developer-tools php laravel-package google-analytics ga4 spatie pageviews laravel
3 sources
- readme: https://github.com/spatie/laravel-analytics · fetched 2026-08-28 · 83bd67912e47
- homepage: https://freek.dev/2477-laravel-analytics-v5-with-support-for-ga4-has-been-released · fetched 2026-08-29 · b8c7bf8404e5
- site_page: https://freek.dev/about · fetched 2026-08-29 · e0ef9dccbb05
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spatie/laravel-analytics | main | 84 |
For agents
markdown · JSON · MCP: product_card(name="spatie/laravel-analytics")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem