Skip to content
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

Cookies default off, enabling by Opt-In #15702

Closed
jb-alvarado opened this issue Mar 18, 2020 · 10 comments
Closed

Cookies default off, enabling by Opt-In #15702

jb-alvarado opened this issue Mar 18, 2020 · 10 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@jb-alvarado
Copy link

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.

@jb-alvarado jb-alvarado changed the title Cookies dafault off, enabling by Opt-In Cookies default off, enabling by Opt-In Mar 18, 2020
@sgiehl
Copy link
Member

sgiehl commented Mar 18, 2020

refs #15507

@tsteur
Copy link
Member

tsteur commented Mar 18, 2020

Is there a problem with calling disableCookies maybe?

@jb-alvarado
Copy link
Author

jb-alvarado commented Mar 18, 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
Copy link
Member

tsteur commented Mar 18, 2020

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
Copy link
Author

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
Copy link
Member

tsteur commented Mar 18, 2020

@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
Copy link
Author

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
Copy link
Member

tsteur commented Mar 19, 2020

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
Copy link
Author

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
Copy link
Author

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!

@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants