PHPackages                             revstrat/bloganalytics - 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. [API Development](/categories/api)
4. /
5. revstrat/bloganalytics

ActiveLibrary[API Development](/categories/api)

revstrat/bloganalytics
======================

Pulls Google Analytics data and provides queued jobs for updating data

0.7(7y ago)0206BSD-3-ClausePHP

Since Sep 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/RevStrat/bloganalytics)[ Packagist](https://packagist.org/packages/revstrat/bloganalytics)[ Docs](http://github.com/RevStrat/bloganalytics)[ RSS](/packages/revstrat-bloganalytics/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

SilverStripe Site Analytics
===========================

[](#silverstripe-site-analytics)

Pull data out of Google Analytics for pages and blog tags

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

[](#requirements)

- SilverStripe ^4
- \[SilverStripe Blog ^3.2 (for tag traffic)\] ()
- [SilverStripe Queued Jobs ^4.2](https://github.com/symbiote/silverstripe-queuedjobs)

Documentation
-------------

[](#documentation)

The SilverStripe BlogAnalytics module uses a Google Service Account to interact with Google Analytics.

1. Set up a [service account here](https://console.developers.google.com/iam-admin/serviceaccounts). You will receive a configuration such as this:

```
{
  "type": "service_account",
  "project_id": "YOUR GOOGLE API PROJET ID",
  "private_key_id": "YOUR PRIVATE KEY ID",
  "private_key": "YOUR PRIVATE KEY",
  "client_email": "EMAIL ADDRESS FOR THE SERVICE ACCOUNT",
  "client_id": "CLIENT ID",
  "auth_uri": "AUTH URI",
  "token_uri": "TOKEN URI",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "CERT URL"
}
```

2. Add the email address for the account to Google Analytics
3. Get a View ID for the Analytics view you wish to pull from
4. base64 encode the configuration
5. Add configuration to your environment:

```
GASERVICE="BASE64 ENCODED JSON CONFIGURATION FILE CONTENTS (to avoid escaping values in the private key)"
GAVIEW="VIEW ID"
GASTART="7daysago"
GAEND="today"
GAMINCUTOFF="100" # Don't track pages with fewer views than this
```

6. Install with `composer require revstrat\bloganalytics`
7. Run `/dev/build?flush=all`.
8. Create a queued job of type RevStrat\\BlogAnalytics\\UpdateTrafficData and run it. The task will schedule itself on completion for 3 hours in the future

Template Usage
--------------

[](#template-usage)

Examples:

TopTags, TopSiteTree, TopBlogPosts each return a list, with the target object itself under "Item", and the traffic count under "Traffic".

Each can take an argument to override the default result count limit.

```
Top Tags

    $Item.Title, $Traffic

```

```

  $Item.Title, $Traffic

```

```

  $Item.Title, $Traffic

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~9 days

Total

8

Last Release

2678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05f97cca36b1b1fccd815e460825076d57bd646ea0aabbe5acd4db14c16e94c5?d=identicon)[robrev](/maintainers/robrev)

---

Top Contributors

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

---

Tags

silverstripebloganalytics

### Embed Badge

![Health badge](/badges/revstrat-bloganalytics/health.svg)

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

###  Alternatives

[silverstripe/blog

A fresh take on blogging in Silverstripe set out to tackle the issue of a cluttered Site Tree.

104739.2k31](/packages/silverstripe-blog)[silverstripe/widgets

Widgets are small pieces of functionality such as showing the latest Comments or Flickr Photos. They normally display on the sidebar of your website.

39411.8k20](/packages/silverstripe-widgets)[mediafigaro/google-analytics-api-symfony

Google Analytics API v4 Symfony

46177.7k](/packages/mediafigaro-google-analytics-api-symfony)

PHPackages © 2026

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