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
testcookies are always set #15161
Comments
Hi, The only way to detect if a browser is supporting cookies is to set one and check if it is set. So Matomo does need to set this cookie to work (unless you disable cookies). |
It's actually a feature and was needed to avoid some warnings or so in IE. The cookie is immediately deleted again so it shouldn't be an issue. And it's a cookie that isn't tracking you or anything. It's just to check if cookies are enabled so reckon it shouldn't be an issue. Happy to reopen the issue if it is an issue. |
Thank you for your quick response. Ok so I think we have an issue on our page, because the testcookies are not deleted and thats why I was confused. |
The cookies are deleted but you can't see this right away. To see that they were deleted you would basically need to remove the tracking code, and then reload the page. You can otherwise also see the cookie that it has been deleted by looking at the expiry date which should be in the past. |
I checked this on two sites but in may cases the expiry date of _pk_testcookie is updated even after calling |
Setting an expiry date in the past is basically how you delete cookies. We do it like this for all our cookies also when you call |
BTW we are making improvements to this in #15225 so in most browsers it won't set a test cookie anymore and we will also set max one per domain if a test cookie is needed |
Thanks for explaination! But unlike the _pk_ses and _pk_id cookies, the _pk_testcookie does not disappear in Firefox (or Chrome) Devtools when calling Feel free to test the behavior on my site, where MATOMO is loaded or removed via a Opt-IN cookie consent banner:
If interessted you will finde the JS code I used for the Opt-IN on my blog (germany only but code commented in english). I used this code multiple times and never had that issue before – but now reproducible on multiple sites updated to the latest MATOMO version. |
BTW just commented one minute before your comment in #15161 (comment) in firefox it shouldn't even be set anymore in the future. I can reproduce your steps and have an idea by what it is caused 👍 |
Hi there,
since we're using Matomo v3.12.0
_pk_testcookies
are always set. A condition has been removed in https://github.com/matomo-org/matomo/pull/14495/files.This could be a GDPR issue if we don't declare them in our privacy policy. After the update we're wondering if we should edit our privacy policy's on several sites or if this get's fixed within the next update. So, is this a bug or a feature? :)
Can u maybe remove the generated cookies after doing the test or can you restore the condition?
Thank u and best regards
The text was updated successfully, but these errors were encountered: