Cookies samesite

#509770
  • Resolved GuestofHonor
    Rank Math free

    Hello,

    Since google analytics cookie can be set locally why is this error showing and how to fix it?

    Because a cookie’s SameSite attribute was not set or is invalid, it defaults to SameSite=Lax, which prevents the cookie from being sent in a cross-site request. This behavior protects user data from accidentally leaking to third parties and cross-site request forgery.
    Resolve this issue by updating the attributes of the cookie:

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You should simply add the option as google instructions in the following format using rankmath analytics options page

    gtag('config', 'G-N2A3FMNDT5', {
      cookie_flags: 'max-age=7200;secure;samesite=none'
    });

    Hello,

    Thank you for contacting Rank Math support, and sorry for the unexpected delays and any inconvenience that might have been caused due to that.

    Can you please share the affected website URL with us so we can further check it on our end?

    Looking forward to helping you with this one.

    https://smilecare.ae

    I have used another code for it and not rankmath since i kept getting the mime type error as well which i believe is also a non compatibility with litespeed cache since it happens when i clear cache including js/css which caused it not to get the code from google.
    i believe you should add a manual gtag code manually G-xxxxxx

    Thanks

    Hello,

    We are not able to see the issue on our end. If wish to manually add the code, you may refer to this code snippet: https://gist.github.com/maheshwaghmare/ed1bf11b453887543b203dc9b279aae9

    Let us know if this will also work.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this ticket.