Replicate Cross Channel Report from Rockerbox UI
This SQL query replicates the Cross-Channel Attribution report. This shows for a given time frame, all marketing spend and conversions mapped back to each marketing placement. This report enables you to see weighted CPA/ROAS against marketing placements for new and existing users.
Sample Query: Even Weight Attribution for All Customers Types (New + Repeat)
SELECT
tier_1,
tier_2,
tier_3,
tier_4,
tier_5,
sum(even) AS conversions,
sum(revenue_even) AS revenue,
sum(spend) AS spend,
sum(spend) / nullif(sum(even),0) AS cpa,
sum(revenue_even) / nullif(sum(spend),0) AS roas
FROM
buckets_breakdown_table --enter your table name
WHERE
date >= current_date - INTERVAL '30 DAYS'
AND date <= current_date - INTERVAL '1 DAY'
GROUP BY
tier_1,
tier_2,
tier_3,
tier_4,
tier_5;
There are several adjustments that you might make to sample query based on your specific reporting needs:
- Reporting Granularity / Group By Dimensions: evaluate performance at different levels of granularity (e.g., channel or tactic level down to ad level) by adjusting the set of columns (tier 1-5) in the
SELECT
andGROUP BY
tier_1, tier_2, tier_3, tier_4, tier_5
- Attribution methodology: report attributed conversions and revenue against different attribution methodologies by changing the columns in the
SELECT
- even weight =
even, revenue_even
- modeled multi-touch =
normalized, revenue_normalized
- first touch =
first_touch, revenue_first_touch
- last touch =
last_touch, revenue_last_touch
- even weight =
- Customer Type: evaluate attribution for new vs. repeat customers
- New Customer attribution
- Conversions =
ntf_even, ntf_normalized, ntf_first_touch, ntf_last_touch
- Revenue =
ntf_revenue_even, ntf_revenue_normalized, ntf_revenue_first_touch, ntf_revenue_last_touch
- Conversions =
- Repeat Customer attribution is computed by deducting new customer metrics from all customer metrics
- e.g., even weight repeat customer conversions =
even - ntf_even
- e.g., even weight repeat customer conversions =
- New Customer attribution
- Time Period Dimension: evaluate performance over different periods of time by adding a time period dimension to the
SELECT
andGROUP BY
statement and converting thedate
column to different time units (e.g., daily, weekly, monthly, quarterly, yearly)