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:
我正在尝试弄清楚如何使用Google AnalyticsAPI构建一个只会检索我主页的综合浏览量的过滤器。我可以获得其他页面的综合浏览量,例如:
ga:hostname==mydomain.com;ga:pagePath=~/my-page/$
GA:主机名== mydomain.com; GA:PAGEPATH =〜/我的页/ $
But I want pageviews of just mydomain.com/
. I've tried the following and they don't work:
但我想要只是mydomain.com/的综合浏览量。我尝试过以下内容但它们不起作用:
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}/$
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.
有任何想法吗?谢谢。
1 个解决方案
#1
1
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:
以下是使用Query Explorer的此查询的演示:
#1
1
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:
以下是使用Query Explorer的此查询的演示: