Data api ga, how to get data for multiple pages?

妖精的绣舞 提交于 2019-12-08 02:04:28

问题


I'm using Data api of google to get data in my filters, I'm getting data for page path for single page and I'm stuck at multiple pages. I followed document and passed following query to filters,

$filter = 'ga:pagePath=~/about_us.htm,ga:pagePath=~/index.htm';

Is there anything wrong in it? Can someone please help in it.


回答1:


You need to add $dimensions='ga:pagePath' to individually query the two pages.




回答2:


I don't see anything wrong with it but it's always good to run your data api calls through the Data Feed Query Explorer. It will show you if it is getting results and show you the proper url-encoded query.

I ran a query using the Data Feed Query Explorer on my site that was similar to yours and had no problems.



来源:https://stackoverflow.com/questions/7525216/data-api-ga-how-to-get-data-for-multiple-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!