
The Safe, Maintained Way to Add Google Tag Manager to WordPress
Looking for the old “WP Google Tag Manager” plugin? WordPress.org closed it in July 2023 because of a security issue, and it should not be used.
GTM4WP (Google Tag Manager for WordPress) is the actively maintained replacement most sites use. It installs your Google Tag Manager container correctly and adds a rich data layer for GA4, Google Ads and other tags.
If you still have the old plugin installed, remove it and switch to GTM4WP.
Developer: Thomas Geiger
Platform: WordPress plugin
Category: Analytics & Tag Management
Official Website: https://wordpress.org/plugins/duracelltomi-google-tag-manager/
Free in the WordPress plugin directory. Requires PHP 8.0 and WordPress 6.3 or newer.
Reviewed by Jon Crain, founder of Pittsburgh SEO Services (in digital marketing since 2001). Last updated November 2026.
What Is GTM4WP?
GTM4WP is a free WordPress plugin that places your Google Tag Manager container code on every page, so you do not have to edit theme files. WordPress.org lists more than 700,000 active installations.
It also pushes page details and visitor information into the GTM data layer, such as post type, categories, author, logged-in status and WooCommerce product and order data.
That data lets you build accurate GA4, Google Ads and Meta tags inside Google Tag Manager without custom code.
Key Features of GTM4WP
Correct Container Placement
Adds the GTM head and body snippets the way Google recommends.
Multiple Containers
Supports more than one container, with environments, custom domains and paths.
Rich Data Layer
Sends page type, categories, tags, author and user data to GTM.
WooCommerce Tracking
Pushes ecommerce events for GA4 and Google Ads conversion tracking.
Form & Scroll Events
Helps track form submissions, outbound links and engagement.
Actively Maintained
Regular updates for current WordPress and PHP versions.

How to Get Started With GTM4WP
- Remove the old “WP Google Tag Manager” plugin if it is still installed.
- In WordPress, go to Plugins → Add New, search for “GTM4WP” and install and activate it.
- Open Settings → Google Tag Manager and paste your container ID (GTM-XXXXXXX).
- Choose the data layer options you need, such as WooCommerce events.
- Remove any hand-pasted GTM or GA4 code from your theme so tags do not fire twice.
- Use GTM Preview mode to confirm tags fire correctly, then publish your container.
Why Google Tag Manager Matters for SEO and Ads
Tag Manager lets you add and change tracking without editing your website code every time.
Accurate tracking tells you which pages, keywords and ads bring calls, forms and sales, so you can invest where it pays off.
Using a maintained plugin like GTM4WP also avoids the security risk of abandoned plugins.
GTM4WP & AI Search Visibility
AI search is changing where visitors come from.
With GTM and GA4 set up correctly, you can track visits and conversions from ChatGPT, Perplexity, Gemini and Google AI Overviews and see which pages they land on.
That data helps you decide which content to expand for AI visibility.
GTM4WP vs. Site Kit by Google
Site Kit can also add Google Tag Manager, along with Search Console and GA4 reports.
GTM4WP focuses only on Tag Manager but adds a much richer data layer, including WooCommerce ecommerce data.
Pick one method to add GTM so the container is not loaded twice.
Common Problems to Avoid
Using the Closed Plugin
Remove the old WP Google Tag Manager plugin, which was closed for a security issue.
Loading GTM Twice
Do not add GTM through both GTM4WP and Site Kit or your theme.
Publishing Without Preview
Always test in GTM Preview mode before publishing changes.
Tracking Without Consent
Set up consent mode where privacy laws require it.
Frequently Asked Questions
What happened to WP Google Tag Manager?
WordPress.org closed it on July 27, 2023 because of a security issue. It is no longer available or safe to use.
Is GTM4WP free?
Yes. It is free in the WordPress plugin directory.
Does GTM4WP work with WooCommerce?
Yes. It can push ecommerce events to the data layer for GA4 and Google Ads.
Do I still need Google Analytics?
Yes. GTM4WP installs Tag Manager, and you configure your GA4 tag inside Tag Manager.
Can I use GTM4WP with Site Kit?
Yes, but only add GTM through one of them.
How many sites use GTM4WP?
WordPress.org lists more than 700,000 active installations.
Download GTM4WP
Official Access: https://wordpress.org/plugins/duracelltomi-google-tag-manager/
About This Software Listing
This independent software resource is published by Pittsburgh SEO Services LLC, a digital marketing and SEO company founded by Jon Crain in 2001.
We share marketing tools and website optimization resources to help business owners understand search marketing, local SEO and AI search visibility.
Need help turning research into rankings?
Explore our Pittsburgh SEO Services or contact us.
Phone: 412-250-7965
GTM4WP is developed and maintained by Thomas Geiger. Pittsburgh SEO Services LLC is an independent software directory publisher and is not affiliated with Thomas Geiger.
