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

Cookie consent segmentation doesn't update if a user changes consent #20428

Open
MaticSulc opened this issue Mar 7, 2023 · 4 comments
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@MaticSulc
Copy link

I have followed this guide, it works as expected on frontend. My consent handler calls _paq.push(["forgetCookieConsentGiven"]);, cookies get removed and don't reapply on load.

If I look in the matomo dashboard, I have created segments based on Profilable fields.

Example:
User comes on the website for the first time. Until they accept the consent, they are profiled in the "no cookie consent given" segment. When they do, it gets moved to the "consent given" segment. If they never accept it, they are not moved and stay there - as expected,

Now if a user changes their cookie consent and decides to block ads, my matomo dashboard keeps showing them in the "cookie consent given" segment. I don't think this is expected behaviour. I would expect that they start to get tracked in the "no cookie consent" segment, but everything they consented to is kept in the other one.

Looking forward to any opinions :)

Environment

  • Matomo Version: 4.13.3
  • PHP Version: 8.1.16
  • Server Operating System: Linux
@MaticSulc MaticSulc added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Mar 7, 2023
@bx80
Copy link
Contributor

bx80 commented Mar 8, 2023

Thanks for reporting this @MaticSulc, that doesn't sound like correct behavior.

Could you share the details of the "no cookie consent " and "consent given" segments you are using? This will help us recreate the problem.

@bx80 bx80 added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Mar 8, 2023
@MaticSulc
Copy link
Author

MaticSulc commented Mar 8, 2023

I am using the "Profilable" field, as stated in the tutorial. :)

For cookie consent given, the field is supposed to be 1. And vice versa, 0 for o consent.

@bx80
Copy link
Contributor

bx80 commented Mar 12, 2023

Thanks @MaticSulc, I missed that you were using the Profilable field 👍

From looking at the profilable field code it seems that not updating this field when cookie consent is withdrawn is intentional due to the way visitor recognition currently works.

This behaviour doesn't produce an ideal outcome for segmentation, and could benefit from a re-evaluation and additional documentation. I've assigned this issue for prioritization.

@bx80 bx80 added Bug For errors / faults / flaws / inconsistencies etc. and removed Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Mar 12, 2023
@bx80 bx80 added this to the For Prioritization milestone Mar 12, 2023
@atom-box
Copy link
Contributor

A user writes the following:

"As I just recently activated cookieless tracking on one of our websites, I am interested in how this affects the total numbers etc. That's how I found this article, which is very helpful.

But here's one thing that surprised me a little:

  • When a visitor first denies all cookies, she/he is first listed in the "no cookie consent given" segment. Great.
  • Once this particular user activates cookies, she/he will be listed in the "cookie consent given" segment and disappears in the no consent segment. That's great, too.
  • If one however decides to take back that decision and the user doesn't want to allow cookies anymore after a while (for whatever reason), they will still be found in the "cookie consent given" segment. That is including all their future clicks, and after explicitly denying cookie-based tracking.

So it's kind of once accepted, always accepted, am I right?

It doesn't seem to rely on a cookie being set, as I tried this with a new inkognito window. Maybe this is rather based on a matomo-based ID?

Is there a way to cope with that rather inaccurate segmentation?
Is this a bug?

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