⭐ How to Add Your Blogger Site to Google Tag Manager (GTM) and Insert the HTML Tags into <head> and <body>
A complete SEO-optimized guide for fast AdSense approval and accurate GA4 tracking.
1. Introduction: Why You Must Install GTM Before GA4 Tracking
Google Tag Manager (GTM) is the most reliable and scalable way to manage tracking codes on a Blogger site.
Instead of placing multiple scripts manually, GTM allows you to:
- Install GA4 Measurement ID
- Add future tags without editing HTML again
- Improve loading speed & SEO
- Support Google AI indexing (cleaner HTML = better parsing)
This tutorial shows you how to:
- Create a GTM account
- Generate GTM installation codes
- Insert one tag into
<head>and another into<body> - Avoid common HTML errors in Blogger
This setup is required before the next tutorial:
👉 “Add GA4 Measurement ID in GTM & Publish Tags to Enable Real-Time Tracking”
2. Create a New GTM Account for Your Blog
Step 1 — Open Google Tag Manager
Go to: https://tagmanager.google.com
Click Create Account.
3. Fill Out Account and Container Settings
Enter:
- Account Name → unicosmos
- Country → South Korea
- Container Name → your domain (e.g., unicosmos.pe.kr)
- Target Platform → Web
Then click Create.
4. Accept the Google Tag Manager Terms
Select your language → Click Yes.
5. Copy Your GTM Installation Codes
You will now see two required code blocks:
Code 1 — Goes inside <head> (as high as possible)
This is the main GTM script.
Code 2 — Goes immediately after <body>
This is the noscript backup tag.
⭐ Important Blogger HTML Warning (READ CAREFULLY)
Blogger automatically escapes certain characters such as:
If you paste the GTM code without modification, Blogger will throw an XML error:
✔ Fix
Replace &l → & before pasting into the HTML editor.
After saving, Blogger may automatically convert characters again —
this is normal and not an error.
6. Open Blogger Theme HTML Editor
Go to: Blogger → Theme → ⠇Menu → Edit HTML
7. Insert GTM Code Into <head> Section
Paste Code 1 right under the <head> tag.
If you see errors, check the first characters of the script:
❗ Replace &l → &
✔ Save again
✔ Errors disappear
✔ Blogger auto-converts characters correctly
8. Insert the Second GTM Code Right After <body>
Use Ctrl + F and search for: <body>
Paste Code 2 immediately below it.
9. GTM Installation Completed
Your Blogger site now contains:
✔ <head> GTM script
✔ <body> noscript fallback
✔ Clean HTML readable by Google AI and SEO crawlers
⭐ What’s Next?
The next two high-value SEO tutorials:
✅ 1. Add GA4 Measurement ID in Google Tag Manager (Next Tutorial)
- Create a GA4 configuration tag
- Insert Measurement ID (G-XXXXXXX)
- Trigger: All Pages
- Publish & test in real-time report
✅ 2. Verify Real-Time Tracking in GA4
- Check live visitors
- Confirm GTM container is working
