Google 分析 API 过滤器 Index/Homepage

Google Analytics API Filter for Index/Homepage

我正在尝试弄清楚如何使用 Google Analytics API 构建一个仅检索我主页的综合浏览量的过滤器。我可以获得其他页面的浏览量,例如:

ga:hostname==mydomain.com;ga:pagePath=~/my-page/$

但我只想要 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:pagePath==/

如果你想使用正则表达式,它看起来像这样:

ga:pagePath=~^/$

这是使用查询浏览器的 demo of this query