Created
January 26, 2017 12:24
-
-
Save jleonardolemos/6b981a31b877964b7cc42ba6aba5b1f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getAdvertiserVehiclesViews($time = 30) | |
{ | |
return collect(LaravelAnalytics::performQuery( | |
Carbon::now()->subDays($time) | |
, Carbon::now() | |
, 'ga:totalEvents,ga:uniqueEvents' | |
, [ | |
'sort' => '-ga:totalEvents', | |
'dimensions' => 'ga:pagePath', | |
'filters' => 'ga:eventLabel==' . auth()->user()->advertiser_id | |
] | |
)->rows); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment