PHPackages                             lukasbecker/kirby3-gtm - 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. lukasbecker/kirby3-gtm

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

lukasbecker/kirby3-gtm
======================

Integrate Google Tag Manager into your kirby site

1.2.0(2y ago)139MITPHP

Since Mar 21Pushed 2y agoCompare

[ Source](https://github.com/lukas-becker-eu/kirby3-gtm)[ Packagist](https://packagist.org/packages/lukasbecker/kirby3-gtm)[ GitHub Sponsors](https://github.com/lukas-becker.eu)[ RSS](/packages/lukasbecker-kirby3-gtm/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Google Tag Manager for kirby 3
==============================

[](#google-tag-manager-for-kirby-3)

Integrate Google Tag Manager tracking code into your kirby 3 site

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

[](#installation)

### Download

[](#download)

Download this repo, extract the files and copy them to `/site/plugins/gtm`.

### Composer

[](#composer)

`composer require lukasbecker/kirby3-gtm`

Usage
-----

[](#usage)

### Default behaviour

[](#default-behaviour)

To ensure that no data is collected during development this plugin is **inactive as default**.

You have to explicitely activate it via config option. We recommend to specify the activation in a domain specific configuration file, e.g. `/site/config/config.yourdomain.com.php`.

### Configuration

[](#configuration)

There are only three config options:

- Activation
- Google Tag Manager ID

```
return [
  'lukasbecker.kirby3-gtm.id' => 'GTM-XXXXXXX',
];

```

#### Panel fields

[](#panel-fields)

You can access two of them via panel. This plugin provides two panel fields. You can provide the plugin options via panel field in your `site.yml`:

```
fields:
  gtmId: fields/gtmId

```

### Use it in your templates/snippets

[](#use-it-in-your-templatessnippets)

Embed the JavaScript and non-JavaScript code pieces via Kirby's snippet() helper function.

1. Place the `gtm-script.php`-file as close to the opening `` tag as possible with ``
2. Place the `gtm-noscript.php`-file immediately after the opening `` tag with ``

### Multi-environment setup

[](#multi-environment-setup)

You can use this plugin in multi-environment setups. Place an individual Google Tag Manager ID per domain in the domain specific configuration file.

### DNT

[](#dnt)

One concrete way we commit to user privacy is by honoring Do Not Track (“DNT”) browser settings.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~160 days

Total

3

Last Release

830d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2576e360ed400bcfd95917c10ddc44d921a22b01694cc20d3b1a30618ec0590c?d=identicon)[lukasbecker](/maintainers/lukasbecker)

---

Top Contributors

[![lukasbecker-github](https://avatars.githubusercontent.com/u/48712121?v=4)](https://github.com/lukasbecker-github "lukasbecker-github (12 commits)")

### Embed Badge

![Health badge](/badges/lukasbecker-kirby3-gtm/health.svg)

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

###  Alternatives

[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[mzur/kirby-uniform

A versatile Kirby plugin to handle web form actions.

26068.3k13](/packages/mzur-kirby-uniform)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[thathoff/kirby-git-content

Plugin to track changes to content in a git repository.

15343.7k](/packages/thathoff-kirby-git-content)[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[tobimori/kirby-seo

The default choice for SEO on Kirby: Implement technical SEO &amp; Meta best practices with ease and provide an easy-to-use editor experience

10039.7k1](/packages/tobimori-kirby-seo)

PHPackages © 2026

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