PHPackages                             clyons-eis/silverstripe-file-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. clyons-eis/silverstripe-file-analytics

ActiveSilverstripe-module

clyons-eis/silverstripe-file-analytics
======================================

Fire google analytics events on direct file requests

0841[4 PRs](https://github.com/clyonsEIS/silverstripe-file-analytics/pulls)PHP

Since Apr 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/clyonsEIS/silverstripe-file-analytics)[ Packagist](https://packagist.org/packages/clyons-eis/silverstripe-file-analytics)[ RSS](/packages/clyons-eis-silverstripe-file-analytics/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Comments
========

[](#comments)

Maintainers
-----------

[](#maintainers)

- Craig Lyons

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

[](#introduction)

This module provides the ability to fire google analytics events when files are directly requested (i.e. PDFs) Client-side approach allows for simple install &amp; negates the need for a separate analytics account (which is required for server-side solutions).

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

[](#requirements)

- SilverStripe 3.1
- Page must properly include jquery &amp; google analytics (Classic, ga.js)

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

[](#installation)

For apache, your .htaccess file will need to reroute requests to PDFs so they can hit a server-side FileAnalyticsController The RewriteRule is skipped query string for processed=1; this query string is provided by the JS redirect after tracking the event.

```
### PDF Tracking ###
RewriteCond %{QUERY_STRING} !processed=1
RewriteRule ^(.*\.pdf)$ file-analytics?seg=$1 [R=302,L,NC]
####################

```

Limitations
-----------

[](#limitations)

- Because of the client-side redirect, a 301 status cannot be sent, so this will likely prevent PDFs from being indexed by search engines.
- Only Classic Analytics is supported (ga.js). Look for Universal Analytics (analytics.js) in a future version.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/503ebd2c49c66404db13872d30d6435a0be3655921331adee7e1cbe2efdc45e3?d=identicon)[clyonsEIS](/maintainers/clyonsEIS)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/clyons-eis-silverstripe-file-analytics/health.svg)

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

PHPackages © 2026

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