How to filter out query strings in Google Analytics to make RPM by Page more accurate

Readers come to your site from lots of different locations and links, and sometimes this can result in URL variations in Google Analytics. Specifically, a URL may have a “query string” that comes after the expected domain info of

What is a query string?

Query strings start with a question mark added to the end of a standard URL, followed by more characters that give information about where the link originated. For example, a question mark followed by “fbclid” indicates traffic that came via Facebook.

  • Base URL:
  • Base URL + query string example 1:
  • Base URL + query string example 2:

You’ll see all sorts of URL + query string variations recorded as pageviews in Google Analytics.

Filtering out query strings makes RPM by Page more accurate

Our RPM by Page report pulls in data on your top 1000 pages from Google Analytics, where these URL variations are treated as separate pages. If you have a large number of pages on your site, you likely have URL variations whose traffic is not being included in RPM by Page.

To fix this, you can roll all of the URL variations with query strings in with the standard version of each page’s URL, so that all traffic can be considered when generating RPM by Page.

Luckily, you can do this pretty easily by setting up a view in Google Analytics that strips these query parameters, thereby combining all traffic to each page.

You can make this change to your main Google Analytics view or, if you rely on those query strings for information about your traffic, you can create a new view for us to use in your AdThrive dashboard.

How to filter out query strings in Google Analytics

Head to Google Analytics, navigate to your Admin > View column, and choose the view you want to update from the drop-down menu (create a new view first, if you’d like). Then, click on Filters.


Click the Add Filter button, give the filter a name, and select “Custom” for the Filter Type.

Select the radio button next to Search and Replace, and in the Filter Field drop-down menu, select Request URl.

In the Search String field, enter \?.*


At the bottom of the page, you’ll see the option to verify your filter, which will show you a preview of how the data for the URLs with query parameters are being rolled up and counted with the standard URL.

Click Save, and you’re all set! If you created a new view with this filter, we’ll need the View ID to be able to use it in your dashboard. Click on View Settings for the new view, and you’ll see the View ID. Send that our way, and we’ll get you set up!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Want to join AdThrive? Apply here!