Pages appearing in doubles (Caps, Index, default, etc.)

Hi there,
We’re actually facing a specific issue with URL detection on two different levels.

In the Action / Pages section, we’re experiencing pages that appears in double.

Here’s an example :
First case : We have pages that appear as EN and others as en.

Second case: We actually happen to have nameOfTheSection//index and nameOfTheSection//defaults.aspx appearing seperatly for sections that simply end with nameOfTheSection/

So we actually managed to figured out a way to bypass this issue using the following code,
Adding the following lines of javascript into the (tracking tag)

var lowerHref = location.href.toLowerCase();
var defaultIndex = lowerHref.indexOf(“default.aspx”);
if (defaultIndex > -1) {
_paq.push([‘setCustomUrl’, lowerHref.substring(0, defaultIndex)]);
}
else {
_paq.push([‘setCustomUrl’, lowerHref]);
}

The code is to be inserted straight before the following line :
_paq.push([‘trackPageView’]);

Example :
Url Result
goodday.ca - This website is for sale! - dating single Resources and Information. goodday.ca - This website is for sale! - dating single Resources and Information.

Finally,we’re wondering if you have any feedbacks or a better way to fix this or even better if the next release of Piwik could support this bug.

Thanks :slight_smile:

Talk Soon,

Bassem

Hi there,

Please check this FAQ: On a Windows server using IIS, the pages "Default.aspx" and "default.aspx" are tracked as different pages, but they are the same. How do I force Piwik to record them as the same page? - Analytics Platform - Matomo