Skip to main content

Overview

The Performance Report system is fully configuration-driven — no backend code changes are required to create new reports. The reporting engine dynamically reads metrics, filters by source, applies templates, and builds SQL queries automatically.

Architecture

The database is designed with 6 layers:
LayerDescriptionExample
CategoriesLogical groupingsMedia, Commerce, Analytics/Attribution
SourcesPlatforms within categoriesGoogle Ads, Facebook Ads, Shopify, GA4
Data DictionaryMetrics and dimensionsClicks, Revenue, ROAS, CTR
ReportsSystem + custom reportsLinkedIn Ads Report, Cross-Channel Report
TemplatesColumn configuration per reportWhich metrics appear, ordering, labels
User DataPlanning/target dataUser-entered budgets and goals

Key Tables

Table Relationships

TablePurpose
category_masterLogical groupings (Paid Media, Commerce, etc.)
source_masterPlatforms (Google Ads, Shopify, etc.) linked to categories
report_data_dictionaryAll metrics, dimensions, formulas — the source of truth
report_custom_fieldsMaps metrics/dimensions to sources and categories
report_masterReport definitions (name, type, metadata)
report_source_masterMaps reports to their data sources
report_template_masterColumn config per report (order, labels, sticky columns)

System Report Rules

System-defined reports follow specific constraints:
  • Always aggregated (no granular drill-down)
  • Always daily granularity
  • Only top-level metrics included in templates
Source TypeLevel Used
Paid MediaAccount
Shopifynull
AnalyticsAnalytics Report
Mission Controlnull