views:

448

answers:

2

This query gives visits by traffic source;

https: //www.google.com/analytics/feeds/data?ids=ga%3A123456&dimensions=ga%3Asource%2Cga%3Amedium&metrics=ga%3Avisits&sort=-ga%3Avisits&start-date=2009-08-12&end-date=2009-08-26&max-results=50

But, when specifying a filter: ga:pagePath==/Default.aspx - I get zero results

https: //www.google.com/analytics/feeds/data?ids=ga%3A123456&dimensions=ga%3Asource%2Cga%3Amedium&metrics=ga%3Avisits&filters=ga%3ApagePath%3D%3D%2FDefault.aspx&sort=-ga%3Avisits&start-date=2009-08-12&end-date=2009-08-26&max-results=50

How can i filter on ga:pagePath?

A: 

Here's a very late theory to your question...

Your data query looks valid assuming you have content indexed as /Default.aspx. I've reproduced the query on my asp.net site and get back results. I can see two potential scenarios where your query may produce empty results.

The filter mechanism in Analytics is case sensitive so if by chance links come into the page as default.aspx your filter for 'Default.aspx' won't hit. I wouldn't have guessed it works this way but lately I've had to go back and fix some of our queries as they produced empty results when case mismatches occurred.

The second possible issue relates to the use of 'Default Documents'. If links are coming into your site without a file name ('/' or '/somepath/') and 'default.aspx' is setup as a 'Default Document' in IIS, then you really want the filter to be ga:pagePath==/.

John
A: 

Hi,

query1.Dimensions = "ga:date,ga:pagepath" query1.Metrics = "ga:pageviews" query1.Sort = "ga:date,ga:pagepath" query1.GAStartDate = "2010-09-01" query1.GAEndDate = "2010-09-10" query1.Filters = "ga:pagePath=~/abc*"

hope this works for you.

Gajapathy