Step #1. Getting the embed code
Step #2. Adding the code
Go to the Google Tag Manager website and create an account.
When creating an account, specify its name, choose your location and provide your site address in the container.
Once your account is created, you will see the code that is to be pasted on all pages of your site.
Next, add a new tag, go to Tags > New..
Now navigate to Tag Configuration and choose Custom HTML.
In the open that will appear, paste the code you got at the first step.
When adding the code, you need to delete the first string from the code snippet:<div class="stepform_n8puNBK rnd_208183994"></div>
And paste the code at the very end:document.getElementsByTagName('body').innerHTML += '<div class="stepform_n8puNBK rnd_208183994"></div>';
Where stepform_n8puNBK rnd_208183994 is a unique form ID that is specified in the first string of the code.
As a result, you need to get the following code.
Now add it to the Triggering tag.
Save the changes.
Once the changes are saved, you will be taken to the main page with tags where you need to click on the Submit button and then on Publish.
And that’s it! The integration with GTM is complete now.