Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator threadi

    (@threadi)

    You are using the TwentyTwentyFive theme without a child theme. Therefore, this individual addition should not have been made in the theme but rather via a plugin. Check to see if you are using any plugins that allow you to insert code.

    It is also best to deactivate the WP Fastest Cache plugin for the search. This will allow you to see any changes you make immediately.

    I would recommend posting any questions about CookieYes in their support forum: https://ww.wp.xz.cn/support/plugin/cookie-law-info/

    Thread Starter itbookham

    (@itbookham)

    Thank you for your response. The gtag code was probably inserted several years ago in another WordPress theme. It was probably added with a WordPress plugin or in the Customise section. I do use ‘code snippets’ and ‘WP code lite’ plugins, but I cannot see the script in these plugins.

    Thread Starter itbookham

    (@itbookham)

    Thanks for the heads-up. I’ll upload another post in the CookieYes forum.

    Moderator threadi

    (@threadi)

    Try deactivating the two code plugins. If the code is still visible in the frontend, it must be in some other plugin. You can also try deactivating all of them – then it should be gone, unless you have customized the theme, which you shouldn’t do.

    Thread Starter itbookham

    (@itbookham)

    I suppose it wouldn’t be an issue if I deleted the tag in GTM but left the code.

    Moderator threadi

    (@threadi)

    Theoretically, yes. As long as the code is included in your website, a request is sent to Google every time your website is accessed – regardless of whether it is processed there or not. In terms of the EU’s GDPR, this would constitute a data protection violation (which it already is). And it would be negative for the page load time of your website, as it is an additional request that every browser has to process first.

    Therefore, I would recommend that you search for the origin of the code as described above.

    Thread Starter itbookham

    (@itbookham)

    If I deactivate these two plugins temporarily, presumably the saved settings/codes will remain intact?

    Moderator threadi

    (@threadi)

    Yes, that should be the case. If you are unsure, create a backup beforehand (which you should do regularly anyway).

    Alternatively, you can try using https://ww.wp.xz.cn/plugins/health-check/ in test mode to deactivate all plugins without this actually happening and your visitors noticing anything.

    Or you can create a staging system where you can test this out at your leisure. https://ww.wp.xz.cn/plugins/wp-staging/ can help with this, as can your host’s support team.

    Thread Starter itbookham

    (@itbookham)

    Ok. many thanks again for your suggestions. As a by the way, I don’t think the health check plugin is supported on 6.8.3.

    Moderator threadi

    (@threadi)

    That’s no problem, I’m already using it with 6.9.

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

The topic ‘Hard coded gtag’ is closed to new replies.