Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlinks and downloads may not be tracked if users don't specify a leading slash in paths (eg. setDomains) #9872

Closed
mgonera opened this issue Mar 3, 2016 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mgonera
Copy link

mgonera commented Mar 3, 2016

As stated, outlink and download events are not tracked at all with IE 11. Same visit occurring in Chrome for example, generates proper actions and visitor log.

@mgonera mgonera changed the title Outlinks not tracked on IE11 Outlinks and downloads not tracked on IE11 Mar 3, 2016
@mgonera
Copy link
Author

mgonera commented Mar 3, 2016

Seems like mistake on user end.

@mgonera mgonera closed this as completed Mar 3, 2016
@mattab
Copy link
Member

mattab commented Mar 3, 2016

If it was confirmed, the way to prevent this would be to: run our automated piwik.js tests on more browsers than just webkit (modern IE, firefox, ...) #9874

@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Apr 1, 2016
@mgonera
Copy link
Author

mgonera commented May 5, 2016

@mattab

Issue is reproducible on http://m4g.gbros.pl/ec/site1a using IE 10.0.9200.17556 and 11.212.10586.0
screen shot 2016-05-05 at 21 41 16

@mgonera mgonera reopened this May 5, 2016
@wronan
Copy link
Contributor

wronan commented May 9, 2016

This problem occurs around here:
https://github.com/piwik/piwik/blob/master/js/piwik.js#L3115

For isSitePath(path, aliasPath) there is a situation when
path = '/site1/path/(...)'
and
aliasPath = 'site1/path/(...)'

There is a '/' missing. I hotfixed that on my test instance by something like that:
if (stringStartsWith(path, '/') && !stringStartsWith(aliasPath, '/')) { aliasPath = '/' + aliasPath; }
just before this https://github.com/piwik/piwik/blob/master/js/piwik.js#L3115 condition. Function stringStartsWith was of course introduced somewhere above.
I will create a PR for reviews tomorrow.

@mattab mattab removed the worksforme The issue cannot be reproduced and things work as intended. label Jul 14, 2016
@mattab mattab changed the title Outlinks and downloads not tracked on IE11 Outlinks and downloads may not be tracked if users don't specify a leading slash in paths (eg. setDomains) Jul 14, 2016
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Jul 14, 2016
@mattab mattab added this to the 2.16.2 milestone Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants