DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
https://getanalytics.io
MIT License
2.46k stars 244 forks source link

new Chrome cookie policy warning #421

Closed valentinoConti closed 9 months ago

valentinoConti commented 9 months ago

I noticed a warning that started appearing on my apps using analytics related to a new Google Chrome cookie policy that is going to be enforced:

screenshot


I guess Google won't make their own analytics stop working but that's what it seems to say (I'm not using any cookie on my app, only using analytics library with google-analytics plugin)

I tried using the gtagConfig.cookie_flags with 'SameSite=None;Secure' but the same thing appears

Is there something I gotta do for this or this will be fixed by Google/you?

thank you so much for this nice library 👍🏼

DavidWells commented 9 months ago

All the cookies are getting set by the https://www.googletagmanager.com/gtag/js script https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-google-analytics/src/browser.js#L4

There might be an option to pass to turn it off? Not sure. Checkout https://developers.google.com/analytics/devguides/collection/ga4/reference/config

This lib doesn't set any cookies