i want to track Visitors without Cookies first. If the user gives Consent, i want to track with Cookies.
After some testing it´s clear to me how to set the remember Cookie and how to implement it at all.
I wonder about one thing:
So on the first visit i run the:
_paq.push([‘requireCookieConsent’]); //Everythings fine, i track without Cookies
The user gives Consent, then i run:
_paq.push([‘rememberCookieConsentGiven’]); //Ok i now set a Consent Cookie for Matomo to remember
Then on EVERY consecutive Pageview, i run the normal script including:
_paq.push([‘requireCookieConsent’]); //And Matomo will then use the Cookie Data?
Iam not sure if this is the right solution? What is _paq.push([‘requireCookieConsent’]); exactly doing? I understood that this is looking for the consent Cookie i created in step2, if the cookie isn´t existing its tracking wihout using the cookie data and if it is existing its tracking with the cookie data. But this isnt explicity written in any Documentation?
Kind Regards and thanks for your help,