GTM4WP icon
Analytics & Tracking

GTM4WP

Advanced tag management for WordPress with Google Tag Manager

  • By Thomas Geiger
  • v2.1.1 New
  • Updated

Overview

GTM4WP describes itself as: “Advanced tag management for WordPress with Google Tag Manager”

It is active on 700,000+ WordPress sites and rated 4.5 out of 5 by 155 users on WordPress.org. Developers can extend it through 1 actions and 41 filters, listed below.

We haven't published a hands-on review of GTM4WP yet. Want one, or need help with it? Send us a request.

How to install GTM4WP

  1. Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
  2. Search for it. Type “GTM4WP” and pick the one by Thomas Geiger.
  3. Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI

Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:

wp plugin install duracelltomi-google-tag-manager --activate

Requirements: WordPress 6.3+ · PHP 8.0+ · tested up to WordPress 7.1.4

Hooks & customisation

GTM4WP 2.1.1 fires 1 actions and 41 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.

duracelltomi-google-tag-manager — top hooks
// Applying WooCommerce's own woocommerce_cart_item_product filter here is essent…
apply_filters( 'woocommerce_cart_item_product', $cart_item_data['data'], $cart_item_data, $cart_item_id );

// Filters the documentation URL of a module or an option, so a third party modul…
apply_filters( 'gtm4wp_admin_doc_url', $url, $path, $anchor );

// Filters the order statuses whose orders are eligible for the purchase event.
apply_filters( 'gtm4wp_edd_purchase_trackable_statuses', $statuses, $order );

// Filters whether GTM4WP may request a third-party media player SDK.
apply_filters( 'gtm4wp_media_sdk_blocked', false );

// Filters the language code reported for the current page.
apply_filters( 'gtm4wp_page_language', $page_language );

// Filters the list of post author IDs output into the data layer on a post with…
apply_filters( 'gtm4wp_page_post_author_ids', $author_ids, $multiple_authors );

Browse all 42 hooks with examples →

Need GTM4WP customised?

Tell us what you want changed, added or fixed and we'll reply with an estimate.

WP EXPERTS is independent and not affiliated with Thomas Geiger. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.

Alternatives in Analytics & Tracking

See all →

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful…

5+ million installs 91 hooks

The best free Google Analytics plugin for WordPress. See how visitors find and use your website so you can grow…

2+ million installs Reviewed 186 hooks
CookieYes icon

CookieYes

3,238

Google-certified CMP: cookie banner, cookie notice and cookie consent for GDPR/CCPA compliance, with cookie blocker, cookie scanner and consent log.

1+ million installs Reviewed 82 hooks

Publish your cookie banner or notice in minutes. Automatically scan cookies, and create policies to align with GDPR, CCPA, and…

1+ million installs 184 hooks