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

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

wakeworks/analytics
===================

A privacy focused analytics module integrated into Silverstripe

3.0.0(2mo ago)6320[4 issues](https://github.com/wakeworks/Analytics/issues)BSD-3-ClausePHPCI passing

Since Feb 11Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/wakeworks/Analytics)[ Packagist](https://packagist.org/packages/wakeworks/analytics)[ RSS](/packages/wakeworks-analytics/feed)WikiDiscussions main Synced today

READMEChangelog (9)Dependencies (12)Versions (14)Used By (0)

Analytics for Silverstripe
==========================

[](#analytics-for-silverstripe)

Introduction
------------

[](#introduction)

This module enables basic analytics in Silverstripe without saving identifying data.

[![Screenshot](docs/images/screenshot.png)](docs/images/screenshot.png)

Requirements
------------

[](#requirements)

- silverstripe/framework ^6
- silverstripe/admin ^3

For Silverstripe 5, check out version/branch 2, for Silverstripe 4, check out version/branch 1.

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

[](#installation)

```
composer require wakeworks/analytics

```

After a /dev/build, the module will start logging requests. You can find an overview of the data at /admin/analytics.

**ATTENTION: Please read through "[Garbage Collection](#garbage-collection)" if you don't want your database to grow infinitely.**

How does it work?
-----------------

[](#how-does-it-work)

- On every request, a user sends its User-Agent string to the server. Using a middleware and matomo/device-detector, we can parse it and check which browser/device it is or if it's a bot.
- This information is stored in the database together with [other collected analytics](#which-information-is-stored).
- On first visit of a user, we write a note into the session to be able to mark it as unique.
- In order to filter out as many bots as possible, we don't save any request with an unknown User-Agent. To optimize bot detection, use [image verification](#improve-bot-detection-by-using-image-verification).
    Also, some routes are automatically skipped, e.g. UserDefinedFormController/ping, /admin/\* or /dev/\*, see "[When is no information stored?](#When-is-no-information-stored)".

Improve bot detection by using image verification
-------------------------------------------------

[](#improve-bot-detection-by-using-image-verification)

While removing unknown User-Agents already takes away a fair share of bots, there are still many crawlers that just call your website without loading its content.

In order to remove them from the statistics, you can insert an image tracking code by activating it with the following configuration.

```
WakeWorks\Analytics\Middlewares\AnalyticsProcessorMiddleware:
  image_verification: true
```

This method works by inserting a hidden `` tag before `` on every valid tracking request. If a user loads the image, the request will create an entry in the database, otherwise it won't.

Garbage Collection
------------------

[](#garbage-collection)

After some time, your database will fill up with too many requests that you might not care about anymore (e.g. very old ones).

Use the task `/dev/tasks/AnalyticsGarbageCollectionTask` in order to delete them.

You should do this automatically, by using a cron job or, if that's not possible, by activating the Garbage Collection every xth request via the middleware.

```
WakeWorks\Analytics\Middlewares\AnalyticsProcessorMiddleware:
  # Run AnalyticsGarbageCollectionTask with probability of 1/100
  # => ~ every 100 requests. (Default: 0, off)
  gc_divisor: 100
  # Delete requests older than (default) 365 days.
  preserve_for_days: 365
```

Only do this if the amount of requests you collect is reasonably small, otherwise the DELETE query might take uncomfortably long for the visitor.

Extension for Subsites
----------------------

[](#extension-for-subsites)

If you have `silverstripe/subsites` installed and want to track by Subsite, you can simply enable the `SubsiteExtension` and everything will work out of the box.

```
WakeWorks\Analytics\Models\AnalyticsLog:
  extensions:
    - WakeWorks\Analytics\Extensions\SubsitesExtension
```

Which information is stored?
----------------------------

[](#which-information-is-stored)

- Current date
- Requested url
- Operating System with version
- Browser with version
- Device type (desktop, smartphone etc.)
- Unique visit
- SiteTreeID (PageID) if possible

When is no information stored?
------------------------------

[](#when-is-no-information-stored)

- Unidentifiable/Bot User-Agents
- Status codes that are not between 200-204 due to bots spamming /wp-\* etc.
- Admin backend urls
- Security urls / Controller
- DevelopmentAdmin Controller (/dev urls)
- UserDefinedFormController/ping

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance71

Regular maintenance activity

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.9% 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 ~139 days

Total

12

Last Release

76d ago

Major Versions

1.x-dev → 2.0.02024-10-07

2.x-dev → 3.x-dev2026-04-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7694808?v=4)[Jan Metzger](/maintainers/Zazama)[@Zazama](https://github.com/Zazama)

![](https://www.gravatar.com/avatar/952c91f22ff89bfb25c32822340e47aef16aec424c492e19fc9840c51092b0cc?d=identicon)[wakeworks](/maintainers/wakeworks)

---

Top Contributors

[![Zazama](https://avatars.githubusercontent.com/u/7694808?v=4)](https://github.com/Zazama "Zazama (31 commits)")[![pausenaufsicht](https://avatars.githubusercontent.com/u/102295395?v=4)](https://github.com/pausenaufsicht "pausenaufsicht (1 commits)")

---

Tags

silverstripeanalytics

### Embed Badge

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

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[symbiote/silverstripe-advancedworkflow

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

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39344.8k31](/packages/lekoala-silverstripe-cms-actions)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11236.3k](/packages/lekoala-silverstripe-softdelete)

PHPackages © 2026

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