Skip to content

Commit

Permalink
Merge pull request #482 from imtayyabhayat/main
Browse files Browse the repository at this point in the history
Analytics::performQuery() has been removed from v5
  • Loading branch information
timvandijck authored May 17, 2023
2 parents c95f646 + 8fcfa15 commit 4a4ee71
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,6 @@ $analyticsData = Analytics::fetchVisitorsAndPageViews(Period::days(7));

//retrieve visitors and page views since the 6 months ago
$analyticsData = Analytics::fetchVisitorsAndPageViews(Period::months(6));

//retrieve sessions and page views with yearMonth dimension since 1 year ago
$analyticsData = Analytics::performQuery(
Period::years(1),
'ga:sessions',
[
'metrics' => 'ga:sessions, ga:pageviews',
'dimensions' => 'ga:yearMonth'
]
);
```

`$analyticsData` is a `Collection` in which each item is an array that holds keys `date`, `visitors` and `pageViews`
Expand Down

0 comments on commit 4a4ee71

Please sign in to comment.