Support » Plugin: Google Tag Manager for WordPress » Third Party code tracking through GTM

  • Hi,
    We are using the following third-party code to track the event.
    AddThis GetSiteControl,Facebook Google Analytics,Hotjar OneSignal,Other Google APIs/SDKs
    Google/Doubleclick Ads
    Can I able to manage this with your plugins?
    Thanks

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

    (@duracelltomi)

    Hi,

    You can track your events with GTM and send data to as many destinations as you wish. Some items on your list includes tag templates which means you only need to enter some parameters to make it work. In some cases you will need top copy/paste the full tracking code and use the so called “Custom HTML Tag” inside GTM.

    All this can be setup on the GTM UI, this plugin will only manage to inject the proper container code snippet into your website in your case.

    Hi,
    But adding more and more third-party codes causing site page speed rank(google page speed insights) to be low.How to overcome the issue? If I add your plugin can I manage those third party code or script with this? can I get extra benifit if i use your plugin related to third party code management and Pagespeed?
    Thanks

    Hi,
    After adding this code in my PHP site page rank decreased much

    /* Google Tag Manager START */
    add_action( 'wp_head','add_gtm_script_part' );
    function add_gtm_script_part () { ?>
    <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-543DQCK');</script>
    <?php }
    
    add_action( 'astra_body_top','add_gtm_noscript_part' );
    function add_gtm_noscript_part () { ?>
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-543DQCK"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <?php }
    /* Google Tag Manager END */ 

    Any wayout for this?
    Thanks

    Plugin Author Thomas Geiger

    (@duracelltomi)

    If you add more and more tracking, this will of course need more time to load while the user visits your site.

    Question is whether only the container code snippet is causing issues in your page speed insights report or there are other metrics to improve?

    Usually trying to improve metrics around tracking codes is the last on the TODO list. GTM4WP “simply” adds the GTM container code and some useful additional data into your website. This has a standard where and how to put those codes. Currently, I see here some confusion at Google itself as they have their recommendations how to add the tracking codes of GTM into a webpage but Page Speed Insights complains about those recommendations.

    Hi,
    >>Question is whether only the container code snippet is causing issues in your page speed insights report or there are other metrics to improve?
    Yes we have checked in our dwv site after disabling the above code snippet Google page rank increased in mobile itself.
    Have you checked the code? Have there any smarter way to manage and handle so that it will not impact on site pagespeed performance?
    I want your opinion,or any suggestions from any expertise?
    Thanks once again for your help
    Thanks

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Yes, but your code seems to be fine.
    My experience is that running a WordPress site withtout a good cache plugin will be always a pain. gtm4wp.com, the official site for this plugin is also running a cache plugin and with that, Page Speed scores are quite good:
    https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fgtm4wp.com%2F&tab=desktop

    Have you tried to create a new, empty container in GTM, publish this empty container and add this to your site? how does this change your pagespeed metrics? If it improves, than you might have something in your real container that has this effect. You can then for example go through every custom HTML tag if you have any and pause them one by one.

    We are using wp-rockrt for caching solution.any other quick way to handle?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    I am using WP-Rocket as well.
    With that, you can see page speed insights report in my prior comment.

    Could you share you page speed insights report here as well? I could have a quick look at it.

    zo

    (@zotezo)

    My site Url http://www.zotezo.com and google pagespeed insight rank on mobile is 38 and for desktop it is 80.

    I have not found the issue and what’s going wrong.

    https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.zotezo.com%2F&tab=mobile

    Please help me to find out a solution.

    Thanks

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @zotezo,

    The initial response time of your server is slow, this is more a hosting question as tracking code related.

    Some images do not have proper TTL values set, this can be fixed with a good cache plugin.

    You should also disable every feature in GTM4WP settings that is not being used as each unused but enabled feature can add to page load time for nothing.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.