This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Google

How To Install Google Tag Manager on Wordpress

Updated on:
May 8, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to install Google Tag Manager on your WordPress site.

Quick summary

This tutorial shows how to generate a Google Tag Manager code snippet and install it on a WordPress site using the Header Footer Code Manager plugin. It covers every step from creating a GTM account and container to pasting the header and footer scripts into WordPress.


Steps

  1. Go to the Accounts tab in Google Tag Manager and click Create Account.
  2. Enter your Account Name, such as your company name.
  3. Add a Container Name, such as your website's domain.
  4. Click Create to generate the new container.
  5. Hit Yes to view the generated code snippet.
  6. Click the copy icon to copy the body code from the snippet.
  7. Use the provided link if you need to view the code snippet again later.
  8. In WordPress, go to Plugins and click Add New Plugin.
  9. Use the search bar on the Add Plugins page to find the right plugin.
  10. Search for HFCM and install the Header Footer Code Manager plugin.
  11. After installing HFCM, find it in the left panel and click Add New.
  12. Create the first snippet and name it to indicate the GTM Header.
  13. Set the Location dropdown to Header for this snippet.
  14. Paste the header code from Google Tag Manager into the code box and click Save.
  15. Add a second snippet for the Footer, name it, and set the location dropdown to Footer.
  16. Paste the footer code into the code box and click Save.
  17. Verify that the Status for both added snippets is set to ON.

📌 Why this matters

Adding Google Tag Manager to a WordPress site allows marketers and developers to deploy and manage tracking scripts — such as analytics, conversion pixels, and remarketing tags — without editing theme files directly. Using the Header Footer Code Manager plugin to insert GTM's head and body snippets ensures the tag manager loads correctly on every page, maintaining full tracking coverage. This approach reduces reliance on developers for tag updates, accelerating campaign execution and reducing the risk of misconfigured scripts. Properly implementing GTM on WordPress is essential for accurate data collection, audience segmentation, and measurable digital marketing performance.
Your product deserves an interactive demo
Start free
Similar Articles
Google

How to Tell When You Subscribed to a YouTube Channel

Madhav Bhandari
Director of Marketing @ Storylane
Google

How to Unblock YouTube on Chrome

Madhav Bhandari
Director of Marketing @ Storylane
Google

How to Link a Chart from Google Sheets to Google Slides

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Buyer Hub
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Events & webinars
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it