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 for opt-out toggling on page load and incorrect default state #19879
Comments
@bx80 can you please take a look here and see if we need to promote this issue? |
This issue has been mentioned on Matomo forums. There might be relevant details there: |
This issue has been mentioned on Matomo forums. There might be relevant details there: |
Thank you very much for the fix. Everything is working fine now with 4.13.0! 🚀 |
@KiwiKilian Appreciate your taking the time to confirm that the fix worked - always great to hear! 😃 |
Expected Behavior
The opt-out checkbox should only change when clicked. The checkbox and text should display the actual current state of the users choosen settings.
mtm_consent_removed
is set, the opt-out text should state, the user has opted-out. The checkbox should not be checked and say: "You are currently opted out. Check this box to opt-in."mtm_consent_removed
cookie set, the checkbox should be checked and the text should say: "You are not opted out. Uncheck this box to opt-out."Current Behavior
Everytime the page with the opt-out is loaded, the state of the opt-out is toggled. So if there is no
mtm_consent_removed
cookie set, it will be set. Meanwhile the checkbox and text displays the opposite of the cookie state. It seems like the JS is just toggling the state everytime.Steps to Reproduce (for Bugs)
Context
We are trying to implement the cookieless, opt-in method. Therefore the tracking code has set the following options:
No other cookies are set for the domain. There are results beeing tracked by this example page.
(The different single and double quote styles are actually generated by Matomo UI).
Your Environment
The text was updated successfully, but these errors were encountered: