I'm using https://github.com/google/google-api-php-client to get pageviews from google analytics. I'm following this guide: https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-php. my custom code:
function getResults(&$analytics, $profileId) {
return $analytics->data_ga->get(
'ga:' . $profileId,
'7daysAgo',
'today',
'ga:visits',
array(
'filters' => 'ga:pagePath==/project_z2o/',
'dimensions' => 'ga:pagePath',
'metrics' => 'ga:pageviews',
'sort' => '-ga:pageviews',
'max-results' => '25'
));
}
Is it possible if I want to get the pageviews every hour. If Yes, What query is it? If No, Is there any another ways that I can get it. Thanks.