syldman
syldman

Reputation: 755

Get number of unique pages visited each day

Is there any way to get a number of unique pages visited each day from Google Analytics (API)? I don't need the URLs themselves. Thanks!

Upvotes: 0

Views: 321

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32760

Not as as such, but you can query for ga:pagePath and ga:pageViews - since you need some metric for the request to work at all - and then just look at the count for the number of results (which is part of the API response). Since each visited page will be a distinct row in the response, the number of rows is the number of distinct urls.

One drawback is that there might be multiple rows per Url if they have parameters (e.g. /foo.html and /foo.htm?bar=1 will be two rows), unless you have removed parameters in your GA configuration or via filters. So you may have to process the results (loop over the url list, remove parameters from the urls, and do you own aggregation).

Upvotes: 1

Related Questions