If you have ever pasted a tracking snippet into your theme, lost it after an update, or waited days for a developer to add a single pixel, Google Tag Manager (GTM) solves that. You install one container on your site once, then manage every tag from the GTM dashboard. Nothing else touches your theme files again.
Why use Google Tag Manager?
- One place for every tag. GA4, Google Ads, Meta Pixel, LinkedIn, Hotjar and more, all managed from GTM.
- No code, no theme edits. Add or change tags without editing WordPress files, so a theme update never wipes your tracking.
- Faster, safer changes. Preview a change before it goes live, and roll back instantly if something breaks.
- Better page speed. Tags load through one lightweight container instead of a dozen separate scripts scattered through your site.
Before you start
You will need three things:
- Admin access to your WordPress site
- A Google account (the same one you use for Google Business Profile is ideal)
- About 20 minutes
Step 1: Create your Google Tag Manager account and container
- Go to tagmanager.google.com and sign in with your Google account.
- Click Create Account. Enter your business name and country.
- Under Container, enter your website domain and choose Web as the target platform.
- Click Create, then accept the terms of service.
- You will be shown two snippets of code and a container ID that looks like
GTM-XXXXXXX. Leave this tab open, you will need it in a moment.

Step 2: Add the GTM container to WordPress
You have two reliable options. Pick one.
Option A (recommended): the GTM4WP plugin
The free GTM4WP (Google Tag Manager for WordPress) plugin places the container correctly for you and adds a rich data layer, so GTM can "see" things like post category, author, logged-in status and WooCommerce purchases.
- In WordPress, go to Plugins > Add New, search for GTM4WP, then install and activate it.
- Go to Settings > Google Tag Manager.
- Paste your
GTM-XXXXXXXID into the Google Tag Manager ID field. - Set the container code placement to Codeless injection (or "Footer" if your theme blocks the default), then save.
Option B: a header and footer plugin (WPCode)
If you prefer to paste the official snippets yourself, use WPCode (formerly Insert Headers and Footers). In WordPress, you will find the header and footer settings under the plugin's menu.

- Open the plugin's Header & Footer settings.
- Paste the first GTM snippet into the Header box (it goes as high in the <head> as possible).
- Paste the second GTM snippet into the Body box (it goes immediately after the opening <body> tag).
- Save your changes.

<head>, one just after <body>.Step 3: Create your GA4 property and get the Measurement ID
- Go to analytics.google.com and sign in.
- In Admin (the gear icon), click Create > Property and follow the prompts for a GA4 property.
- Add a Web data stream for your site URL.
- Copy the Measurement ID. It starts with
G-(for exampleG-ABCDE12345).
Step 4: Connect GA4 to your site through GTM
- Back in Google Tag Manager, open your container and click Tags > New.
- Click Tag Configuration and choose Google Tag (shown as "Google Analytics: GA4 Configuration" in some accounts).
- Paste your
G-XXXXXXXXXXMeasurement ID into the Tag ID field. - Click Triggering and choose All Pages.
- Name the tag something clear like GA4 - All Pages and click Save.


Step 5: Test with Preview mode, then publish
- Click Preview in the top right of GTM and enter your website URL. Tag Assistant opens your site in a connected window.
- Browse a few pages. In the Tag Assistant panel, confirm your GA4 tag shows under Tags Fired.
- In Google Analytics, open Reports > Realtime and check that your own visit appears.
- Happy? Return to GTM and click Submit, add a version name, then Publish. Your tracking is now live.
What to add next
Once GA4 is firing, GTM makes it easy to layer on the tracking that actually informs decisions:
- Key event (conversion) tracking, for form submissions, calls and bookings.
- Google Ads conversion tags and remarketing.
- Meta Pixel and other advertising tags.
- Consent Mode v2, so your tags respect your cookie banner and stay compliant.
Frequently asked questions
Do I still need Google Analytics if I have Tag Manager?
Yes. They do different jobs. Google Analytics 4 collects and reports the data; Google Tag Manager is the delivery system that decides which tags fire and when. GTM sends data to GA4, it does not replace it.
Will Tag Manager slow down my website?
No, it usually speeds things up. GTM loads asynchronously and lets you manage many tags through one lightweight container, instead of hard-coding several separate scripts that each block rendering.
Can I remove the Google site tag (gtag.js) once GTM is set up?
If you added GA4 directly with the gtag.js snippet earlier, remove it after you move GA4 into GTM. Running both at once double-counts your traffic.
Which plugin is best for adding GTM to WordPress?
For most local businesses we recommend GTM4WP, because it adds a data layer that unlocks richer tracking with no code. If you only need to paste the raw snippets, WPCode is a clean, lightweight alternative.
Want this set up properly, without the guesswork?
We set up GA4, Tag Manager and conversion tracking for Newcastle businesses every week, so you can see exactly where your leads come from. Get a free, no-obligation audit of your current setup.
