With the Google Tag Manager, you can easily add so-called tags to your website. These tags are snippets of code provided by analytics, marketing, and support vendors. The advantage of the Google Tag Manager is that you can add these tags without interfering with the source code of your website. To learn more about this feature, please also refer to the Google Tag Manager Help.
Skip to:
- How to set up the Google Tag Manager
- How to integrate the Google Tag Manager into your website
- How to get the code snippets for the Google Tag Manager
- How to make use of the Google Tag Manager
How to set up the Google Tag Manager
All you need to get started are a Google Tag Manager account and a container. A container is like a folder that can consist of multiple tags with rules to govern them. There are different types of containers, e.g. for websites, apps or servers. If you don't have an account yet, you will need to create an account first. The account settings are up to you as you can also use your account for other use cases than your website.
After you have created an account or if you already had one, you need to set up a container. To facilitate the management, it is recommended that you use the container specifically for your website. Therefore, you should name the container accordingly and select the container type Web.
Once you have completed the setup of your account and the container, a pop-up with further instructions regarding installing Google Tag Manager opens. Copy the two code snippets for <head> and <body> and save them in a text file, for example, as you will need them to install the container for your website.
Before starting to use the Google Tag Manager, you should add and configure your desired tags in your Google Tag Manager account. Which tags you should add depends on what you would like to do with the Google Tag Manager. Please make sure to also verify that your tags work and publish them subsequently. For a more detailed description of the required steps, please refer to the Google Tag Manager Help, where you can also find a list of supported tags.
How to integrate the Google Tag Manager into your website
To use the Google Tag Manager, you’ll need to install the container by adding the code snippets that were displayed when you set up the Google Tag Manager. If you don't have the code snippets at hand, follow the steps described under How to get the code snippets for the Google Tag Manager.
- In the sidebar of your cockpit, select Marketing > Google Tag Manager.
You can also make the respective settings in the Editor under in the bottom bar. - In the input field Google Tag Manager code <head>, enter the code snippet for <head>.
- In the input field Google Tag Manager code <body>, enter the code snippet for <body>.
- Activate the toggle Enable Google Tag Manager to enable the Google Tag Manager for your website.
Caution
Only enable the Google Tag Manager for your website after you have set up your account and tags. - Save your entries.
You have successfully integrated the Google Tag Manager into your website.
Note
If you notice that your website is not working properly after you've made changes to your tags in the Google Tag Manager, you can disable the Google Tag Manager by deactivating the toggle Enable Google Tag Manager again. This will allow you to check if the changes are the reason for the impairment. If so, it is recommended to adapt or undo the changes in the Google Tag Manager.How to get the code snippets for the Google Tag Manager
You can access the code snippets in your Google Tag Manager account. After you have logged in, select the related account and container for your website. There you can select the container ID number (GTM-XXXXXX) at the top of your workspace overview page. This will reopen the pop-up with further instructions regarding installing the Google Tag Manager. Copy the two code snippets for <head> and <body> and paste them into the input fields on your website to use the Google Tag Manager.
Info
The code snippets are unique for each of your containers, which is why you should make sure to use the code snippets for the correct container. Tags you add usually do not influence the code snippets. Therefore, once the setup is done, you do not need to update the code snippets in your website, even if you add additional tags or edit your existing tags.How to make use of the Google Tag Manager
The Google Tag Manager allows you to add tags without interfering with the source code of your website. Via these tags, you can easily add different tools to your website. For example, you can use the Google Tag Manager to integrate Google Analytics with a Google Analytics 4 (GA4) property. For further information regarding this topic, please refer to the help article Google Analytics.