Description
A Laravel package to retrieve pageviews and other data from Google Analytics
Using this package you can easily retrieve data from Google Analytics.
Here are a few examples of the provided methods:
use Spatie\Analytics\Facades\Analytics;use Spatie\Analytics\Period; //fetch the most visited pages for today and the past weekAnalytics::fetchMostVisitedPages(Period::days(7)); //fetch visitors and page views for the past weekAnalytics::fetchVisitorsAndPageViews(Period::days(7));
Most methods will return an \Illuminate\Support\Collection object containing the results.
Recent Courses on Laravel Daily
[NEW] Laravel Boost: Deeper Practical Dive
8 lessons
32 min
NativePHP Mobile v4 with SuperNative: Mini-Course
5 lessons
18 min
Roles and Permissions in Laravel 13
14 lessons
57 min