Registry / web-framework / spatie-laravel-analytics

spatie-laravel-analytics

JSON →
library5.7.1phppackagistunverified

A Laravel package to retrieve Google Analytics data.

composer require spatie/laravel-analytics
INSTALL
IMPORT
SIG · SPATIE-LARAVEL-ANA
S
spatie-laravel-analytics
web-frameworkphpv5.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Analytics
use Spatie\Analytics\Analytics;

Fetch visitors and page views for the last 7 days.

use Spatie\Analytics\Analytics; $analytics = app(Analytics::class); $visitors = $analytics->fetchVisitorsAndPageViews(7);
Debug
Known issues
gotchaRequires a Google Analytics service account and credentials file.
fix
Set up a service account and configure the package with the credentials path.
affects: >=5.0.0
Upgrade
Version history
5.7.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
spatie-laravel-analytics — pip install spatie-laravel-analytics · libregistry