{"id":6006963,"date":"2015-04-12T18:33:51","date_gmt":"2015-04-12T18:33:51","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/gtm-activation-vs-gtm4wp-php\/"},"modified":"2016-08-24T14:40:52","modified_gmt":"2016-08-24T14:40:52","slug":"gtm-activation-vs-gtm4wp-php","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/gtm-activation-vs-gtm4wp-php\/","title":{"rendered":"GTM activation vs gtm4wp php"},"content":{"rendered":"<p>Hi Tomi, amazingly cool plugin! Just starting of with GTM I am and your plugin is great to get experienced with GTM features \ud83d\ude42 You deserve a big Google cheque for your work.<\/p>\n<p>anyway, I was just wondering if I can take the original code to implement GTM from GTM. Is that different from using gtm4wp php<br \/>\nThis one:<br \/>\n&lt;?php if ( function_exists( &#8216;gtm4wp_the_gtm_tag&#8217; ) ) { gtm4wp_the_gtm_tag(); } ?&gt;<\/p>\n<p>vs something like this I take from gtm:<\/p>\n<p>&lt;!&#8211; Google Tag Manager &#8211;&gt;<br \/>\n&lt;noscript&gt;&lt;iframe src=&#8221;\/\/www.googletagmanager.com\/ns.html?id=GTM-N3DGB9&#8243;<br \/>\nheight=&#8221;0&#8243; width=&#8221;0&#8243; style=&#8221;display:none;visibility:hidden&#8221;&gt;&lt;\/iframe&gt;&lt;\/noscript&gt;<br \/>\n&lt;script&gt;(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({&#8216;gtm.start&#8217;:<br \/>\nnew Date().getTime(),event:&#8217;gtm.js&#8217;});var f=d.getElementsByTagName(s)[0],<br \/>\nj=d.createElement(s),dl=l!=&#8217;dataLayer&#8217;?&#8217;&amp;l=&#8217;+l:&#8221;;j.async=true;j.src=<br \/>\n&#8216;\/\/www.googletagmanager.com\/gtm.js?id=&#8217;+i+dl;f.parentNode.insertBefore(j,f);<br \/>\n})(window,document,&#8217;script&#8217;,&#8217;dataLayer&#8217;,&#8217;GTM-N3DGB9&#8242;);&lt;\/script&gt;<br \/>\n&lt;!&#8211; End Google Tag Manager &#8211;&gt;<\/p>\n<p>https:\/\/wordpress.org\/plugins\/duracelltomi-google-tag-manager\/<\/p>\n","protected":false},"template":"","class_list":["post-6006963","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6006963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6006963\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6006963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}