• Hi Tomi, amazingly cool plugin! Just starting of with GTM I am and your plugin is great to get experienced with GTM features ?? You deserve a big Google cheque for your work.

    anyway, I was just wondering if I can take the original code to implement GTM from GTM. Is that different from using gtm4wp php
    This one:
    <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>

    vs something like this I take from gtm:

    <!– Google Tag Manager –>
    <noscript><iframe src=”//www.googletagmanager.com/ns.html?id=GTM-N3DGB9″
    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=
    ‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,’script’,’dataLayer’,’GTM-N3DGB9′);</script>
    <!– End Google Tag Manager –>

    https://www.ads-software.com/plugins/duracelltomi-google-tag-manager/

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

    (@duracelltomi)

    Hi,

    First of all: thanks for the kind words ?? I need those to get new energy from time to time!

    Second: the plugin is licensed under GPLv3 thus you may alter the code and release your own solution but you have to indicate the original work. A kind notice about the “basement” of your version and maybe a link to the plugin page would be welcome.

    And for your question: maybe I just need to drink one more coffee ?? but I do not understand what you are trying to do. The code you are referring from my plugin does what you want to achieve: it inserts the GTM container code with the right container ID.

    Is this what you want to do?

    Thanks,
    Thomas

    Thread Starter djavin

    (@djavin)

    You are truly a king! People giving such support to a free and amazing plugin … wow! without you guys wordpress and such would not be here and newbs like me would be sad ??

    Ok so my question, I understand your plugin installs the container, I was just wondering if adding it myself would have the same effect. Me thinks perhaps the code from GTM directly is the latest version and hm sorry sorry; maybe the plugin would some day not be. Is that just a silly thought and can I just go with the php script from your plugin?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Although the speed of development is not as quick as I tough it would be I would say it is currently not big risk for plugin users that I won’t update the container code once it changes for some reason ??

    Hi,
    I don’t know why for my home page GTM was not working even if i use <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?> on my page home.php

    So for the other page it work . Can you help me please.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GTM activation vs gtm4wp php’ is closed to new replies.