PHPackages                             heyday/silverstripe-analytics - 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. heyday/silverstripe-analytics

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

heyday/silverstripe-analytics
=============================

Heyday's standard analytics module

4.0.0(4mo ago)13.6kBSD-3-ClausePHPCI failing

Since Apr 12Pushed 4mo ago14 watchersCompare

[ Source](https://github.com/WPP-Public/akqa-nz-silverstripe-analytics)[ Packagist](https://packagist.org/packages/heyday/silverstripe-analytics)[ Docs](http://github.com/heyday/silverstripe-analytics)[ RSS](/packages/heyday-silverstripe-analytics/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (0)

silverstripe-analytics
======================

[](#silverstripe-analytics)

[![CI](https://github.com/WPP-Public/akqa-nz-silverstripe-analytics/actions/workflows/ci.yml/badge.svg)](https://github.com/WPP-Public/akqa-nz-silverstripe-analytics/actions/workflows/ci.yml)

Heyday's standard analytics module to be used across all sites requiring analytics

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

[](#installation)

```
composer require heyday/silverstripe-analytics
```

Setup
-----

[](#setup)

First, add details to SilverStripe configuration; for instance by creating an *analytics.yml* file with the following details:

```
Page:
  extensions:
    - Heyday\Analytics\AnalyticsExtension
SilverStripe\Core\Injector\Injector:
  AnalyticsService:
    class: Heyday\Analytics\GoogleTagManagerProvider
    constructor:
      0: 'GTM-XXXXX'
```

For Google Tag Manager *AnalyticsID* will be something like:

```
GTM-XXXXX
```

For Google Analytics *AnalyticsID* will be something like:

```
UA-XXXXXXXXX-X
```

Analytics for the site can now be included in a SilverStripe template simply with the following code in the relevant .ss file:

```
{$AnalyticsCode.RAW}
```

### Google Tag Manager Code

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

Google Tag Manager code should be set as high in the `` of the page as possible:

```

	Page Title
	{$AnalyticsCode.RAW}
```

However, if you do have meta tags that set the charset or http-equiv attributes, you'll want them to be at the very top of head, since browsers expect them to be among the first characters of an HTML document.

Google Tag Manager no script tag is now separate from the Tag Manager container. To use it in your template, just call the variable `TagManagerNoScript`

```

	{$TagManagerNoScript}
...
```

### Google Analytics Code

[](#google-analytics-code)

Google Analytics Code code should be set just after the `` tag:

```

	{$AnalyticsCode}
...
```

### Using Google Search Console verification with Google Tag Manager

[](#using-google-search-console-verification-with-google-tag-manager)

If you have a **Google Tag Manager** account, you can verify ownership of a site using your **Google Tag Manager** container snippet code.

To verify ownership using **Google Tag Manager**, choose **Google Tag Manager**in the verification details page for your site, and follow the instructions shown.

When copying Tag Manager code:

- You must have "View, Edit, and Manage" account level permissions in **Google Tag Manager**.
- Place the Tag Manager code immediately after the opening tag of your page. If you do not, verification will fail.
- You cannot insert a data layer (**or anything other than HTML comments**) between the tag and the tag manager code. If you do, verification will fail.
- Use the code exactly as provided; do no modify it. If you modify it, **verification will fail**.

For more information, check out this page:

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance76

Regular maintenance activity

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 77.3% 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 ~209 days

Recently: every ~235 days

Total

18

Last Release

130d ago

Major Versions

v0.1.3 → 1.0.02019-09-11

1.0.2 → 2.0.02019-12-19

2.1.5 → 3.0.02023-09-08

3.1.0 → 4.0.02026-01-08

### Community

Maintainers

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

---

Top Contributors

[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (17 commits)")[![timhiggs](https://avatars.githubusercontent.com/u/3209433?v=4)](https://github.com/timhiggs "timhiggs (4 commits)")[![camspiers](https://avatars.githubusercontent.com/u/51294?v=4)](https://github.com/camspiers "camspiers (1 commits)")

---

Tags

silverstripeanalyticsGoogle Tag Managergoogle analytic

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/heyday-silverstripe-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/heyday-silverstripe-analytics/health.svg)](https://phpackages.com/packages/heyday-silverstripe-analytics)
```

###  Alternatives

[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)[axllent/silverstripe-analytics-js

Google Universal Analytics tracking code for Silverstripe

1721.3k](/packages/axllent-silverstripe-analytics-js)

PHPackages © 2026

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