• Resolved kawebb

    (@kawebb)


    Hi!
    We launched this website on a new server and after that the Analytics doesn’t collect any data. All the settings are the same, Non necessary cookies are enabled, the Analytics script is in the HEAD section and when I inspect the site after clicking “Accept” under Application and Cookies all the cookies are namned “yes”. I also deactivated WP Rocket to see if that was the problem. When you click “Accept” on the cookie bar, nothing happens. What can be wrong?

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

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

    (@webtoffee)

    Hi @kawebb,

    Please share a screenshot of the non necessary cookie script input page from the plugin settings.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @kawebb,

    Assuming that it is a server caching issue, can you please try adding the below code to your active child theme’s functions.php.

    add_filter('wt_cli_enable_js_blocking','__return_true');

    Thread Starter kawebb

    (@kawebb)

    Hi!

    Thanks! It activates the script, but now even before I click accept. Is that correct? I tried in incognito.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @kawebb,

    We checked your site and it works correctly now.

    Please follow the below instructions to check this.

    1. Load your website(in an incognito mode/private window) without providing any consent.
    2. Right-click, view the page source, and search for Google analytics script. You can see that the script type value is “text/plain” which makes the script to behave like a text content without getting rendered in the website.
    3. Now, go to your website and accept the cookie and inspect the page. Beneath the elements tab, you can see the script type of Google Analytics has been updated from “text/plain” to “text/javascript” indicating that the script has been rendered on your site.

    Hope this is clear.

    Thread Starter kawebb

    (@kawebb)

    Hi!

    Is it the text/plain on line 83 and 84? I followed your steps and but doesn’t change to text/javascript on those lines after accepting the cookies. I tried in incognito window and also cleared the WPE cache.

    Thanks again!

    Plugin Author WebToffee

    (@webtoffee)

    Hi @kawebb,

    Please see the screenshots in the links below.

    Before accept:
    Screenshot: https://snipboard.io/5WFYsq.jpg

    After accept:
    Screenshot: https://snipboard.io/Wqgm8D.jpg

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Analytics doesnt work after new launch of website’ is closed to new replies.