• Resolved jesusn8

    (@jesusn8)


    Hi there!

    The cookie-law-info plugin is working incorrectly on our website.

    When entering the website, before accepting or rejecting cookies, we see that Google Analytics cookies are loaded. Afterwards, when we reject, they do disappear, but according to the RGPD they should not be loaded until the user configures the cookies, accepts or rejects them.

    In the Analytics category, we have put the following in Scripts in the header of that cookies category:
    “<script> enableGoogleAnalytics(); </script>”

    However, the analytics cookies are still loaded prematurely.

    Thanks in advance for your support!

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @jesusn8,

    Greetings from CookieYes!

    Add the Google Analytics script in the format given below to your Analytics cookie category’s head script section to enable script blocking.

    <script async src="https://www.googletagmanager.com/gtag/js?id=G-*****"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-*****');
    </script>
    Thread Starter jesusn8

    (@jesusn8)

    Hi!

    To be sure, in total there should be in the header of my analytics cookies category scripts, should I have the following?

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

    Thanks!

    Hi, please @cookieyesteam where should I put this script?
    I dont find it in the app https://app.cookieyes.com/manage-cookies

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @jesusn8,

    You can avoid adding the below to the script section of the Analytics cookie category.

    <script> enableGoogleAnalytics(); </script>

    The remaining portions of the script will work. Just to let you know, the cookie category should be where the script is added, not the script area that may be found when modifying a cookie in the cookie list.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @guynkama,

    The solution given in this thread is for a different version. So kindly open a new thread with your query.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @jesusn8,

    This thread has been inactive for a while, so that we will mark it as resolved now. Please feel free to open a new thread or follow up if you have any further questions or still need help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Google Analytics cookies are loaded before accepting them’ is closed to new replies.