I am currently having a warning message on firefox:
Some cookies are misusing the recommended “SameSite“ attribute
Cookie “_ga” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Cookie “_gid” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Cookie “_gat” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
I disabled AdBlock but warning still show on the console.
how to fix this?
react ver: 16.13.1
react-ga ver: 3.2.0
edited: on chrome it was because of my avira browser safety, I disabled it and the error is gone but in firefox the warning message is still there.
Here's the fix:
ReactGA.initialize(trackingID, {
gaOptions: {
cookieFlags: 'SameSite=None;Secure'
}
});
Should probably be made the default in ReactGA
Thanks it's working, the message is gone now
@primal100 can you be more specific about where I can write this code? I'm having the same trouble @astroana
@primal100 can you be more specific about where I can write this code? I'm having the same trouble @astroana
in your Index.js file and replace the trackingID with your google tracking ID
@primal100 can you be more specific about where I can write this code? I'm having the same trouble @astroana
If you followed the readme procedure in ReactGA you should have a ReactGA.initialize line in your code. It's needed for ReactGA to work. You can add gaOptions in there as in my example.
Most helpful comment
Here's the fix:
Should probably be made the default in ReactGA