@KiwiKilian opened this Issue on October 18th 2022

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.

  • If the cookie 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."
  • If there is no 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)

  1. See this example page, it only inlcudes the tracking snippet and the opt-out snippet
  2. Simply reload the page multiple times


We are trying to implement the cookieless, opt-in method. Therefore the tracking code has set the following options:

    _paq.push(["setDoNotTrack", true]);

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

  • Matomo Version: 4.12.1 (previously also occured on 4.12.0)
  • PHP Version: 7.4.3
  • Server Operating System: Linux
  • Additionally installed plugins: CustomVariables
  • Browser: Chrome, Firefox
  • Operating System: macOS
@heurteph-ei commented on October 19th 2022
@justinvelluppillai commented on October 25th 2022 Member

@bx80 can you please take a look here and see if we need to promote this issue?

@MatomoForumNotifications commented on November 7th 2022

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


@MatomoForumNotifications commented on November 15th 2022

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


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