tlamedia / gtm-kit
Development files for the GTM Kit
Package info
Type:wordpress-plugin
pkg:composer/tlamedia/gtm-kit
Requires
- php: ^7.4
Requires (Dev)
- brain/monkey: ^2.6
- easydigitaldownloads/easy-digital-downloads: ^3.6
- php-stubs/woocommerce-stubs: ^10.7
- phpcompatibility/phpcompatibility-wp: *
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpunit/phpunit: ^9.6
- szepeviktor/phpstan-wordpress: ^v2.0
- wp-coding-standards/wpcs: ^3.3
- yoast/phpunit-polyfills: ^1.1
- yoast/wp-test-utils: ^1.2
- dev-main
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.1
- 2.10.0
- 2.9.0
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0.1
- 2.1.0
- 2.0.1
- 2.0
- 1.23.3
- 1.23.2.1
- 1.23.2
- 1.23.1
- 1.23.0.1
- 1.23
- 1.22.5
- 1.22.4
- 1.22.3.1
- 1.22.3
- 1.22.2.1
- 1.22.2
- 1.22.1
- 1.22
- 1.21
- 1.20
- 1.19.1
- 1.19
- 1.18.1
- 1.18
- 1.17.2
- 1.17.1
- 1.17
- 1.16.2
- 1.16.1
- 1.16
- 1.15
- 1.14.2
- 1.14.1
- 1.14
- 1.13.1
- 1.13
- 1.12.2
- 1.12.1
- 1.12
- 1.11.1
- 1.11
- 1.10
- 1.9
- 1.8
- 1.7.1
- 1.7
- 1.6.2
- 1.6.1
- 1.6
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1.1
- 1.4.1
- 1.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3
- 1.2.1
- 1.2
- 1.1.1
- 1.1
- 1.0
This package is auto-updated.
Last update: 2026-05-31 17:47:06 UTC
README
Google Tag Manager and GA4 integration for WordPress, focused on flexibility and page speed.
GTM Kit places the Google Tag Manager container on your site, no code required, and pushes structured data to the dataLayer for use with GA4, Facebook, and any other GTM tag. It ships e-commerce tracking for WooCommerce and Easy Digital Downloads, plus form tracking for Contact Form 7, and gives developers hooks to customise everything.
- Website: https://gtmkit.com/
- WordPress.org: https://wordpress.org/plugins/gtm-kit/
- User documentation: https://gtmkit.com/documentation/
Highlights
- Zero-code container injection with optional delayed loading until the browser is idle, for page-speed-sensitive sites.
- Server-side GTM (sGTM) support, including custom domains, custom loaders, and full Stape compatibility.
- GA4 e-commerce tracking for WooCommerce and Easy Digital Downloads (view_item, add_to_cart, begin_checkout, purchase, and more).
- Per-page exclusion of the container and data layer via glob or regex URL patterns.
- Configurable post data in the data layer: post type, page type, categories, tags, and more.
- Developer-friendly: actions and filters to customise the data layer and container output.
Add-on
GTM Kit is the free core. GTM Kit Woo extends it with advanced WooCommerce tracking and is available on the WooCommerce marketplace. It requires this plugin.
Installation
For end users, install from the WordPress plugin directory or search for "GTM Kit" under Plugins → Add New in wp-admin.
To run from source:
composer install npm ci
Development
This repo holds the gtm-kit core plugin. Classes in src/ use PSR-4 autoloading via Composer; the entry point is gtm-kit.php.
Quality checks
Run these before committing PHP changes:
composer phpstan # Static analysis (level 6, bleeding edge) composer phpcs # Coding standards (WordPress-Extra + Docs) composer phpcbf # Auto-fix coding-standard issues
Tests
Three harnesses ship here: PHPUnit unit (no WordPress boot), PHPUnit integration (boots WordPress against a real DB), and Vitest for the JavaScript modules. See tests/README.md for prerequisites, one-command setup, and how to run each suite.
Contributing
Found a bug or have a feature idea? Open an issue. Pull requests are welcome.
License
GPLv3 or later. See LICENSE.