Double listing Google Analytics with and without a slash

We get double lists at most of our URLs in Google Analytics, for example:

/Home/Specials

/Home/Specials/

The website is based on MS MVC3. The first usually shows a short loading period with an almost zero exit speed. Most real user data is on the second (those that have a slash suffix).

What is the resolution to hide the first?

+4
source share
2 answers

The problem is caused by duplicate tracking performed by Analytics itself and the jQuery script address (the latter adds a trailing slash). JQuery code adds tracking to AJAX posts, so it’s useful for pages like search results.

To fix the problem, we simply removed the following line from the kernel script provided by Google Analytics:

 _gaq.push(['_trackPageview']); 
+5
source

It is also possible to add a regular expression filter in GA itself that will add slashes inside, effectively fixing the problem.


From https://www.getelevar.com/how-to/fix-duplicate-url-google-analytics/

How to fix duplicate URLs in reports

Step 1: create a new GA view so you can check and verify if this hotfix works before applying it to your daily view.

Step 2. Create a new advanced filter with this regular expression (screenshot below) that performs this manipulation of your data:

If the URL has no request parameters at the end of the URL and is a standalone URL And does not have a trailing slash at the end of the URL, then add a trailing slash at the end of the URL

The following is a regular expression for an extended rule:

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

Once this is done, save your filter.

Step 3: Verify that the new filter is working as expected.

To check and verify if this works, follow these steps: you can use the real-time report in Google Analytics to:

In one browser tab, navigate to the version of your site that you would like to test (for example, yourdomain.com/new-in) In a second additional browser tab, navigate to the version of the same URL with a trailing slash (for example, yourdomain.com/ new-in /) Go to Google Analytics> Real-time Report> Top Active Pages, and you should have 2 active pages from the previous steps!

0
source

All Articles