Where Can I Find Container Code in Google Tag Manager? (2024)

Where Can I Find Container Code in Google Tag Manager? (1)

In order to install Google Tag Manager, you have to place its container code on your website. If you’re using some 3rd party plugin to install GTM, all you need to provide is Google Tag Manager ID.

However, in many other cases, you will need to place the entire container code snippet to the source code of your website. This quick guide will show you all the places where that code can be found.

Option #1. Code is displayed right after you create a container

When you sign up for a new Google Tag Manager account here, you will be asked to create a new container. Follow all the steps and you’ll see the container code. If you already have at least one GTM container, you can then go to the main list of all your Google Tag Manager accounts and choose one of the two options:

a) You can create a new account (e.g. for your client) and then create a container
b) Or you can click 3 dots next to the already existing account and then chooseCreate Container

Where Can I Find Container Code in Google Tag Manager? (3)

Then follow all the steps and after you hitCreate…

Where Can I Find Container Code in Google Tag Manager? (4)

You will see a popup that looks like this (see below). These are the codes you’re looking for.

Where Can I Find Container Code in Google Tag Manager? (5)

P.S. All my screenshots here are related to theWebcontainer of Google Tag Manager.

Option #2. Click GTM container ID in the top menu bar

Log in to your Google Tag Manager account and open a container. In the top right corner (next to theSubmitandPreviewbuttons) you’ll see some short text that starts withGTM-and then contains some letters/numbers. That’s your Google Tag Manager container ID.

Where Can I Find Container Code in Google Tag Manager? (6)

Click that ID (as I’ve displayed above) and you’ll see a popup with two codes. Both of them will contain that very same Google Tag Manager ID. That’s it! You’ve found the Google Tag Manager container code.

Where Can I Find Container Code in Google Tag Manager? (7)

Important:the first code is required for GTM to work. It must be placed as high in the website’s source code as possible (recommended in <head>). When someone asks you to add the GTM code, THIS IS THAT CODE. The 2nd code must not be added to the <head>. Add it right after the opening <body> tag instead. Read this blog post for more details.

Options #3. Go to the Admin section of your container

One more place where you can find the container code is by going to the Admin section of the container. In the top menu of your Google Tag Manager interface, click Admin.

Where Can I Find Container Code in Google Tag Manager? (8)

Then in the 2nd column (container), click Install Google Tag Manager.

Where Can I Find Container Code in Google Tag Manager? (9)

Then you will see both GTM codes that need to be added to the site’s source code.

Remember, the first code (surrounded byscript tags) is the most important. It MUST be added to the website. The 2nd code (surrounded bynoscript tags) is optional. You can learn more about it here.

Related resources

Here are some additional guides you will find useful:

Where Can I Find Container Code in Google Tag Manager? (2024)
Top Articles
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6111

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.