A
A
Andrew2020-01-28 15:16:26
Google Analytics
Andrew, 2020-01-28 15:16:26

Question about Google analytics API?

Good afternoon, I describe the situation:
I moved the site to wordpress, the task is to return the views on the articles.
Implemented through the Google analytics API
Now the question is to implement popular articles for a week, a month, and 3 months.
Based on these data, but in the end, in Google analytics, there are only one values ​​(More views)
And on the site, the views do not match, mostly downwards.
I used this structure.

return $analytics->data_ga->get(
       'ga:' . $profileId,
       '7daysAgo',
       'today',
       'ga:pageviews',
   array (
        'dimensions' => 'ga:pageTitle,ga:pagePath,ga:date',
        'metrics' => 'ga:pageviews,ga:uniquePageviews',
        'sort' => '-ga:pageviews',
  'max-results' => 9

Why might the data not match?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question