开发者

google analytics API, how to extract pageviews for a specific page?

Google Analytics API: how to extract pageviews for a specific page?

I tried using something like

ga:pagePath=~page.php%3fid%3d44 (page.php?id=44)

but it doesn't seem to work... I ge开发者_Python百科t "no results found" where I have 20 pageviews for sure

UPDATE

I think I found the solution

ga:pagePath==/website/page.php?id=44

for some reason I had to include the complete path and ==


To use a partial path to match for a page in filters you should use

ga:pagePath=@page.php?id=44

=@ tells ga to match a substring.

What you were originally using was incorrect for this.


I think your problem is that you put the hex version of the ? and = characters into your query, which doesn't match how Analytics stores the page paths. If you change these to the normal characters it should work:

ga:pagePath=~page.php?id=44

Your other solution should work as well but is a bit more inflexible in case you wanted to tweak the query to return other pages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜