sandywp / plugins / gtm-kit

GTM Kit

Google Tag Manager & GA4 integration

4.8 out of 5 stars. 4.8 20 reviews

Google Tag Manager and GA4 integration. Including WooCommerce data for Google Analytics 4 and support for server side GTM.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.18.1 30,000+ installs WP 6.9+ PHP 7.4+

your-sandbox.sandywp.com/wp-admin
GTM Kit – Google Tag Manager & GA4 integration running inside a SandyWP sandbox

What you get inside

7 screens
  • GTM Kit Dashboard

  • Setup: container code, server-side GTM, and page exclusions

  • Events & data layer: post data and GA4 events

  • Consent & privacy: Google Consent Mode and CMP script attributes

  • Commerce: WooCommerce and Easy Digital Downloads tracking

  • Tools: import settings from another Google Tag Manager plugin

  • Site Health: GTM Kit's container and consent checks

About this plugin

GTM Kit puts the Google Tag Manager container code on your website so that you don’t need to touch any code. It also pushes data from WooCommerce, Easy Digital Downloads (EDD) and Contact Form 7 to the data layer for use with for Google Analytics 4, Facebook and other GTM tags.

The goal of GTM Kit is to provide a flexible tool for generating the data layer for Google Tag Manager. It is easy to use and doesn’t require any coding, but it allows developers to customize the plugin as needed.

The settings are organised around what you are trying to do (Setup, Events & data layer, Commerce, Consent & privacy, and Tools), so related options live together and the setting you need is quick to find.

Know when your tracking breaks

Tracking fails quietly. A caching plugin strips the container out of the page, a second plugin loads it a second time, a staging copy reports into your live property, and nothing on the settings screen says so.

GTM Kit checks one of your own pages once a day, the way a visitor receives it, and tells you when nothing on your site is loading your container, or when your pages load tracking twice. Where it recognises the plugin or tool adding the second copy, it names it.

Two checks in WordPress’s own Site Health screen report whether your container is set up and reaching your pages, and whether consent is configured. A GTM Kit section on the Info tab lists your whole configuration on one screen and copies it into a support request with one click.

On sites WordPress reports as staging, development or local, GTM Kit leaves the container out, so test traffic never reaches your live analytics. The data layer is still built there, and a setting loads the container anyway when you are measuring a test site on purpose.

eCommerce events tracked with Google Analytics 4

The following GA4 events are automatically included in the dataLayer:

WooCommerce

  • view_item_list
  • select_item
  • view_item
  • add_to_wishlist [Premium]
  • add_to_cart
  • view_cart
  • remove_from_cart
  • begin_checkout
  • add_shipping_info
  • add_payment_info
  • purchase
  • refund [Premium]
  • order_paid [Premium]
  • order_processing [Premium]
  • order_completed [Premium]
  • order_refunded [Premium]
  • subscription_started [Premium]

Unlock all features with GTM Kit Premium.

Easy Digital Downloads

  • view_item
  • add_to_cart
  • begin_checkout
  • purchase

Flexible container implementation

Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle. This may be relevant to you be if are focusing on pagespeed.

You may enter a custom domain name if you are using a custom server side GTM (sGTM) container for tracking. It’s also possible to specify a custom loader. GTM Kit has full support for Stape server GTM hosting.

You can also exclude specific pages from GTM entirely. Add URL patterns on the Container settings page and GTM Kit holds back the container, the noscript fallback, and its data layer scripts on matching pages. Useful for third-party checkout iframes, partner-hosted subpages, and in-app webview routes that run their own tracking. Glob patterns are supported by default, with optional regex for advanced matching.

Moving from another Google Tag Manager plugin

GTM Kit imports settings from Google Tag Manager for WordPress, Google Tag Manager for WooCommerce, Metronet Tag Manager and other GTM plugins, at any time, from the Tools page. Your container ID, data layer variables, Consent Mode defaults, excluded user roles and container environment come across in one step.

Before anything is written you see exactly which of your settings will be replaced, and only settings the other plugin actually configured are touched.

Post data

You may specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.
– Post type: include the type of the current post or archive page.
– Page type: include a defined page type. I.e. post, page, product, category, cart, checkout etc.
– Categories: include the categories of the current post or archive page.
– Tags: include the tags of the current post or archive page.
– Post title: include the post title of the current post.
– Post ID: include the Post ID of the current post.
– Post date: include the post date.
– Post author name: include the post author name.
– Post author ID: include the post author ID.

Questions

Where do I get a GTM Container ID?

Create an account and container in Google Tag Manager and get it there.

Is Google Analytics 4 (GA4) supported?

Yes! We strive to support the full feature set of Google Analytics 4 and will implement any future features of Analytics 4.

Is this plugin cache friendly?

Yes! Pagespeed is one of our main focus points, and we strive to make the plugin compatible with full page caching.

How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.

4.8

20 reviews

  • 5 ★ 19
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 1

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.