Google Tag Manager

Set up Google Tag Manager on your Showit site

Josh Ahles avatar
Written by Josh Ahles
Updated over a week ago

As per Google, The Google Tag Manager container snippet is a small piece of JavaScript and non-JavaScript code that you paste into your pages. It enables Tag Manager to fire tags by inserting gtm.js into the page (or through the use of an iframe when JavaScript isn't available).

  1. If you have not done so already, create a Google Tag Manager account and container.

  2. In Google Tag Manager, click Workspace.

  3. Near the top of the window, find your container ID, formatted as GTM-XXXXXX. Click your container ID to launch the Install Tag Manager window.

The first code snippet will go in to each of your page's Head HTML code. If code already exists in this section, go ahead and hit enter after the other code and continue on to pasting this additional code in. Instructions on where that is located can be found here.

Head Code


Replace GTM-XXXX with your container ID

<!-- Google Tag Manager --><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-XXXX');</script><!-- End Google Tag Manager -->

The second code snippet will be implemented by adding an embed code box on to any canvas on the page. Information on how to create that element can be found here.

Body Code


Replace GTM-XXXX with your container ID

<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) -->

Once that is added, many Google Tag Manager features should work. If you'd like to have a greater control over tag events or data, you will want to use some customization using Google's asynchronous methods (more in-depth and advanced, but further details can be read here).

Did this answer your question?