Skip to content

Commit

Permalink
Get referrer by sessionSource and defaultChannelGrouping (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa authored Sep 29, 2023
1 parent 3381dff commit 42a5104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Traits/Analytics/ResourceAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function getTopReferrers(Period $period, int $limit): array
$googleAnalytics = $this->googleAnalytics
->setDateRange($period)
->addMetrics('sessions')
->addDimensions('pageReferrer')
->addDimensions('sessionSource', 'sessionDefaultChannelGrouping')
->orderByMetric('sessions', Direction::DESC)
->limit($limit);

Expand All @@ -25,7 +25,7 @@ public function getTopReferrersByPageTitle(Period $period, int $limit): array
$googleAnalytics = $this->googleAnalytics
->setDateRange($period)
->addMetrics('sessions')
->addDimensions('pageReferrer', 'pageTitle')
->addDimensions('sessionSource', 'sessionDefaultChannelGrouping', 'pageTitle')
->orderByMetric('sessions', Direction::DESC)
->limit($limit);

Expand All @@ -38,7 +38,7 @@ public function getTopReferrersByPagePath(Period $period, int $limit): array
$googleAnalytics = $this->googleAnalytics
->setDateRange($period)
->addMetrics('sessions')
->addDimensions('pageReferrer', 'pagePath')
->addDimensions('sessionSource', 'sessionDefaultChannelGrouping', 'pagePath')
->orderByMetric('sessions', Direction::DESC)
->limit($limit);

Expand Down

0 comments on commit 42a5104

Please sign in to comment.