PHPackages                             sminnee/tagmanager - 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. [API Development](/categories/api)
4. /
5. sminnee/tagmanager

ActiveSilverstripe-vendormodule[API Development](/categories/api)

sminnee/tagmanager
==================

SilverStripe's server-side answer to Google/Adobe Tag Manager

0.1.x-dev(7y ago)513.6k6[10 issues](https://github.com/sminnee/silverstripe-tagmanager/issues)5BSD-3-ClausePHPCI failing

Since Jul 18Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/sminnee/silverstripe-tagmanager)[ Packagist](https://packagist.org/packages/sminnee/tagmanager)[ RSS](/packages/sminnee-tagmanager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (5)

SilverStripe Tag Manager
========================

[](#silverstripe-tag-manager)

SilverStripe's server-side answer to Google/Adobe Tag Manager!

SilverStripe tag manager provides a framework for adding programmatically-generated snippets of HTML to pages on your site. Examples include tracking codes for analytics and other packages and meta-tags.

To get full benefit of tag manager you should find or create modules that provide such snippets. CMS administrators can use the Tag Manager admin section to enable and configure these snippets.

Benefits
--------

[](#benefits)

- Developers of SilverStripe modules that add front-end snippets to each page can write less code
- Different snippets can be configured &amp; actvitated by CMS administrators
- Don't need to coordinate a developer release to get snippets added or removed
- Unused snippets can be disabled by the administrator, reducing page weight

Features
--------

[](#features)

- Add site-wide snippets
- Add section-specific or page-specific snippets (coming soon)
- Developers: Build custom snippets by implementing the SnippetProvider interface provided
- Control which snippet types are available

Out of the box the following snippets are available

- Raw HTML, added to the head or the end of the body
- Google Analytics
- Google Tag Manager
- [Crazy Egg](https://www.crazyegg.com/)

### Disabling Snippet Types

[](#disabling-snippet-types)

If you're a developer you may need to disable some of the snippet types you haven't tested or that your client explicitly doesn't want available in the CMS. You can do this via configuration:

```
SilverStripe\TagManager\Model\Snippet:
  disabled_types:
    - 'SilverStripe\TagManager\SnippetProvider\HtmlSnippetProvider'
    - 'SilverStripe\TagManager\SnippetProvider\CrazyEggSnippetProvider'
```

This will disable the HTML &amp; Crazy Egg snippets.

Add-on modules
--------------

[](#add-on-modules)

Tag Manager is only as useful as its extension modules, have a look at [modules that list it as a dependency](https://packagist.org/packages/sminnee/tagmanager/dependents) to get some inspiration!

Creating your own tag
---------------------

[](#creating-your-own-tag)

To create a new type of tag, you will need to write a PHP class that implements the `SilverStripe\TagManager\SnippetProvider` interface. A simple example is [GoogleAnalyticsSnippetProvider](src/SnippetProvider/GoogleAnalyticsSnippetProvider.php).

Your class will need the following methods for helping configure the admin UI:

- `getTitle()`: Return the title of this snippet provider for admin UIs
- `getSummary(array $params)`: Return a short description of the configured snippet. Params will be an map of param name =&gt; param value
- `getParamFields()`: Return a `FieldList` for configuring the snippet. Each field should return a scalar value, so no GridFields sorry!

And this method to actually generate the snippet:

- `getSnippets(array $params)`: Return an map of snippet "zone" to snippet content.

Each snippet should be placed in a "zone". Zones are predefined insertion points within the overall page. Allowed zones are "start-head", "end-head", "start-body", "end-body". Your snippet provider can return more than 1 of these.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity48

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

2862d ago

### Community

Maintainers

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

---

Top Contributors

[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (4 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (3 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (1 commits)")[![sminnee](https://avatars.githubusercontent.com/u/59968?v=4)](https://github.com/sminnee "sminnee (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sminnee-tagmanager/health.svg)

```
[![Health](https://phpackages.com/badges/sminnee-tagmanager/health.svg)](https://phpackages.com/packages/sminnee-tagmanager)
```

###  Alternatives

[silverstripe/graphql

GraphQL server for SilverStripe models and other data

512.4M21](/packages/silverstripe-graphql)

PHPackages © 2026

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