PHPackages                             syntro/silverstripe-google-suite - 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. syntro/silverstripe-google-suite

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

syntro/silverstripe-google-suite
================================

Adds Google services to your page using klaro!

1.1.0(2y ago)01.3k1[1 PRs](https://github.com/syntro-opensource/silverstripe-google-suite/pulls)BSD-3-ClausePHP

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/syntro-opensource/silverstripe-google-suite)[ Packagist](https://packagist.org/packages/syntro/silverstripe-google-suite)[ RSS](/packages/syntro-silverstripe-google-suite/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

Silverstripe Google Suite
=========================

[](#silverstripe-google-suite)

[![🎭 Tests](https://github.com/syntro-opensource/silverstripe-google-suite/workflows/%F0%9F%8E%AD%20Tests/badge.svg)](https://github.com/syntro-opensource/silverstripe-google-suite/actions?query=workflow%3A%22%F0%9F%8E%AD+Tests%22+branch%3A%22master%22)[![codecov](https://camo.githubusercontent.com/4592115d916a12400fcab827d5ad735a937327b893c4c66de8917de0cfa77e25/68747470733a2f2f636f6465636f762e696f2f67682f73796e74726f2d6f70656e736f757263652f73696c7665727374726970652d676f6f676c652d73756974652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/syntro-opensource/silverstripe-google-suite)[![Dependabot](https://camo.githubusercontent.com/6a51b0751549261d7bac57cd594305fc5708bf907fc01b6f34aa97e914da4f6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e6461626f742d6163746976652d627269676874677265656e3f6c6f676f3d646570656e6461626f74)](https://camo.githubusercontent.com/6a51b0751549261d7bac57cd594305fc5708bf907fc01b6f34aa97e914da4f6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e6461626f742d6163746976652d627269676874677265656e3f6c6f676f3d646570656e6461626f74)[![phpstan](https://camo.githubusercontent.com/639cc050faeefad1a1d1ab830ca7a7950f1eede4402451b9a11cdc89d3a99066/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d73756363657373)](https://github.com/phpstan/phpstan)[![composer](https://camo.githubusercontent.com/3349d77df4f32609d8c18e20f288963fc0983e7143e1ae18de74322570e1502a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796e74726f2f73696c7665727374726970652d676f6f676c652d73756974653f636f6c6f723d73756363657373266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-google-suite)[![Packagist Version](https://camo.githubusercontent.com/d505eb55e238fdc03205018dd998fcb27f2f027db31df54be16d6cc4ea7d7f67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e74726f2f73696c7665727374726970652d676f6f676c652d73756974653f6c6162656c3d737461626c65266c6f676f3d636f6d706f736572)](https://packagist.org/packages/syntro/silverstripe-google-suite)

Adds Google Analytics and Ads conversion tracking to your Website. Uses [`syntro/silverstripe-klaro`](https://github.com/syntro-opensource/silverstripe-klaro)for consent management.

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

[](#installation)

To install this module, run the following command:

```
composer require syntro/silverstripe-google-suite

```

Usage
-----

[](#usage)

Usage of this module is pretty straightforward. As soon as one of the products is enabled, the dependencies are injected into to every page. Consent management is taken care of by klaro!, which only loads the tracking scripts after the user accepts.

There are two configs which handle injecting the respective dependencies:

- [Syntro\\SilverstripeGoogleSuite\\AnalyticsConfig](src/AnalyticsConfig.php)
- [Syntro\\SilverstripeGoogleSuite\\AdsConfig](src/AdsConfig.php)

Each of the mentioned configs is enabled by adding tokens which you get when registring for Ads or Analytics. You can add multiple tokens to send events to multiple accounts. Additional options for the `gtag('cofig', ...)` tag can be specified too:

```
Syntro\SilverstripeGoogleSuite\AnalyticsConfig:
  google_tokens:
    - X-XXXXXXXXX
    - token: X-XXXXXXXXX
      title: Some Ads Account # set a title for backend use
      option: value
```

After adding at least one tag, the respective product becomes active.

### Google Analytics

[](#google-analytics)

This module is intended to be used with the new properties. After configuring the tokens, everything should be working out of the box.

### Google Ads Conversion Tracking

[](#google-ads-conversion-tracking)

In order to track conversions on your page, you have to configure said conversions in your Ads account. A conversion has a label assigned to it which you need in order to send it to the correct container.

To inject automated conversions in your page, you have to define them in the config:

```
Syntro\SilverstripeGoogleSuite\AdsConfig:
  google_tokens:
    - token: XX-XXXXXXXXXXXX
  onclick_conversion:
    - selector: "a[href*=tel]"
      conversion_label: XxXXxxXXXXxx
    - selector: a[href^="mailto:info@domain.com"]
      conversion_label: XxXXxxXXXXxx
    - selector: a[href*="shop.domain.com"]
      conversion_label: XxXXxxXXXXxx
  onsubmit_conversion:
    - selector: "form[id*=SomeForm]"
      conversion_label: XxXXxxXXXXxx
      conversion_id: XX-XXXXXXXXXXXX
```

There are currently two kinds of automated conversions:

- `onclick_conversion`: these are triggered when the user clicks on an element.
- `onsubmit_conversion`: these are triggered when the user submits a form.

Every automated conversion can have the following keys:

- `selector`: a CSS selector which identifies the DOM-Nodes you want to track
- `conversion_label`: the label of the conversion
- `conversion_id`: (optional) the conversion id to use when emitting the event. By default, the first configured token is used, but in the edge-case where you need to add multiple tokens, use this option to define the target.
- `conversion_url`: (optional) should not be used. This overwrites the normal behaviour by forcing the user to this url.

> ## Styling klaro!
>
> [](#styling-klaro)
>
> This Module uses klaro! for consent management via the [`syntro/silverstripe-klaro`](https://github.com/syntro-opensource/silverstripe-klaro)module. We recommend checking that module out for information on how to style the consent-window.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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 ~154 days

Total

3

Last Release

1094d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/289446336e84f3a201ac80def6e4a2a5289815d628ad5e0c0aa57b2f4bc20e73?d=identicon)[mleutenegger](/maintainers/mleutenegger)

---

Top Contributors

[![mleutenegger](https://avatars.githubusercontent.com/u/1339379?v=4)](https://github.com/mleutenegger "mleutenegger (8 commits)")[![cotpat](https://avatars.githubusercontent.com/u/85751624?v=4)](https://github.com/cotpat "cotpat (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

silverstripesilverstripe 4silverstripe-5

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/syntro-silverstripe-google-suite/health.svg)

```
[![Health](https://phpackages.com/badges/syntro-silverstripe-google-suite/health.svg)](https://phpackages.com/packages/syntro-silverstripe-google-suite)
```

###  Alternatives

[silverstripe/userforms

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

1321.1M83](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

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

46299.9k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

21419.6k11](/packages/silverstripe-sharedraftcontent)[cyber-duck/silverstripe-seo

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

4251.3k](/packages/cyber-duck-silverstripe-seo)

PHPackages © 2026

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