• Resolved darinagaisina

    (@darinagaisina)


    Hi! I′ve followed the steps provided in this thread, as well as this article and added the following code into the header section:

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

    However, Google Analytics cookies still seem to trigger before the user gives consent. What is the problem with the code here or what should I do to implement prior consent on the website?

    Thank you.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @darinagaisina,

    It seems like you have some confusion regarding the implementation. The thread refer to this WordPress plugin which is different from our SAAS solution that is mentioned in the article link given.

    Since you are using the plugin, please undo the code implementation mentioned in this article. Then copy your actual Google Analytics script into the script input field under GDPR Cookie Consent > Cookie Category > click edit on Analytics(or any of category of your choice) > Head script field.

    Thread Starter darinagaisina

    (@darinagaisina)

    I am wrong to assume I should post the Global Site Tag (gtag.js) there? Because that does not seem to solve the problem. In any case, what is the best way to troubleshoot and check if the prior consent is working?

    The number of users and sessions spiked up in our GAnalytics drastically since the day I′ve installed the plugin, and I am not sure that those numbers are correct.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @darinagaisina,

    You must copy the entire tracking script from the Google tag manager dashboard and copy it in the field in the category edit page. Also, remove the code from anywhere on the site or disable any plugin that you use for the same purpose.

    Please confirm these and we will check the site for you.

    Thread Starter darinagaisina

    (@darinagaisina)

    Thanks for your reply! I have done so, waiting for the feedback!

    Plugin Author WebToffee

    (@webtoffee)

    Hi @darinagaisina,

    We checked the site and it is working correctly now. GA cookies are set only after accept.
    Refer the screen recording:

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Google Analytics cookies fire before consent’ is closed to new replies.