Free AI Visibility Audit
Blog

How to Install Google Tag Manager: Step-by-Step Guide (With Screenshots)

· 14-minute read
Step-by-step · shikha.ioHow to install Google Tag ManagerGoogle Tag Manager6 steps, real screenshots
On this page

When I launched shikha.io in October 2026, Google Tag Manager was the first tool I installed, before Analytics, before Clarity, before anything else. Here is exactly how I did it, every screen annotated, plus how to share access, track events and add schema markup.

Key takeaways

  • Google Tag Manager is the only tracking code that should live in your website. GA4, Clarity, ad pixels and events all go inside it.
  • Always create Tag Manager under your own business Google account, then share access with your agency or developer. Never the other way round.
  • Saving is not publishing. Nothing goes live until you click Submit, then Publish.
  • Use "All Pages" for tools that should run everywhere, and a page-specific trigger for events on one landing page or thank-you page.

Tested on shikha.io, October 2026. Every screenshot below is from that setup, with IDs blurred.

What is Google Tag Manager (GTM)?

GTM, also known as Google Tag Manager, is a free tool from Google that lets you add and manage all your website tracking codes from one place, without editing your website every time.

Think of it as a box you install on your website once. Google Analytics, Microsoft Clarity, the Meta and LinkedIn pixels, conversion tracking and even schema markup all go inside that box. When you want to add, change or remove one, you do it in Tag Manager, and your website code stays untouched.

A few words you will see inside Tag Manager:

Account Your company

One per business. It holds your containers.

Container Your website

One per website. This is the box that holds all your tags. Its ID looks like GTM-XXXXXXX.

Tag What to run

A piece of tracking, for example "send a pageview to GA4" or "load Clarity".

Trigger When to run it

The rule that fires a tag, for example "on every page" or "when someone clicks Book a call".

Workspace Your draft

Where your changes wait until you publish them. Nothing in the workspace is live yet.

5 key benefits of using Google Tag Manager

  1. One code on your website, forever. You paste Tag Manager once. Every future tool goes in through it, so you stop asking a developer to edit the site.
  2. Changes in minutes, not tickets. Adding a pixel for a new campaign or tracking a new button takes a few clicks, not a website release.
  3. Test before anything goes live. Preview mode shows exactly which tags fire on which page before your visitors see a single change.
  4. An undo button for tracking. Every publish is saved as a version. If something breaks, you go back to the last working version in one click.
  5. Control over who can do what. You decide who can only view, who can edit, and who can publish, user by user.

What you can do with Google Tag Manager

These are the jobs I use Tag Manager for on almost every client website:

  • Install analytics: GA4 and Microsoft Clarity, without touching the site code.
  • Track conversions as events: form submissions, "Book a call" clicks, WhatsApp clicks, phone number taps and file downloads.
  • Add ad pixels: the Meta pixel, LinkedIn Insight Tag and Google Ads conversion tracking, only on the pages that need them.
  • Add schema markup: structured data that helps Google understand a page, added through a tag when you cannot edit the page code.
  • Track engagement: how far people scroll and which links they click.

Before you start: 3 things to have ready

  • A Google account your business owns. Use the company account, not a personal one from a freelancer or agency. More on why in Step 3.
  • Access to your website. Either the site code, or admin access to your website platform (WordPress, Wix, Shopify, Webflow, Squarespace).
  • 10 minutes. No coding knowledge needed.

Step 1: Create your Tag Manager account and container

  1. Go to tagmanager.google.com and sign in with your business Google account.
  2. Click Create Account.
  3. Under Account Setup, enter your Account name (your business name) and choose your Country.
  4. Under Container Setup, enter your Container name (your domain, for example shikha.io) and choose Web as the target platform.
  5. Click Create and accept the Google Tag Manager terms of service.
Google Tag Manager Add a New Account form with account name, container name, Web platform and Create button highlighted
Account name (1), container name (2), Web (3), then Create (4).

Step 2: Add the 2 codes to your website

After you create the container, Tag Manager shows a box with 2 pieces of code. Your container ID, which looks like GTM-XXXXXXX, is also at the top of the page.

Install Google Tag Manager box with the two copy buttons highlighted
Copy button 1 is for the head of every page, copy button 2 is for the body. Container ID blurred.

Option A: Paste the code yourself

  1. Copy the first piece of code and paste it as high as possible inside the <head> of every page.
  2. Copy the second piece and paste it right after the opening <body> tag on every page.
  3. Publish your website.

This is how I installed it on shikha.io. In the page code it looks like this, with your own ID in place of GTM-XXXXXXX:

<head>
  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){ ... })(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
  <!-- End Google Tag Manager -->
  ...
</head>
<body>
  <!-- Google Tag Manager (noscript) -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" ...></iframe></noscript>
  ...

Option B: Use your website platform

PlatformHow to add Tag Manager
WordPressInstall Google's Site Kit plugin, then go to Site Kit, Settings, Connect More Services, Set up Tag Manager. Pick your account and container and click Complete setup: Site Kit places both codes for you. If GA4 lives inside Tag Manager, do not also connect Analytics in Site Kit, or visits are counted twice. Never paste the code into your theme's header.php: a theme update wipes it.
WixDashboard, then Marketing Integrations, then Google Tag Manager, then Connect, and paste your GTM ID. Needs a Premium plan and a connected domain.
ShopifyFor GA4 and Google Ads, Google recommends its Google & YouTube app instead. Tag Manager on Shopify works through a custom pixel, which Google does not fully support. Treat it as an advanced setup.
WebflowSite settings, then Custom code: paste the first code in Head code, save and publish. The Footer code box loads at the end of the page, so for the second code add an HTML Embed as the very first element on the page and reuse it on every page. Needs a paid site plan.
SquarespaceOpen the Code Injection panel in your site settings: paste the first code in Header and the second in Footer. Not available on the Personal or Basic plans.

Tag Manager is the only tracking code that lives in your website. Once it is in, GA4, Clarity and pixels all go inside Tag Manager. Never paste GA4's own code on the site as well, or every visit is counted twice.

Step 3: Share access, and keep ownership

Always create Tag Manager under your own business account, as in Step 1. Then give your agency, developer or marketing team access as users. If someone else creates it on their login, the tracking on your website belongs to them, and you lose it the day you stop working together.

How to add a user

  1. In Tag Manager, click Admin at the top.
  2. In the Container column, click User Management. (To give someone access to the whole account instead, use User Management in the Account column.)
  3. Click the blue + button at the top right, then Add users.
  4. Enter their email address.
  5. Choose their Container permissions (see the table below).
  6. Click Invite. They get an email and accept the invitation.

Which role to give whom

WhoAccount permissionContainer permissionWhat they can do
You, the business ownerAdminPublishEverything, including adding and removing users
Your SEO or marketing agencyUserPublishAdd tags and make them live, but not manage users
A developer or junior team memberUserEditBuild and change tags in a workspace, but not publish
A reviewer who signs off changesUserApproveEdit and create versions for review, but not publish
Someone who only needs to lookUserReadSee tags, triggers and settings, change nothing

When a contract ends, go back to User Management and remove that user. Your tags, history and data all stay with you. Google's permissions guide has the full detail.

Step 4: Understand the workspace: saving is not publishing

Everything you change in Tag Manager first goes into your workspace, a draft. Your website does not change until you publish. This is the most common reason I find tracking "installed" but not working: the tag was saved, never published.

Google Tag Manager workspace with Add tag, Preview and Submit highlighted
Your workspace: Add tag (1) creates a tag, Preview (2) tests it, Submit (3) starts publishing.

Watch the counter at the top. "Workspace Changes: 0" means everything is live. Any number above 0 means you have changes waiting that your visitors cannot see yet.

Google Tag Manager showing Workspace Changes 3 with the Submit button highlighted
My workspace after adding GA4: 3 changes saved (1) and not live until I clicked Submit (2). Container ID and email blurred.

Step 5: Add tags and choose the right trigger

A tag is what runs. A trigger is when it runs. Getting the trigger right matters as much as the tag.

When to use All Pages

Use Initialization - All Pages for tools that should run on every page of your website from the first moment: GA4, Microsoft Clarity, and your consent banner. This is the trigger I used for both on shikha.io.

When to use a specific page

Use a page-specific trigger when a tag should run only on one page or landing page. For example:

  • A conversion that counts only when someone reaches your thank-you page after a form.
  • A LinkedIn or Meta pixel that should run only on your campaign landing page.
  • Schema markup that belongs to one page only.

To set it up: Triggers, New, choose Page View, select Some Page Views, and set the condition Page Path equals your page, for example /thank-you/. Save it, then pick this trigger in your tag instead of All Pages.

Example: add GA4 in 4 clicks

  1. Click Add tag (or Tags, then New).
  2. Choose the tag type Google Tag and paste your GA4 Measurement ID (G-XXXXXXXXXX) as the Tag ID.
  3. Choose the trigger Initialization - All Pages.
  4. Name it "GA4" and click Save.

Some tools add themselves. When I installed Microsoft Clarity, it detected Tag Manager, asked me to pick the container, and created and published its own tag in one click. The full walkthrough is in my guide to the 5 website tracking tools.

Step 6: Preview, then publish

Preview first

  1. Click Preview at the top right of Tag Manager.
  2. Enter your website address and click Connect. Your site opens in a new tab with Tag Assistant connected.
  3. In the Tag Assistant tab, check that your tags are listed under Tags Fired. Click around your site to test click and page-specific triggers.

Google's preview and debug guide explains every panel.

Then publish

  1. Click the blue Submit button at the top right.
  2. Give the version a clear name, like "Add GA4" or "Book a call event". Tag Manager can suggest one for you.
  3. Click Publish.
Google Tag Manager Submit Changes screen with the version name field and Publish button highlighted
Name the version (1), then Publish (2). Measurement ID and email blurred.

Each publish becomes a numbered version under Versions. If a change breaks something, open the last working version and publish it again. That is your undo button.

How to create an event in Google Tag Manager (button clicks and forms)

An event is an action you want to count, like a click on "Book a call". Here is the setup I use, with GA4 already installed through Tag Manager.

1. Switch on click variables (once)

  1. Go to Variables, then Configure under Built-In Variables.
  2. Tick Click Text, Click URL, Click ID and Click Classes.

2. Create the trigger

  1. Go to Triggers, New, and choose Click - All Elements (or Click - Just Links if the button is a link).
  2. Select Some Clicks and set a condition, for example Click Text equals Book a call.
  3. To count it only on one landing page, add a second condition: Page Path equals your page.
  4. Name it "Click - Book a call" and save.

3. Create the GA4 event tag

  1. Go to Tags, New, and choose Google Analytics: GA4 Event.
  2. Enter your Measurement ID and an Event name in lowercase with underscores, for example book_call_click.
  3. Choose the trigger you just made, and save.
  4. Preview to test the click, then Submit and Publish.

For a form, use the Form Submission trigger type in the same way, or count visits to your thank-you page with a page-specific trigger, which is more dependable on most websites.

Finally, tell GA4 this event is a lead: in GA4, go to Admin, Data display, Events, and mark book_call_click as a key event. It appears in that list once it has fired at least once, usually within 24 hours. Google's key events guide covers the details.

How to add schema markup with Google Tag Manager

Schema markup is structured data, a short block of code that tells Google exactly what a page is about: your business, an FAQ, a product, an event. The best place for it is the page code itself. When you cannot edit the page (common on locked themes and some website builders), Tag Manager can add it.

  1. Write your schema as JSON-LD. Google's documentation has examples for every type.
  2. In Tag Manager, go to Tags, New, and choose Custom HTML.
  3. Paste the schema inside a script tag, like this:
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Your Business Name",
  "url": "https://yourdomain.com/"
}
</script>
  1. Choose the trigger: All Pages for sitewide schema like your Organization, or a page-specific trigger (Page Path equals) for page schema like an FAQ.
  2. Preview, then Submit and Publish.
  3. Test the page in Google's Rich Results Test to confirm Google can read it.

The honest trade-off: Google reads schema added through Tag Manager, and its own documentation covers this method. But schema added by JavaScript is invisible to tools that do not run JavaScript, which includes many AI crawlers. If you can put schema in the page code, do that. Use Tag Manager when you cannot.

How to check Google Tag Manager is working (3 ways in 2 minutes)

  1. Page source: open your website, right-click, choose View Page Source, and search for GTM-. You should find your container ID twice, once in the head and once in the body.
  2. Preview: click Preview in Tag Manager and confirm your tags fire on the page.
  3. GA4 Realtime: visit your site on your phone using mobile data and watch yourself appear in GA4, Reports, Realtime, within a minute.

6 common Google Tag Manager mistakes

MistakeWhat happensFix
Saved but never publishedNothing tracks, though the tag "exists"Check Workspace Changes is 0 after every change
GA4 code pasted on the site and added in Tag ManagerEvery visit counted twiceKeep GA4 in Tag Manager only
Code added to the homepage onlyOther pages are not trackedAdd it to the site template, so every page gets it
Code pasted into a WordPress theme fileDisappears on the next theme updateUse a plugin or a child theme
Tag on All Pages that belongs to one pageInflated conversions and wrong dataUse a page-specific trigger
Account created by the agencyYou lose tracking when the contract endsCreate it on your business account, share access

Want Tag Manager set up properly, with your events and schema, on your business account? Book a 30-minute call.

Frequently asked questions

Is Google Tag Manager free?

Yes. Google Tag Manager is free for websites of any size. There is a paid version, Tag Manager 360, for large enterprises, but a business website does not need it.

Do I need coding skills to install Google Tag Manager?

No. You copy 2 pieces of code and paste them into your website once, or use your platform's built-in Tag Manager setting. After that, everything happens inside Tag Manager with forms and dropdowns.

What is the difference between Google Tag Manager and the Google tag (gtag.js)?

The Google tag is the code for Google products only, like GA4 and Google Ads. Tag Manager is a container that can hold the Google tag and any other tool. If you use Tag Manager, put GA4 inside it and do not paste the Google tag on your site as well, or every visit is counted twice.

Can I use Google Tag Manager with a Google Analytics plugin?

Only if the plugin is not also sending data to GA4. If both send pageviews, every visit is counted twice. Pick one: either the plugin or Tag Manager, never both.

Does Google Tag Manager slow down my website?

Tag Manager itself is light. What slows a site down is what you put inside it: every extra pixel and script adds weight. I cover the trade-off in why my own website was slow.

What about cookie consent?

If you have visitors from the UK or EU, use a cookie consent banner and turn on Google Consent Mode, so your tags respect each visitor's choice. Most consent banner tools have a ready-made Tag Manager template.

Who should own the Google Tag Manager account?

Your business, always. Create it with a Google account your company controls, then add your agency or developer as users. If the agency creates it on their own login, you lose your tracking the day the contract ends.

Install it once, then never touch your site code for tracking again

Tag Manager takes 10 minutes and saves you from a developer request every time you want to track something new. Create it on your business account, paste the code once, share access with the right roles, and remember that nothing is live until you publish.

Next, put Google Analytics 4 inside it. For the other 4 free tools every new website needs, read my guide to the 5 website tracking tools.

Posted in Website Setup

Share this article

Want this done for you?

In 30 minutes I will check your Tag Manager setup, who owns it, and what it is tracking, and tell you what to fix first. No pitch.

Book a 30-minute call
In their words

What clients say after working with me

Faith Alayon
Faith Alayon
Operations Leader, Level Up
SEO in the AI Age

"Anyone looking for serious SEO expertise in the AI age would do well to have her in their corner."

Read full review →
Dr. Akhil Shahani
Dr. Akhil Shahani
MD, Shahani Group
AI Search Visibility

"We briefly worked with Shikha and her team at CrazyDi to improve the appearance of our website's AI search. I found them to be very knowledgeable and responsive to our company's needs."

Read full review →
Mayank Kumar
Mayank Kumar
Performance Marketing Specialist, Godrej Properties Limited
Owned the SEO Agenda

"Shikha has been an exceptional SEO partner and someone who truly took ownership of the entire SEO agenda."

Read full review →
Dr. Deepak Garg
Dr. Deepak Garg
Eye Solutions
3× Organic Growth

"Traffic grew from 10,000 to 30,000+ monthly visits, and a 3x boost in visibility within just a year."

Hoshang Jehangirji
Hoshang Jehangirji
Experiential marketing and brand-led events
Ownership & Consistency

"Shikha is one of those rare people who make you feel that your work matters to them as much as it matters to you."

Read full review →
Simran Purswani
Simran Purswani
Tritorc
Strategy & Coaching

"Someone who understands both the human and analytical sides of marketing."

Read full review →
Monaz Cooper
Monaz Cooper
Marketing Director, Amfico Agencies Pvt. Ltd.
B2B Marketing Partner

"She is still an integral part of my extended team and I look forward to all her valuable inputs and suggestions!"

Read full review →
Get in touch

Tell me where you want to be found

Share a little about your brand and what you're trying to grow. I read every message and reply personally, usually within a day.