I've just started looking at spatie/laravel-analytics, a package for getting data out of Google Analytics API. I'm a bit lost right now though as documentation seems thin... either that or I'm not searching for the right things.
What I want to do feels like it should be quite simple, get page views for each day over a period for a specific URL.
My current code block looks like this:
$analyticsData = Analytics::performQuery(
Period::days(7),
'ga:pageviews',
[
'metrics' => 'ga:pageviews',
'dimensions' => 'ga:pagePath',
'filters' => 'ga:pagePath==/pasta-recipes/lasagne/'
]
);
var_dump($analyticsData);
As always, any help appreciated.
