Collects site statistics such as hits, link clicks and impressions by tracking events on the front end with Javascript and tethering that data to your back end Drupal structure.

An AJAX style call is used to record events thus preventing most bots from polluting the data. On the server the activity is stored in local tables that, if applicable, relates directly to nodes or other entities using Drupal's entity concept. Tether Stats is intended for intermediate to advanced Drupal developers.

If you need to collect more data than what Google Analytics or Drupal stats can provide easily, like impressions, this module may help fill in those gaps. The stats tables are relatively easy to mine and may be generated on a database separate from your Drupal core database.

Here are the basic types of stats that Tether Stats collects:

* Page Hits
* Link Clicks
* Impressions
(An impression occurs when an item, such as a link, name or image, appears on a page and is made visible to the user.)

It can be challenging to customize Google Analytics for Link Clicks or Impressions when Google knows nothing about your internal structure. Tether Stats makes collecting this type of data as simple as adding classes to your HTML structure.

Tether Stats also provides classes for the generation of iterable charts based on collected data. Currently, only Combo and Pie charts are supported.

The Drupal 7 version uses a Tether Stats Charts sub-module for chart generation which is dependent on Charts.

Major Differences In Drupal 8

Unlike Drupal 7, charting is integrated into the Drupal 8 version of Tether Stats and no longer relies on the Charts module. Instead, a plugin may implement the TetherStatsChartRendererInterface to support a particular chart API. A plugin for the Google Charts API is included and used by default.

How does it differ from other projects?

Unlike other projects, Tether Stats allows you to track impressions, clicks, page views and other custom activity where you choose to. Also, data collection is not limited to nodes. Any entity type can be used as a reference to store activity.

Data is also automatically aggregated into hourly increments in a separate table. This makes data mining easier and more efficient, but with a heavier footprint on the Javascript callback than the module jStats.

Tether Stats might be a good fit if you are doing any of the following:

* offering accessible charts on your stats data to some or all of your user base.
* compiling stat reports frequently.
* building a customized Drupal site with URLs mapped to entity types other than nodes.
* referencing entities on pages and would like to track the impressions.
* tracking link clicks.

Special thanks to The American Society For Aesthetic Plastic Surgery for sponsoring the code from which this module was based on.

Project information

Releases