PHPackages                             cyber-duck/silverstripe-google-tag-manager - 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. cyber-duck/silverstripe-google-tag-manager

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

cyber-duck/silverstripe-google-tag-manager
==========================================

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

4.2.0(3y ago)1528.0k9[2 PRs](https://github.com/Cyber-Duck/Silverstripe-Google-Tag-Manager/pulls)MITPHPPHP &gt;=5.6

Since Aug 30Pushed 1y ago26 watchersCompare

[ Source](https://github.com/Cyber-Duck/Silverstripe-Google-Tag-Manager)[ Packagist](https://packagist.org/packages/cyber-duck/silverstripe-google-tag-manager)[ Docs](http://github.com/cyber-duck/silverstripe-google-tag-manager)[ RSS](/packages/cyber-duck-silverstripe-google-tag-manager/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (11)Used By (0)

Silverstripe - Google Tag Manager
=================================

[](#silverstripe---google-tag-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/ebdd926b5a819e15fea884271c9f34d925a21edf5d4e628ebd577ed9c389690f/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f73696c7665727374726970652d676f6f676c652d7461672d6d616e616765722f762f737461626c65)](https://packagist.org/packages/cyber-duck/silverstripe-google-tag-manager)[![Latest Unstable Version](https://camo.githubusercontent.com/c25401e8ff3919f586a44af4fd9d4e3937847212b5b622c1c9ad12845d33a2fb/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f73696c7665727374726970652d676f6f676c652d7461672d6d616e616765722f762f756e737461626c65)](https://packagist.org/packages/cyber-duck/silverstripe-google-tag-manager)[![Total Downloads](https://camo.githubusercontent.com/7f1dc74094fd150f0845a8587e77b6454dd5b3250d4247eb99dca78d77883bc5/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f73696c7665727374726970652d676f6f676c652d7461672d6d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/cyber-duck/silverstripe-google-tag-manager)[![License](https://camo.githubusercontent.com/8ac67ecb63e8ee195b6b4d5f38f65a1b4fd837ef47e11b87bd76f878b476921d/68747470733a2f2f706f7365722e707567782e6f72672f63796265722d6475636b2f73696c7665727374726970652d676f6f676c652d7461672d6d616e616765722f6c6963656e7365)](https://packagist.org/packages/cyber-duck/silverstripe-google-tag-manager)

Author: [Andrew Mc Cormack](https://github.com/Andrew-Mc-Cormack)

A Silverstripe module to add Google Tag Manager Version 2 datalayer, event, and ecommerce integration. Using simple functions push any values you want to the datalayer for full Tag Manager integration within Silverstripe. The module genreates a formatted json dataLayer which can be accessed easily through the Google Tag Manager UI.

Features
--------

[](#features)

- Push datalayer key value pairs easily
- Push events to trigger Tag Manager tags
- Set ecommerce currency code
- Set product impressions
- Set product promotions
- Set product detail views
- Set add to cart actions
- Set remove from cart actions
- Set purchase data / purchase item data
- Set refund transactions / transaction item(s)
- Supports multiple exommerce actions on each page

Guides
------

[](#guides)

- [Installation](/docs/installation)
    - [Composer](/docs/installation#composer)
    - [Controller and View](/docs/installation#controller-and-view)
    - [Validating your Search Console property](/docs/installation#validating-your-search-console-property)
- [Pushing Data](/docs/data)
    - [Pushing to the data layer](/docs/data#pushing-to-the-data-layer)
    - [Pushing an event to the data layer](/docs/data#pushing-an-event-to-the-data-layer)
- [Pushing Ecommerce Data](/docs/ecommerce)
    - [Setting the ecommerce currency](/docs/ecommerce#setting-the-ecommerce-currency)
    - [Pushing a product impression](/docs/ecommerce#pushing-a-product-impression)
    - [Pushing a product promotion impression](/docs/ecommerce#pushing-a-product-promotion-impression)
    - [Pushing a product detail view](/docs/ecommerce#pushing-a-product-detail-view)
    - [Pushing an add to cart action](/docs/ecommerce#pushing-an-add-to-cart-action)
    - [Pushing a remove from cart action](/docs/ecommerce#pushing-a-remove-from-cart-action)
    - [Pushing a purchase transaction and items](/docs/ecommerce#pushing-a-purchase-transaction-and-items)
    - [Refunding a transaction or items](/docs/ecommerce#refunding-a-transaction-or-items)

License
-------

[](#license)

```
Copyright (c) 2016, Andrew Mc Cormack .
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in
      the documentation and/or other materials provided with the
      distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~307 days

Recently: every ~431 days

Total

8

Last Release

1395d ago

Major Versions

1.0.1 → 3.x-dev2017-03-21

3.x-dev → 4.0.02017-10-26

PHP version history (2 changes)1.0.1PHP &gt;=5.4.0

4.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c45a99726cc30692bc4821cfc198df1f5de85b1a15f9b66a0bf739acbac0309?d=identicon)[cyber-duck](/maintainers/cyber-duck)

---

Top Contributors

[![worzy](https://avatars.githubusercontent.com/u/1092417?v=4)](https://github.com/worzy "worzy (2 commits)")

---

Tags

cart-actionsdatalayerecommercegtmmodulesilverstripesilverstripe-4silverstripeGoogle Tag Managergoogle-analyticsgtmsilverstripe 4website tracking

### Embed Badge

![Health badge](/badges/cyber-duck-silverstripe-google-tag-manager/health.svg)

```
[![Health](https://phpackages.com/badges/cyber-duck-silverstripe-google-tag-manager/health.svg)](https://phpackages.com/packages/cyber-duck-silverstripe-google-tag-manager)
```

###  Alternatives

[magepal/magento2-googletagmanager

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

2671.5M4](/packages/magepal-magento2-googletagmanager)[cyber-duck/silverstripe-seo

A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content

4351.1k](/packages/cyber-duck-silverstripe-seo)[fof/analytics

Tracks analytics using Google Analytics, Google Optimize/GTM and Matomo

3543.1k](/packages/fof-analytics)

PHPackages © 2026

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