Avatar Arpit Khurana | January 30, 2018

Google Tag Manager How To Set Up A Container.

The first important concept is container.

You can think of a container like a bucket which keeps all your tags, triggers, variables and macros. I will explain tags, triggers, variables and macros in my later videos.To set up a container for your website go to Google Tag Manager and then click on sign up. Under account name you can put your company name and then click on continue.

Under container name it is a good practice to put your domain name, like in my case it can be be, then select the type of content web, amp, ios or android. If setting up a mobile container, select whether you are using the Firebase SDK or one of the Legacy as SDK

For a website, simply select web, click create, review the terms of service and click yes if you agree to those terms.

When your new container first loads, you will be prompted with the web container installation code snippet. Paste this code as high in the head of your page as possible. Additionally paste the below code immediately after opening the body tag.

Like you see in my website. If, I show you the source code of the homepage you'll see. The first Google Tag Manager code being pasted as soon as the head tag starts and then you can also see the second Google Tag Manager code being pasted as soon as the body tags starts.

Now your container setup is done.

You can add Google Tag Assistant to confirm that container has been set up correctly. If you see green here then you are good to go. Otherwise you might see some errors here.

GTM also lets you import containers, you can import a Json file through which you can import tags, triggers and variables into your container. You can also create multiple containers, however it is strongly recommended that you just create one container for one property.

Written by Arpit Khurana

  • Copyright ©2019 NSDM INDIA. All rights reserved.