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

ActiveSilverstripe-vendormodule

toastnz/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.0.3(3y ago)01BSD-3-ClausePHP

Since Aug 5Pushed 3y agoCompare

[ Source](https://github.com/toastnz/ga-gtm-singlefield)[ Packagist](https://packagist.org/packages/toastnz/ga-gtm-singlefield)[ RSS](/packages/toastnz-ga-gtm-singlefield/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1377d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49888163?v=4)[Leandro Palmieri](/maintainers/leandro-toastnz)[@leandro-toastnz](https://github.com/leandro-toastnz)

---

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)")[![webdough](https://avatars.githubusercontent.com/u/5546430?v=4)](https://github.com/webdough "webdough (1 commits)")

---

Tags

googlesilverstripeGoogle Tag Managergoogle-analyticsgtmga

### Embed Badge

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

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

###  Alternatives

[magepal/magento2-googletagmanager

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

2671.5M4](/packages/magepal-magento2-googletagmanager)[cyber-duck/silverstripe-google-tag-manager

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

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

PHPackages © 2026

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