Query parameter for inline report filters

By /

July 23, 2009

The filter at the bottom of reports can be quite handy. But you may have noticed that (like lots of AJAX-y things on the web these days) the URL doesn’t change when you apply this filter.


This can be a pain when you want to bookmark it or share the filtered report with someone else. (Sure, you can email them the report, but the static output isn’t the same as letting them play with it live.)

So you may be interested to know that you can actually apply the filter with a query parameter in the URL. (This may be of interest to anyone who’s writing Greasemonkey scripts or something like that, as well.)

The query parameter is q and you can use whatever expression you would use in the regular filter box. (Just make sure you URL-escape any characters that aren’t safe in URLs.) There’s also a query parameter qtype that specifies the value of the “containing” or “excluding” dropdown. Set qtype=0 for a “containing” filter and qtype=1 for an “excluding” filter. Just add these parameters to the URL for the report that you already have, and voila! you have a filtered report.

Jonathan Weber is our Data Evangelist, focusing on bringing the strategic value of data analysis to our customers. He spreads the principles of analytics through our training seminars and is currently writing a book on Google Analytics & Tag Manager. Before he caught the analytics bug, he worked in information architecture. Away from the computer you can find him as a flower farmer and plant geek.

  • John

    If you’re lazy like me, you can let GA do the work of generating the URL for you.

    Just set up the report the way you want it to look, with the filter applied, etc, and click the “Add to Dashboard” button at the top.

    Now, go to the Dashboard, find the box for the report you just added.

    The “View Report” link at the bottom of that box is the URL you want.

  • http://e-games.com Free games

    I think it should be helpful for the report. The inquiry parameter is q and it will assist to use anything look we would use in the regular filter box.

  • http://mikeplummer.com Mike Plummer

    If you’re even lazier, you can click the “email report” button, then click the “back to report” link to put all of the updates you’ve made to the report in your browser’s address bar. Same amount of clicks, but eliminates the having to look for your report on the dashboard step.

  • http://www.lunametrics.com Robbin

    Mike, since when are you lazy? Robbin

Contact Us.


24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us




We'll get back to you
in ONE business day.