Skip to content

Analytic#

Analytic stores a number on a schedule and lets Views report it later.

A sample is one value for one collector and one period. The period is a day, a week, a month, or a year. Collection runs from core cron, the first run at or after a site-local time. The default is 12:00.

Two kinds of collectors write those numbers:

  • A plugin, for a module that owns the measurement.
  • A View, for a site builder who already has an aggregate display.

The module ships one plugin. It counts entities that are published now. A deriver adds one plugin for each content type whose class implements EntityPublishedInterface, defines a published key, and has a base table, plus one plugin for each of that type's bundles. It does not ship a node plugin or a user plugin.

Read the storage notes for the tables, the schedule notes for noon, and the report notes for Views.