If you’re diving into digital marketing or SEO, you’ll often hear people talk about Google Tag Manager (GTM). At first, it sounds technical and intimidating — but trust me, it’s easier than it sounds.
When I first learned how to install Google Tag Manager, I realized it’s a game-changer for tracking events, clicks, pageviews, and more — without needing to touch the website code again and again.
Let me break it down step-by-step so you can confidently install GTM on your website and start using it like a pro.
What Is Google Tag Manager?
Google Tag Manager (GTM) is a free tool by Google that allows you to add, manage, and update marketing and analytics tags on your website — all from a simple dashboard.
Instead of adding separate codes for Google Analytics, Facebook Pixel, conversion tracking, etc., you just place one GTM code on your site and manage everything from inside Tag Manager.
What You Need Before You Start
-
A Google account
-
Access to your website’s HTML or CMS (like WordPress, Wix, etc.)
-
Basic idea of where to paste code (we’ll walk through that)
Step-by-Step: How to Install Google Tag Manager on a Website
Step 1: Create a Google Tag Manager Account
-
Click “Create Account”
-
Add your:
-
Account Name (e.g., your brand or company name)
-
Container Name (your website domain)
-
Choose Web as the target platform
-
-
Click Create and accept the terms
You’ll now get two snippets of code — these need to go on your website.
Step 2: Add GTM Code to Your Website
You’ll see two code snippets:
-
Code #1 (Head): Goes in the
<head>
tag of your site -
Code #2 (Body): Goes immediately after the opening
<body>
tag
If You Use a Custom HTML Website:
-
Open your website’s HTML files
-
Paste the first code snippet in the
<head>
section -
Paste the second snippet right after the
<body>
tag -
Save and upload the changes
If You Use WordPress:
Option 1: Use a Plugin (Recommended for Non-Coders)
Install and activate a plugin like:
-
“Insert Headers and Footers”
-
“Google Tag Manager for WordPress”
Then, paste the GTM container code in the plugin settings (under header and body).
Option 2: Edit Theme Files (Advanced)
-
Go to Appearance > Theme File Editor
-
Edit
header.php
to add both code snippets (use with caution)
If You Use Wix or Shopify:
-
Both have built-in options for adding GTM
-
In Wix, go to Settings > Custom Code > Add GTM to Header & Body
-
In Shopify, use Online Store > Themes > Edit Code and paste snippets into theme.liquid
Step 3: Verify Installation
To check if GTM is installed correctly:
-
Use Google Tag Assistant Chrome extension
-
Or, open your site and look in the page source (right-click > View Page Source), and search for
GTM-XXXXXX
If the code is there, you’re good to go!
What’s Next After Installing GTM?
Once installed, you can:
-
Add Google Analytics 4 via GTM
-
Set up event tracking (like button clicks, video plays, scrolls)
-
Track conversions and send data to tools like Google Ads or Meta Ads
-
Control all your tags without asking a developer every time
Why I Recommend Using GTM
As a fresher, GTM helped me:
-
Learn about how different tools connect with a website
-
Track detailed user behavior
-
Save time and reduce coding errors
-
Feel more confident managing tracking tools
Quick Recap
Step | What You Do |
---|---|
1 | Create a GTM account |
2 | Get your container code |
3 | Add code to your website (head + body) |
4 | Verify the setup |
5 | Start managing tags from the GTM dashboard |
Installing Google Tag Manager may seem technical at first, but once you do it once — you’ll never want to go back. It’s the ultimate toolbox for marketers, especially if you want to track results without relying on developers for every small change.
And the best part? It keeps your site organized and future-proof.
Need help with setting up your GTM container or want to connect it with other tools like GA4 or Google Ads? Drop in the comments below— happy to share what I’m learning!