Reputation: 333
I'm trying to figure out how to construct a filter that will retrieve just the pageviews of my homepage using the Google Analytics API. I can get pageviews of other pages, for instance:
ga:hostname==mydomain.com;ga:pagePath=~/my-page/$
But I want pageviews of just mydomain.com/
. I've tried the following and they don't work:
ga:hostname==mydomain.com;ga:pagePath=~//$
ga:hostname==mydomain.com;ga:pagePath=~///$
ga:hostname==mydomain.com;ga:pagePath=~/\//$
ga:hostname==mydomain.com;ga:pagePath=~/[\S]{1}/$
Any ideas? Thanks.
Upvotes: 3
Views: 377
Reputation: 30431
Try this:
ga:pagePath==/
If you want to use a regular expression, it would look like this:
ga:pagePath=~^/$
Here's a demo of this query using the Query Explorer:
Upvotes: 2