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 is, 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.


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


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



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.
2) Open another browser window, go to another version of the URL e.g.

view your top active pages in the real-time report and you should have 2 active pages for

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.

You may also like...

Leave a Reply