Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Aug 2, 2023
1 parent 3377e10 commit ce15769
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Traits/Analytics/ViewsAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ trait ViewsAnalytics
* @throws \Google\ApiCore\ApiException
* @throws \Google\ApiCore\ValidationException
*/
public function totalViews(Period $period, string $path = null): int
public function totalViews(Period $period, string $path): int
{
$googleAnalytics = $this->googleAnalytics->setDateRange($period)
->addMetrics('screenPageViews');

if ($path) {
$googleAnalytics->addDimension('pagePath')
->addFilter('pagePath', 'EXACT', $path);

exit;
}

$result = $this->getReport($googleAnalytics)
Expand Down

0 comments on commit ce15769

Please sign in to comment.