• A random line of code has appeared across the top of all the pages I manage. I cannot work why or where it has come from. The code is:

    window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, ‘G-JCH8VSJQ6J’);

    Any ideas how I can remove this?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    The code comes from Google gtag or a similar service. Since you are using a custom theme, please check the theme options or any other plugin that might have been used to add the code to the website header.

    If you are unable to locate it, you can check the header.php file of your custom theme or contact the theme developer company. You can also disable the Speed Optimizer plugin to see if that helps.

    Thread Starter tmidd27

    (@tmidd27)

    Thank you for your response. I worked out it was gtag, but I am unable to locate where it is sourcing it from. I have checked the header.php file. I may need to contact the theme developer. I am just unsure where it is pulling it from.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code appeared across all WordPress sites’ is closed to new replies.