You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package doesn't prevent setting any cookies, this just offers you a cookie bar, the rest of the logic has to be implemented by the package consumer.
So I have no explanation why it would be different in the mentioned browsers, I do however know for sure that the cookie-bar doesn't actually stop cookies. (from looking at the code obviously, and issue #58 )
I see. I am using next.js and in my _document.js Head section i do this:
{/* Global Site Tag (gtag.js) - Google Analytics */}
<script
async
src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`}
/>
<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
`}}
I guess this is the culprit. I don't know why chrome does not set the cookie but Edge does. Can I somehow set it based on a condition - e.g. the CookieConsent - cookie is set and true?
I have no experience with next.js nor the google tag manager so I can't be of much help.
If I were you I'd open a ticket on a google tag manager related forum.
On Chrome, no Google (Analytics) cookies are set if the Consent is not given by the pop up click.
On Edge, some cookies are already set although the user did not click nothing yet!
This should not happen, here is a screenshot (am is our session cookie, the others should not be set!)
The text was updated successfully, but these errors were encountered: