How to exclude URL parameters from your Page reports

  • How to exclude landing page URL parameters

    17 Mar 2021
    Query parameters in URLs can include useful information we can use to analyse your marketing campaigns, but they can cause difficulties in reporting and analysing our Behaviour / Page reports in Google Analytics.

    When you run Google Ads, Microsoft Ads, social media, email campaigns you will find Query Parameters have been added to your landing page URLs. 

    You will also find URL parameters if you use a CRM system, such as Hubspot, to monitor campaigns.

    Whilst this can be useful, it does mean that one landing page will be split into several pages in your Landing Page report. 

    This makes it hard to evaluate how successful a landing page is and may spoil any funnels you have set up.

    For example, in our Landing page report, our Leadership & Management course page is reported several times - but they are all the same page.

    The 2nd and 3rd one listed below have parameters added to the URL by Hubspot, the 4th one has parameters added to the URL string by Microsoft Ads.


    To measure the performance of this page we would have to add up and work out the percentages etc across all the variations of the same page.

    If we simply wanted to report that showed our most popular landing pages, or we wanted to create a 'Most popular pages' report, this would be a big headache, and what should be an easy job would become pretty difficult. 

    But there is a quick solution :-) 

    One way to remove query parameters from pages is through the View Settings. Under Admin > View Settings > Exclude Query Parameters.

    Here you can list the query parameters that you want to exclude from your page paths. 

    Firstly, look for the bit of text/numerals between the ? and the = within the URLs 

    Most commonly these are

    Google Ads - gclid 

    Microsoft Ads - msclkid

    Facebook - fbclid

    Hubspot - hsa_acc, hsa_cam

     Then put these into the Exclude Query Parameter box in View Settings (comma separated) - see below:



    The text box is limited to 256 characters, so if you have a long list of query parameters to exclude, you may have to use 'Search & Replace' filters or Google Tag Manager.

    Because URL parameters can provide useful information, we normally recommend that removing URL parameters in Google Analytics is done at the View level.  This means you can keep one or more Views with the URL parameters intact, so you can see what happens to users who come in on those specific URLs.

    However, because you are making this change at the View level, you will need to copy this for all views where you want to exclude query parameters.

    TIP: If you are not confident about excluding Search Parameters, make sure you do this on a Test View before applying this to your main reporting View.


    Option 2: Using Search & Replace Filters

    You can also use the Search and Replace filter to remove query parameters from your Pages reports.

    The Search & Replace filters can be configured at the Account level and therefore can be applied to multiple Views at once.

    If you don't think you will ever want to analyse your landing pages in that much detail, this is a better option for you. 

    To remove query parameters using the Search and Replace filter you will need to go to Admin and find "All Filters" under your account.

    Select 'Custom' and 'Search and Replace'; then choose Request URI from the drop-down menu.

    You can remove all query parameters with one filter.

    In your Search and Replace filter, add the following in the Search String field: 


    This will remove the first "?" in the URL string and everything after it.


    However, I would caution against this approach as it may also remove URL parameters that you do want.

    Definitely test this first by adding the Filter on your Test View before applying it to your main reporting Views.

    Wait a week or so to see what happens and if you are happy with the results on your Test View you can apply this to your other Views.


    Note: When you create this filter you can verify it to show you the pages this would affect. 



    If reading this makes your head spin :-) - Come along to our Google Analytics Training



You may also be interested in:

  • Guide: Filter Internal Traffic in GA4

    01 Mar 2024

    Working From Home? Keep your Analytics data accurate. Make sure you filter yourselves out of your Google Analytics reports - so you are only looking at real customers.

    Read More
  • Conversion Rate or User Conversion Rate? Which is the best metric?

    09 Aug 2019

    Not many people really understand conversion rates when looking at their Analytics Reports - so what do they actually measure?

    Read More


  • AZ 2.png
  • Amazon
  • barclays-course.png
  • BC 2.png
  • Bt
  • Bupa
  • chanel 2.png
  • Jd Sports
  • Jet2com
  • Manchester client logo 8.png
  • Manchester City training 2.png
  • nestle training 2.png
  • Next
  • nhs-logo.png (1)
  • M Training Clients 10.png (1)
  • PTL-Manchester-training-client-logo-200.png
  • skym-courses.png (1)
  • client logo leeds.jpg
  • coop manchester 2.png
  • Tui
  • liverpool training 2.png
  • Siemens
  • Kraftheinz
  • HM Government
Click here to sign up for offers, advice and industry news Subscribe