Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #380772

    JessicaGG
    Participant

    Hi,

    I’m changing over to Google Tag Manager and need to remove the hardcoded Google Analytics code from my current site.

    I thought I added GA using an extension in the ‘Add Ons’ section however this section displays the message ‘Could not retrieve extensions list. Please ensure your firewall is not blocking requests to theme.co.’. The script is not in my Customiser JS script field so I think I added it via an extension but as above, this is blocked (I’m with Media Temple web host and they say there are no issues their end).

    I have therefore been ftping into my site to try and find where the GA code is so I can delete it but with no luck. Which file is it in in my folder structure so I can delete it?

    #380787

    John Ezra
    Member

    Hi there,

    Thanks for writing in! Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #380793

    JessicaGG
    Participant
    This reply has been marked as private.
    #380813

    JessicaGG
    Participant

    Can you also let me know in which file I can paste this line which has to go below the opening <body> tag?
    From from Duracell Tomi’s Google Tag Manager plugin:

    Paste <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?> below the opening <body> tag to implement the Google Tag Manager plugin.

    #380819

    Christopher
    Moderator

    Hi there,

    I checked the FTP files and couldn’t find analytic code. It should be added through one of plugins.
    Please clear cache from site and browser and check your page, if you still see analytic code please disable all third party plugins and check your page again.

    Thanks.

    #380832

    JessicaGG
    Participant

    I don’t have any Google Analytics plugins and the other plugins are unrelated to analytics but the GA script is in my source code. Is there anyway to find it apart from going through the hundreds of ftp files and Cntrl + for the word ‘analytics’? Do you have any suggestions on where I should start looking?

    #380855

    Zeshan
    Member

    Hi Jessica,

    I’m not seeing a child theme installed in your site and if you have made a template change in your parent theme, you could try re-installing your X theme. If you haven’t made any template change in the parent X theme, then it must be a plugin that is adding that code.

    The possible solution here to narrow down this problem would be to test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Thanks!