googleanalytics / google-analytics-super-proxy

Publicly share your Google Analytics reporting data.
Other
224 stars 99 forks source link

sP stripping out "+" from regex filter? #36

Open ddcgh opened 10 years ago

ddcgh commented 10 years ago

Hi, I am using this working regex filter in the Query Explorer:

ga:pagePath=~-AB(a|b|cd)?[0-9]+(-CD[0-9]+|.htm)

The copy & paste URL that QE creates looks like this:

https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3[[ID_HERE]] &metrics=ga%3Apageviews &filters=ga%3ApagePath%3D~-AB(a%7Cb%7Ccd)%3F%5B0-9%5D%2B(-CD%5B0-9%5D%2B%7C%5C.xyz) &start-date=2014-04-15 &end-date=2014-04-29

In the above URL it looks like the "+"s are still in there as "%2B"s

The superProxy response for the filter looks like this though; it's missing the "+"s (spaces are there instead):

{...u'filters': u'ga:pagePath=~-AB(a|b|cd)?[0-9](-CD[0-9] |.xyz)',...}

Whether this is the issue or not, sP is incorrectly returning 0 pageviews for this query

Is there something I need to do to the URL to make sure they don't get stripped?

Is this a bug?

Thanks :)