Back to plugin directory
#79 rankedTier S

GTM4WP – A Google Tag Manager (GTM) plugin for WordPress

By Thomas Geiger

View on WordPress.org
Active installs700K+
WP Rank score90.7
Rating4.5 / 5
Reviews155
Version2.1.1
Last updatedNov 5, 2026

Overview

This plugin places Google Tag Manager on a WordPress site and adds page, user, and site information to the data layer. It also covers embedded-media events, tag security controls, and integrations for forms and WooCommerce.

GTM4WP – A Google Tag Manager (GTM) plugin for WordPress is ranked #79 among WordPress.org plugins by WP Rank with a score of 90.7. It has 700,000+ active installs and 16,852,233 total downloads. Users rate it 4.5 out of 5 across 155 reviews. It was downloaded 210,847 times in the last 15 days. The latest release (2.1.1) was published on Nov 5, 2026. It is tested up to WordPress 7.1.4 and requires PHP 8.0. 50% of its 12 support threads are resolved.

Install Trend

Based on the last 15 days of WordPress.org download stats.

210,847 downloads (15d)
10-2310-2410-2510-2610-2710-2810-2910-3010-3111-0111-0211-0311-0411-05
GTM4WP – A Google Tag Manager (GTM) plugin for WordPress

Compatibility

Requires WordPress6.3
Tested up to7.1.4
Requires PHP8.0
AddedSep 23, 2013

Description

GTM container placement and data-layer variables

GTM4WP handles both parts of the GTM container code and adds WordPress context to the data layer.

The head script is placed in the page head, while the fallback iframe has a separate placement option. Multiple containers can use their own environment parameters, custom domains, and paths. Placement for the iframe depends on theme or builder compatibility; compatible themes and builders can place it correctly, while other sites can use a manual PHP option or a lower footer placement. Check this setting against your theme to avoid placing the fallback in the wrong location.

The data layer can include page and post titles, dates, categories, tags, authors, IDs, and content details, as well as taxonomy, search, site, and logged-in user data. Visitor IP data is also available, but requires explicit consent before use.

Media-player interaction tracking

The plugin can send data-layer events for interactions with a broad range of embedded media.

Supported players include YouTube, Vimeo, SoundCloud, HTML5 audio and video, Dailymotion, Mixcloud, Cloudflare Stream, Wistia, JW Player, VideoPress, Spotify, and Twitch. Events can be configured for load, play, pause, and stop, with optional progress events at 10% intervals; GTM’s built-in video variables are populated for those events. This gives site owners a way to measure engagement beyond page views.

Players inserted after the page loads, such as in a popup or through AJAX, can be tracked with the dynamic-player option. Browser and device detail varies: Safari and Firefox expose less information than Chromium-based browsers, so reports may not be equally detailed across visitors.

Security controls and plugin integrations

Allowlisting and blocklisting can restrict what GTM is permitted to run, while integrations add form and commerce events.

  • Tag Manager safeguards: Allowlist or blocklist tags, triggers, and variables. Blocklisting can prevent custom HTML tags, custom JavaScript variables, and sandboxed scripts from running, which can limit risks if a GTM account is compromised.
  • Contact Form 7: Send events for successful and unsuccessful submissions, with optional GA4 form events.
  • WooCommerce: Supports GA4 ecommerce, Enhanced Conversions user data on purchase events, and High Performance Order Storage. Supported blocks include Cart, Checkout, Mini-Cart, Product Collection, and cross-sell. Promotions are not supported, so sites measuring promotion interactions will need another approach.

WooCommerce purchase tracking needs careful configuration

Purchase events depend on customers reaching a page where the tracking code can run, and on WooCommerce’s order-received hooks remaining available.

  • Payment redirects: Some third-party gateways do not automatically return customers to the store after payment. Enabling auto-return in the gateway settings can send customers back to the thank-you page, improving the chance that purchase tags fire.
  • Altered confirmation pages: Plugins that change WooCommerce’s order-received page without supporting its expected hooks can prevent purchase events. Ask the plugin author to support the relevant WooCommerce behavior, or use GTM4WP’s custom confirmation page option.
  • Missed events: The reliable purchase tracking setting can emit a missed purchase event on the next page viewed in the same browser session. Both workarounds are de-duplicated, helping prevent an order from being counted twice.

A broad tracking toolkit with support resolution to watch

GTM4WP brings together detailed data-layer variables, media tracking, GTM safeguards, and form and WooCommerce integrations, but complex setups make support responsiveness worth weighing.

  • Scope: Its feature range suits sites that want WordPress context and interaction events available in GTM without adding container code manually.
  • Maintenance and rating: The plugin was updated within the past month and has an excellent rating based on a moderate number of reviews. Those signals are encouraging, but do not by themselves establish how well a particular configuration will work.
  • Support record: Of 14 support threads, 57% were resolved. The unresolved share is a reason to consider how much help a complex tracking setup may require before relying on the plugin for critical measurement.