matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.71k stars 2.62k forks source link

In Tracking code, add an option to make page URL tracking case insensitive (useful for sites hosted on Windows) #10534

Open gaumondp opened 8 years ago

gaumondp commented 8 years ago

The tracking code produced by default doesn't include this line :

_paq.push(['setCustomUrl', location.href.toLowerCase()]);

I don't know why someone would want /mydirectory/ and /mYDirectorY/ be ever separate... I had to include Piwik on a Windows server for the first time and now we got to manually add statistics to get the real numbers.

Software should be be at "best default values"...by default. ;)

Is there a use case I can't see where URL case sensitive makes sense ?

mattab commented 8 years ago

Hello @gaumondp

Is there a use case I can't see where URL case sensitive makes sense ?

Yes, on a Unix/linux webserver

gaumondp commented 8 years ago

Am I wasting time if I ever propose a pull request with a checkbox "Make URL case incentive" and it add "_paq.push(['setCustomUrl', location.href.toLowerCase()]);" in module=CoreAdminHome&action=trackingCodeGenerator ?

mattab commented 8 years ago

@gaumondp this could work, could you show it when the Advanced button is clicked

gaumondp commented 8 years ago

@mattab I never, ever, saw that "Advanced" link ! And I've been using Piwik since 2013...

Makes sense to add the option there AND propose a more visible "Advance Settings". I'll create a new feature request.

siva538 commented 5 years ago

+1.

This actually makes sense to have tracking URLs as case insensitive.

While there is a workaround (https://matomo.org/faq/how-to/#faq_90) in place to make the urls as custom and call the lowercase portion on this, it should be part of the core product behavior with some setting/flag etc. to avoid case-sensitive comparison.

Also not all URL's would be custom except the SPA pages.

Regds, Sivakumar

siva538 commented 5 years ago

@tsteur , can you please help clarify the reason for marking this as closed? I see the referenced change or pull request was specific to "Download", but this issue #10534 is more generic for handling all the characters in the URL to be case-insensitive, so there is no differentiation in URL's like

http://test.domain.com/Core OR http://test.domain.com/core

Am I missing anything here?

tsteur commented 5 years ago

I think it was closed by @mattab since technically these 2 URLs are not the same and it is already possible to workaround by calling setCustomUrl on the tracker.

siva538 commented 5 years ago

Thanks @tsteur . However it didn't satisfy the initial requirement of making all the URL characters case-insensitive. Also as mentioned above the SetCustomUrl won't help in all cases but just the SPA based pages.

@mattab , can you please reconsider this defect?

tsteur commented 5 years ago

Also as mentioned above the SetCustomUrl won't help in all cases but just the SPA based pages.

It should help in all cases. Works also for non-SPA pages.