Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 2.3 KB

DataModel.md

File metadata and controls

42 lines (35 loc) · 2.3 KB

Aggregation & data model

← Back to the README

Aggregation

The scheduler task Datamints\Analytics\Task\AggregationTask ("Analytics: Aggregation") works on every site:

  1. It determines all days for which raw data still exists and processes them in ascending order. The order matters for the new/returning distinction. A newly added statistic is therefore automatically calculated for the whole retention period; older days stay empty.
  2. For each of these days it deletes the summary rows and rebuilds them from tx_analytics_event. Running it several times is safe and never counts twice.
  3. It deletes expired raw data and tx_analytics_visitor_seen entries (see Privacy).

Tables

Table Contents
tx_analytics_event Raw data, one row per page view (deleted after retentionDays)
tx_analytics_summary_site Page views and unique visitors per day and site
tx_analytics_summary_page Page views and unique visitors per day, page, language and RouteEnhancer context
tx_analytics_summary_referrer Hits per referrer type and host
tx_analytics_summary_device Hits per device type (desktop, mobile, tablet)
tx_analytics_summary_browser Hits per browser category
tx_analytics_summary_language Hits per language
tx_analytics_summary_traffic Hits split into bots and humans
tx_analytics_summary_bounce Entries ("sessions") and bounces per entry page
tx_analytics_summary_visitor_type New and returning visitors
tx_analytics_summary_transition Page transitions (from page → to page)
tx_analytics_visitor_seen First and last day seen per stable_visitor_hash (deleted when the visitor has not returned for retentionDays days)
tx_analytics_gsc_site GSC: clicks, impressions, position per day, site and device
tx_analytics_gsc_page GSC: clicks, impressions, position per day and page
tx_analytics_gsc_query GSC: search queries per day and page (page_id = 0: queries of the whole site)
tx_analytics_gsc_url_map GSC: cache of the URL → page mapping
tx_analytics_gsc_import_state GSC: backfill progress per site

The GSC tables are not affected by retentionDays. They grow by the imported days (backfill: at most 16 months back).