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

Fix referrer attribution cookie not set if no tracking request is sent, resulting in wrong attribution #18809

Closed
tsteur opened this issue Feb 17, 2022 · 3 comments · Fixed by #19200
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Privacy For issues that impact or improve the privacy.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Feb 17, 2022

I just noticed an issue where a referrer attribution cookie is not set when no tracking request is sent at all while viewing a page.

This is a bug because the original referrer will go lost. If the next page does track data, then the previous page will become the referrer (where no data was tracked) instead of the original referrer.

I assume it's rarely the case that no data is tracked on a landing page so might not be a big issue.

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Feb 17, 2022
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Feb 17, 2022
@peterbo
Copy link
Contributor

peterbo commented Feb 18, 2022

This could be an issue especially with implemented consent managers. Mostly, consent managers are implemented poorly (not using the out-of-the-box consent methods) given consent is not triggering tracking on the same page, but on the second one after giving consent). So this could fix quite some "lost" referrers that are being reported as "direct".

@tsteur
Copy link
Member Author

tsteur commented Feb 20, 2022

👍 good one. In that case we could likely fix this similar to https://github.com/matomo-org/matomo/pull/18135/files by setting the referrer cookie when leaving the page assuming cookies are enabled.

@peterbo if consent hasn't been given yet, then the cookie might not be set either so it wouldn't help. But I think what you're saying might be that consent managers are not correctly implemented as in they might enable cookies, but not send a tracking request on the page eg because they do a reload once consent given and then measure the page?

@peterbo
Copy link
Contributor

peterbo commented Feb 21, 2022

they might enable cookies, but not send a tracking request on the page eg because they do a reload once consent given and then measure the page

Hey @tsteur - exactly! You definitely phrased it better than I did. ;)

@tsteur tsteur added the c: Privacy For issues that impact or improve the privacy. label Feb 21, 2022
@justinvelluppillai justinvelluppillai modified the milestones: 4.9.0, 4.10.0 Apr 12, 2022
@sgiehl sgiehl modified the milestones: 4.10.0, 4.11.0 May 5, 2022
@sgiehl sgiehl self-assigned this May 9, 2022
@justinvelluppillai justinvelluppillai changed the title Referrer attribution cookie not set if no tracking request is sent, resulting in wrong attribution Fix referrer attribution cookie not set if no tracking request is sent, resulting in wrong attribution Jul 8, 2022
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: Privacy For issues that impact or improve the privacy.
Projects
None yet
4 participants