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

JS Tracker: Configtrackerpause should not be set to 0 if a callback is used. #10179

Closed
tsteur opened this issue May 23, 2016 · 0 comments · Fixed by #10379
Closed

JS Tracker: Configtrackerpause should not be set to 0 if a callback is used. #10179

tsteur opened this issue May 23, 2016 · 0 comments · Fixed by #10379
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented May 23, 2016

See #10172 (comment)

In https://github.com/piwik/piwik/blob/2.16.1/js/piwik.js#L4590 we should replace the 2nd parameter (callback ? 0 : configTrackerPause) with only configTrackerPause. Otherwise we might not wait for an outlink to be fully recorded when a user goes to another page.

This condition was added that time in case someone passes the following callback in which this behaviour (callback ? 0 : configTrackerPause) made sense in #5850:

_paq.push(['trackLink', url, type, {}, function() { window.location = url }]);

However, the callbacks may be used for other reasons than setting an url and in all other cases it is buggy to set configTrackerPause to 0. The correct way is to call tracker.setLinkTrackingTimer(0) in such a case where one uses the callbacks for this reason.

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels May 23, 2016
@tsteur tsteur added this to the 3.0.0-b1 milestone May 23, 2016
er314 added a commit to er314/piwik that referenced this issue May 24, 2016
@tsteur tsteur self-assigned this Aug 8, 2016
@tsteur tsteur closed this as completed Sep 13, 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. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant