What is the Google Tag Manager?

Updated on: 25 August 2020

Available from Myonlinestore PRO
Level: Expert

Google Tag Manager, also known as GTM, is a tool from Google that you can use to inject code after your online store has been loaded. The GTM gives you a set of settings that let you control what is loaded and when. For example, you can specifically place a script on the last page of the ordering process that measures the conversion.

Google Tag Manager works with so-called containers. This is a demarcated area within which you can make decisions about the code you want to place in the webshop. This allows you to provide multiple websites with code within one Google Tag Manager account.

If you have created a GTM account, you can create a new container in the dashboard. Give it a recognizable name. Log in to your webshop now and link your account to your webshop at Google services / Google Tag Manager. Select the container just created.

The Tag Manager can read information from the website on which it is loaded. This is not limited to the URL (what is in the address bar of your browser) or elements in the source code of the page. A DataLayer is present on all pages of your webshop. This is a piece of code that can pass specific information to GTM for use. We have now stored the cookie permission here so that you can load scripts that require it if permission has been given for a specific type of cookie.

The variable we use for this are:

  • cookie-consent-analytical
  • cookie-consent-functional
  • cookie consent marketing

Any of these variable can be true or false.

Has this article been useful to you?