@bx80 opened this Pull Request on October 27th 2022 Contributor

Description:

Fixes #19888
Fixed #19879

The JavaScript tracker opt-out was setting the current opt-out state on page load which was incorrectly causing the state to toggle, this bit of code has now been removed.

The standalone opt-out was interpreting no 'consent cookie' or 'remove consent cookie' to mean the user was opted out, which is incorrect. An extra check has been added so that if neither the 'consent cookie' or the 'remove consent' cookie are set the the user is considered to be currently opted-in.

Review

@MatomoForumNotifications commented on November 7th 2022

This pull request has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/global-optout-is-not-working-this-isuseroptedout-always-return-false/47834/6

@KarthikRaja1388 commented on November 9th 2022

Customer's request:

Good morning, I am a Matomo Cloud customer. I would like to report a bug about the code you provided with the opt-out js (from the Matomo backend). When I visit the page where the form is present and then I refresh, the data is changed automatically (example: once it is checked, the next time it is not and so on). Link where the form is present and the bug can be reproduced: https://drapersitaly.it/it-it/cookie-policy/

@peterhashair commented on November 9th 2022 Contributor

@KarthikRaja1388 can I convert the comment to an issue ticket?

@KarthikRaja1388 commented on November 10th 2022
@bx80 commented on November 10th 2022 Contributor

When I visit the page where the form is present and then I refresh, the data is changed automatically (example: once it is checked, the next time it is not and so on)

This PR should fix that problem once it's released, not sure we need a new issue for it?

This Pull Request was closed on November 6th 2022
Powered by GitHub Issue Mirror