Jump to content

Google Tag Manager


ianm

Recommended Posts

Good Day

 

I would like to add the google tag manager container snippet to each of my product pages. I presume I need to do this in CPanel. Could anyone advise where do I find the product pages in CPanel. The aim is to make use of Google AdWords remarketing etc.

Link to comment
Share on other sites

I would rather connect to the FTP, and insert the code in YOUR_THEME/header.tpl file, just after the opening <body> tag, like this:

{literal}
         <!-- Google Tag Manager -->
         <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
                           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-XXXXXX');</script>
         <!-- End Google Tag Manager -->
      {/literal}
Link to comment
Share on other sites

Thanks for the response. My understanding, if I ad the snippet to the header I will be tagging the website as a whole. I would like to tag each individual product page. The idea is to do remarketing with Google Ads. If a customer looked at a specific product on my site, I would like to remarket to him on googles display network.  

Link to comment
Share on other sites

I'm not very fluent with GTM, but as I understand, this code enables the shop to connect with GTM. As I know from marketing people, a lot cen be set up there. If not, an additional module should probably be used that would insert a specific dataLayer on each product page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...