How to Fix the Dreaded Duplicate URL/Trailing Slash in Google Analytics

Trailing Slash: A trailing slash is a slash at the end of the URL i.e. trailing URL for abc.com/contacts is abc.com/contacts/, for us or browser both will take us to the same page, however for the Google Analytics both URLs are different.

The Google Analytics will show both the URL differently in the report.

trailing_slash_example

This issue can be fixed by a developer or you can fix it by applying a filter in a report view.

Steps:

  1. Create a custom filter
  2. Select advanced option
  3. Use below regex. Follow the steps from the screenshot.

^(/[a-z0–9/_\-]*[^/])$

trailing_slash

Save your filter once you completed the above setup. The trailing slash issue will get solved, however, we need to test it.

Steps to test:

Go to the Real-Time report.

1) Open one browser window, go to the one version of the URL e.g. abc.com/contacts
2) Open another browser window, go to another version of the URL e.g. abc.com/contacts/

view your top active pages in the real-time report and you should have 2 active pages for abc.com/contacts/

Why fix the trailing URL issue:

  • To make clean data
  • Save time of the Analysts

Good luck — and if you have any questions feel free to drop a comment below.

Please follow and like us:
569

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

www.000webhost.com