• Resolved Petri Hakanen

    (@petrihakanen)


    WordPress 4.8.1 running Enigma-Pro-Parallax theme.

    I’ve installed, used, and then after few days deleted the plugin. But GTM still continues tracking tags using some code this plugin has inserted. Where can I find that code to remove it by editing files myself

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

    (@duracelltomi)

    Hi Petri,

    Thanks for your question.
    It is important to know that this plugin does not alter your theme files, nor injects any tracking code my itself. There is one option where you need to place 1 line of PHP code into your there files but this will not insert any code once you deactivate the plugin.

    I would like however to help: if you could post your website URL, I could review it and let you know where to look at some orphaned codes.

    If you do not wish to share the URL here, please use the contact form at gtm4wp.com

    Thanks,
    Thomas Geiger

    Thread Starter Petri Hakanen

    (@petrihakanen)

    Hi. Thank you. The site is https://www.hakanen.eu

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Great, thank you!

    There is a manually added GTM container code in your site.
    Here is what you can do:

    – if you are using any plugin that provides you the option to add codes to the site header, check whether there is this container code
    – some themes offer the same functionality that you might want to check
    – you should also check your theme’s header.php file

    This is the code that you should look at:

    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TJJDCWL"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TJJDCWL');</script>
    <!-- End Google Tag Manager (noscript) -->

    Let me know if you’ve found the solution.

    Thomas

    Thread Starter Petri Hakanen

    (@petrihakanen)

    Hi. Yes, I know that there is that code in the header. I have put it there, simply copied from GTM. But, before I inserted that, just after I deleted your plugin, I noticed that it kept on tracking as with your plugin; scroll depth and “outbound link click” tag I inserted using your plugin. Now I have different tags eg. for outbound links, but it still keeps on tracking also as with your plugin. So, I suppose, there will be some code left from your plugin also. Eg. now I have only one tag for outbound link click, but when I test a click, I see in Google analytics two events from that click. One is a tag as it is now in GTM and one as there was a tag when using your plugin. hmm…?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I would like to confirm that my plugin seems to be deactivated on your site. No code from my plugin is executing from what I can see.

    The container GTM-TJJDCWL is intact: as you said, you placed this container code by hand.

    The plugin “Google Analytics Dashboard for WP” is currently active, it includes a scroll tracking script that is currently sending GA events on your site while I am scrolling through:
    https://www.hakanen.eu/blog/wp-content/plugins/google-analytics-dashboard-for-wp/front/js/tracking-scrolldepth.js?ver=5.1.1.1

    This plugin is also sending outbound click events:
    https://www.hakanen.eu/blog/wp-content/plugins/google-analytics-dashboard-for-wp/front/js/tracking-analytics-events.js?ver=5.1.1.1

    … along with the outbound click tracing tag in your GTM container: this is why you see outbound clicks twice: one reported by the GA plugin and one reported inside your GTM container that has been added by you as well.

    Please let me know if there are any other events or GA data that you feel comes from some orphaned code so that I can tell your the real source.

    Thomas

    Thread Starter Petri Hakanen

    (@petrihakanen)

    OK! Thank you! I didn’t know there was that kind of actions happening also. I got it totally wrong. When I installed your plugin and activated it, I made one GTM tag and trigger for outbound clicks. I saw Google Analytics showing scroll depth and outbound links, and I thought that was because of your plugin. But, GTM’s preview/debug didn’t work and also other triggers and tags didn’t produce events to GA. So, I deleted your plugin and installed that header code using WPBeginner’s ‘Insert Headers and Footers’ plugin – and then it begun to work, tags, triggers and previews.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove the code – not removed when plugin deleted’ is closed to new replies.