ACONA
  • About
  • User Documentation
    • ACONA Backend/Administration Tool
      • ACONA Administration Tool - How to
      • Matomo API Key / auth Token
    • CMS Integrations
    • FAQs
  • Developer documentation
    • ACONA Data Warehouse
      • Data structure and naming conventions
      • ACONA API Documentation
    • Styleguide
    • Creating CMS integrations
    • FAQs
Powered by GitBook
On this page
  • Metrics vs Variables
  • Performance Metrics vs Page Variables
  • Storage

Was this helpful?

  1. Developer documentation
  2. ACONA Data Warehouse

Data structure and naming conventions

PreviousACONA Data WarehouseNextACONA API Documentation

Last updated 3 years ago

Was this helpful?

We follow the standards from prometheus if possible :

Variables should have a suffix describing the unit. And a prefix describing the origin. Example data structure:

As variables can store data in an aggregated way we have this indication:

_d: Daily _h: Hourly

Metrics vs Variables

Metrics: Time Based integer values (hypertables) Variables: Additional metainformation, can also store other formats

Performance Metrics vs Page Variables

Performance Metrics are all of type integer and already aggregated (e.g. by day). They measure the performance of a specific url, e.g. how many times a user visited the page.

Page Variables define a specific state of the page for a given time. It can be integer (e.g. number of headings), holding text (e.g. the Metadescription) or boolean (e.g. if breadcrumbs are present).

Storage

The ACONA Data Warehouse is using TimeScaleDB:

We create one table by metric/variable (narrow table mode):

Example:

CREATE TABLE "metric_d_bounces"(
    url TEXT, 
    date DATE NOT NULL,
    value INTEGER
    );
SELECT create_hypertable('metric_d_bounces', 'date', create_default_indexes=>FALSE);
CREATE INDEX ON metric_d_bounces (url, date DESC);
https://prometheus.io/docs/practices/naming/
https://docs.timescale.com/latest/tutorials/tutorial-hello-timescale
https://www.timescale.com/
https://docs.timescale.com/latest/introduction/data-model