问题
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