• Resolved C Green

    (@cgreen177)


    Hi I have the following script to set up GA4 analytics cookies when the user accepts analytics:

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-nnnnnnnn"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-nnnnnnnn');
    </script>

    (with the correct G- ID value)

    When a user accepts cookies, 2 cookies (_ga and _ga-G-nnnnnn) are set.
    When a user revokes consent, only the _ga cookie is unset.

    Do I have to write a php funciton to unset these myself? (The ‘old’ version of analytics worked perfectly, if I recall correctly

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @cgreen177,

    Thanks for using our plugins.

    Please update your plugin to version 4.6.1 and should be fine.

    Thanks

    Thread Starter C Green

    (@cgreen177)

    Thanks just tried that with an updated plugin and a cache refresh and can still see the issue. Steps to replicate:

    1. Go to homepage
    2. Accept cookies
    3. Navigate to new page on site
    – _ga and _ga-nnnn are set at the domain level
    – moove_gdpr_popup is set on the www*
    4. Click on cookies link in footer, toggle off google analytics and save changes
    5. Page reloads
    – _ga cookie is removed
    – _ga-nnnnn cookie is (now) set on www. domain with an expiry of 1/1/1970
    – _ga-nnnn cookies is (still) set on naked domain and unexpired

    So it looks like the script is deleting the _ga cookie on the domain level, and setting an expired cookie on the www* level but leaving one cookie on the domain (if I am interpreting this correctly)

    Thanks!

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @cgreen177

    Thanks for reporting this.

    We found the issue and the fix will be available in the next update of the plugin.

    Hope this helps.

    Thread Starter C Green

    (@cgreen177)

    Thank you @mooveagency !!

    Is that 4.6.2 released today – or the next one? Happy to retest 🙂

    Plugin Author Moove Agency

    (@mooveagency)

    Yes today

    Thread Starter C Green

    (@cgreen177)

    Amazing thank you ! All working.

    Thanks again for the help and support!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘GA4 Analytics property is not unset when consent revoked’ is closed to new replies.