Maximum Filters Allowed

1,404 views
Skip to first unread message

Bill Edwards

unread,
Mar 12, 2011, 6:51:49 AM3/12/11
to google-analytics-api - GA Data Export API
Hi,

I would like to query the data export api for the total pageviews
going to a long list of pages. I am currently simply creating a query
with a long list of filters (i.e. ga:pagePath==/page1,ga:pagePath==/
page2,ga:pagePath==/page3.) However, my list will eventually become
really long. Is there a maximum number of filters allowed, and does
the number of filters affect query time?

So far, in the data explorer, there doesn't seem to be a maximum, but
I want to be sure before implementing this in production.

Thanks.

chris@shufflepoint

unread,
Mar 12, 2011, 9:26:04 PM3/12/11
to google-analytics...@googlegroups.com
See if you can correctly express your filter using a "contains" or regular expression - or a set of those.

Bill Edwards

unread,
Mar 12, 2011, 11:23:13 PM3/12/11
to google-analytics-api - GA Data Export API
Hi Chris,

Unfortunately, that wont' be a possibility. The page url's are all
unique, and the combinations are unpredictable. Do you by any chance
know if there is a maximum number of filters allowed?

Thanks.

chris@shufflepoint

unread,
Mar 13, 2011, 10:44:27 PM3/13/11
to google-analytics...@googlegroups.com
I don't see any documented limit in the GA API docs. So perhaps the limit will be the maximum URL length.

Nick

unread,
Mar 14, 2011, 1:12:28 AM3/14/11
to google-analytics...@googlegroups.com
There is currently no limit...but each request to google can't exceed 2048 characters.

You might check out the Data over time demo, where we used a bucket packing algorithm to stuff as many filters into an API query as possible: http://code.google.com/p/ga-api-java-samples/source/browse/trunk/src/#src%2Fv2%2FDataOverTime

-Nick
Reply all
Reply to author
Forward
0 new messages