PHPackages                             tlamedia/gtm-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tlamedia/gtm-kit

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

tlamedia/gtm-kit
================

Development files for the GTM Kit

2.16.4(5d ago)173.0k5[3 issues](https://github.com/tlamedia/gtm-kit/issues)GPL-3.0-or-laterJavaScriptPHP ^7.4CI passing

Since Sep 6Pushed 5d ago3 watchersCompare

[ Source](https://github.com/tlamedia/gtm-kit)[ Packagist](https://packagist.org/packages/tlamedia/gtm-kit)[ Docs](https://gtmkit.com/)[ RSS](/packages/tlamedia-gtm-kit/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (76)Versions (106)Used By (0)

GTM Kit
=======

[](#gtm-kit)

[![WordPress Plugin Version](https://camo.githubusercontent.com/31b03a5b7c0561910cddcc288c6b45f2c5bae2e1802858f987dd4b311656044b/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f67746d2d6b69743f6c6162656c3d776f726470726573732e6f7267)](https://wordpress.org/plugins/gtm-kit/)[![License: GPL v3](https://camo.githubusercontent.com/6b8d7ad7a3702389f74a27a2f5b0ab9e9b7774aee6b03ce273edce1096f90ac8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c76332d626c75652e737667)](https://www.gnu.org/licenses/gpl-3.0.html)

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:**
- **WordPress.org:**
- **User documentation:**

Highlights
----------

[](#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
------

[](#add-on)

GTM Kit is the free core. **GTM Kit Woo** extends it with advanced WooCommerce tracking and is available on the [WooCommerce marketplace](https://woocommerce.com/products/gtm-kit-woo-add-on/). It requires this plugin.

Installation
------------

[](#installation)

For end users, install from the [WordPress plugin directory](https://wordpress.org/plugins/gtm-kit/) or search for "GTM Kit" under **Plugins → Add New** in wp-admin.

To run from source:

```
composer install
npm ci
```

Development
-----------

[](#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

[](#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

[](#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](tests/README.md) for prerequisites, one-command setup, and how to run each suite.

Contributing
------------

[](#contributing)

Found a bug or have a feature idea? [Open an issue](https://github.com/tlamedia/gtm-kit/issues?state=open). Pull requests are welcome.

License
-------

[](#license)

GPLv3 or later. See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.html).

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance96

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~4 days

Total

105

Last Release

5d ago

Major Versions

1.23.3 → 2.02024-09-11

PHP version history (3 changes)1.0PHP ^7.2 || ^8.0

2.0PHP ^7.4 || ^8.0

2.9.0PHP ^7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36225888?v=4)[TLA Media](/maintainers/tlamedia)[@tlamedia](https://github.com/tlamedia)

---

Top Contributors

[![TorbenLundsgaard](https://avatars.githubusercontent.com/u/15211444?v=4)](https://github.com/TorbenLundsgaard "TorbenLundsgaard (783 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (6 commits)")[![StefanHolmes](https://avatars.githubusercontent.com/u/21371956?v=4)](https://github.com/StefanHolmes "StefanHolmes (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tlamedia-gtm-kit/health.svg)

```
[![Health](https://phpackages.com/badges/tlamedia-gtm-kit/health.svg)](https://phpackages.com/packages/tlamedia-gtm-kit)
```

###  Alternatives

[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1841.1M18](/packages/consistence-consistence)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
