Enter your container ID to get the Google Tag Manager installation code, ready to paste into your site.

Loading the tool…

Where to put the code

Snippet Where it goes
Head snippet As high in the <head> of every page as possible
Body noscript (classic version only) Straight after the opening <body> tag

Google’s current installation code only needs the head snippet. The classic version, with a separate noscript snippet for the body, is still supported, and sites already using it don’t need to change anything.

Installing on common platforms

Check it works

In Tag Manager, click Preview and enter your site’s address. Tag Assistant shows whether the container loads and which tags fire. Only install the container once per page, or tags may fire twice.

Frequently asked questions

Where do I find my GTM container ID?

At the top of your Tag Manager workspace. It starts with GTM-.

Do I still need the noscript snippet?

Not with Google’s current installation code. It’s only part of the classic version.

Can I use Tag Manager and gtag.js together?

Yes, but don’t send the same events through both or you’ll double count.

Do I need cookie consent?

In the UK and EU you usually need consent before setting analytics or advertising cookies. Consent Mode can help.

Sources

Last updated: