PHPackages                             chrometoaster/ga-gtm-singlefield - 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. chrometoaster/ga-gtm-singlefield

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

chrometoaster/ga-gtm-singlefield
================================

Adds single field to CMS settings section to hold GA or GTM code. Template snippets need to be inserted to theme templates manually.

2.2.0(2y ago)07.7k4[1 issues](https://github.com/chrometoasters/ga-gtm-singlefield/issues)BSD-3-ClausePHPPHP 7.x || 8.x

Since Feb 6Pushed 2y ago9 watchersCompare

[ Source](https://github.com/chrometoasters/ga-gtm-singlefield)[ Packagist](https://packagist.org/packages/chrometoaster/ga-gtm-singlefield)[ RSS](/packages/chrometoaster-ga-gtm-singlefield/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (9)Used By (0)

GA/GTM single-field
===================

[](#gagtm-single-field)

Adds support for a single-field configuration of GA/GTM code within the CMS.
Comes with Google snippets that need to be included in your theme's templates.

Requirements
------------

[](#requirements)

- SilverStripe 4.0 and above

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

[](#installation)

### Module

[](#module)

```
$ composer require chrometoaster/ga-gtm-singlefield
```

Alternatively, you can also install the module manually by placing a copy to the root folder of your site.

Run dev/build either via opening the url `http:///dev/build` in a browser or by running the dev/build via a CLI.

### Theme integration

[](#theme-integration)

Place two template includes into your theme's main template, e.g. Page.ss.

#### Head

[](#head)

`` as close to the opening `` tag as possible:

```

    $Title

```

#### Body

[](#body)

`` directly after the opening `` tag:

```

```

Usage
-----

[](#usage)

You will see a new 'GA &amp; GTM' tab with a single field for a GA or GTM code under Settings in the CMS.
Insert a valid GA or GTM code and check if it's getting output to the resulting markup correctly.

Changelog
---------

[](#changelog)

For details of updates, bugfixes, and features, please see the [changelog](CHANGELOG.md).

TODO
----

[](#todo)

- Replace template includes with TemplateGlobalProvider or Controller function.
- Investigate options for automatically inserting the necessary tags to the markup, e.g. extending the $MetaTags functionality or using Requirements backend.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~394 days

Recently: every ~421 days

Total

7

Last Release

1067d ago

Major Versions

1.0.0 → 2.0.02018-12-20

PHP version history (3 changes)1.0.0PHP &gt;=5.4

2.0.0PHP ^7.1

2.1.0PHP 7.x || 8.x

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecb4eb65c3e34dc3384b0fcd0c2efb743ba7716df6b944802c96a50d4e10f550?d=identicon)[michalkleiner](/maintainers/michalkleiner)

---

Top Contributors

[![zarocknz](https://avatars.githubusercontent.com/u/7462446?v=4)](https://github.com/zarocknz "zarocknz (3 commits)")[![normann](https://avatars.githubusercontent.com/u/556224?v=4)](https://github.com/normann "normann (2 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (1 commits)")

---

Tags

analyticsgtmsilverstripegooglesilverstripeGoogle Tag Managergoogle-analyticsgtmga

### Embed Badge

![Health badge](/badges/chrometoaster-ga-gtm-singlefield/health.svg)

```
[![Health](https://phpackages.com/badges/chrometoaster-ga-gtm-singlefield/health.svg)](https://phpackages.com/packages/chrometoaster-ga-gtm-singlefield)
```

###  Alternatives

[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2691.6M5](/packages/magepal-magento2-googletagmanager)[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[cyber-duck/silverstripe-google-tag-manager

Add Tag Manager data layer, events, and ecommerce support for SilverStripe

1628.1k](/packages/cyber-duck-silverstripe-google-tag-manager)

PHPackages © 2026

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