@jb-alvarado opened this Issue on March 18th 2020

Hello, is it possible to deactivate all cookies by default and activate (and set them) by users Opt-In?

My closed workaround is setting consentRequired to true, but this will create an initial cookie (mtm_consent_removed). And when user Opt-In and revisit the page, the other matomo cookies are set.

I need a way, that at the initial load no cookie at all will be set. When user Opt-out only the mtm_consent_removed should be set and when user Opt-In all cookies should be created.

@sgiehl commented on March 18th 2020 Member

refs #15507

@tsteur commented on March 18th 2020 Member

Is there a problem with calling disableCookies maybe?

@jb-alvarado commented on March 18th 2020

Yes I can set disableCookies, but how can I enable them again, when user Opt-In? disableCookies will only work correctly when it is set at the very begin of an page load. When I set disableCookies after user opt-out, I have already a cookie set. And as I understand the law in Europa right, on cookie at all should be set until a user allow it.

@tsteur commented on March 18th 2020 Member

Do you manage opt in and opt out yourself? Once you know you have the opt in, you could basically initialise a new tracker instance where you don't have cookies disabled. Although in that case you could also not add any tracker initially unless you know the user has opted in.

My closed workaround is setting consentRequired to true, but this will create an initial cookie (mtm_consent_removed)

How exactly do you do this? Is that with the most recent version of Matomo? Only looked quickly at the code but this should not happen AFAIK

@jb-alvarado commented on March 18th 2020

How exactly do you do this? Is that with the most recent version of Matomo? Only looked quickly at the code but this should not happen AFAIK

So you think, normal there should not be an mtm_consent_removed cookie set, when I use the option consentRequired?

I use the newest matomo version, but in combination with the nuxt-matomo module on my website.

@tsteur commented on March 18th 2020 Member

@jb-alvarado I haven't tested it, only looked quickly at the code and would say it shouldn't set it. It would only be set if you give consent, and later remove consent (or opt out). I recommend you delete all cookies and test it maybe again?

@jb-alvarado commented on March 18th 2020

I have test it so many times with deleting all cookies and so on, there is no chance. I can only try to integrate matomo by my self, without any module, maybe this works.

But even here they use a hacky way to realize opt-in: https://www.vektorkneter.de/matomo-tracking-cookie-opt-in/

@tsteur commented on March 19th 2020 Member

I just quickly tried it with requireConsent and in my case it was actually not creating that cookie you mentioned but it was still creating the regular cookies.

How does the user opt in on your site?

@jb-alvarado commented on March 19th 2020

Ah that is interesting, then I have to look to the code from the nuxt module.

How does the user opt in on your site?

You can see it here:
https://daswort.tv/

@jb-alvarado commented on March 19th 2020

Ok I have the issue, it was my fault... On initial load I have checked if a "useAnalystics" cookie are set, and when not I setted setConsent(false). But this is a wrong behavior...

Sorry for getting your time, but thank you for the helpful commands!

This Issue was closed on March 19th 2020
Powered by GitHub Issue Mirror