Skip to main content

Scenario

Create a system-defined report for LinkedIn Ads data. LinkedIn data is stored across these tables:

Walkthrough

1

Add dictionary entries

Create metrics for each level in report_data_dictionary:
Create entries at every level even though the system report only uses Account level. Campaign, AdSet, and Ads level entries are used for custom reports and drill-down views.
2

Map metrics to source

Insert all dictionary IDs into report_custom_fields:
Now the LinkedIn source only exposes LinkedIn metrics.
3

Create the report

Insert into report_master:
4

Map report to source

Insert into report_source_master:
5

Configure the template

Add Account-level only metrics to report_template_master:
Do not add Campaign, AdSet, or Ads level metrics here. Account level already contains aggregated totals for system reports.
6

Verify

The report should now appear automatically in the UI. The reporting engine will:
  1. Read metrics from report_data_dictionary for IDs 101, 102, 103
  2. Filter by source (LinkedIn Ads)
  3. Apply the template configuration (display order, labels)
  4. Build SQL queries against interaction_insight_ads_tracker
  5. Render the report