Skip to main content

Description

This analysis demonstrates how to join Rockerbox attribution data with performance metrics reported directly by advertising platforms.

When to Use This Analysis

  • Compare platform-reported performance metrics against Rockerbox attribution.
  • Evaluate discrepancies between platform attribution windows and Rockerbox attribution results.
  • Build unified marketing performance reports combining ad platform metrics and attribution results.
  • Analyze clicks, impressions, conversions, and revenue alongside Rockerbox’s attribution outputs.

Source Data

This analysis joins two datasets.
DatasetFieldDescription
aggregate_mtadateDate of the attributed conversion
aggregate_mtatier_1tier_5Marketing channel hierarchy
aggregate_mtaplatform_join_keyIdentifier used to link attribution records to platform data
aggregate_mtaincluded_spendMarketing spend associated with the placement
aggregate_mtaeven, normalizedAttribution credit metrics
aggregate_mtarevenue_even, revenue_normalizedRevenue attributed by Rockerbox
platform_<platform>mta_tiers_join_keyJoin key linking platform data to Rockerbox attribution
platform_<platform>clicks, impressionsPlatform-reported engagement metrics
platform_<platform>purchase_*Platform-reported conversion metrics

Key Metrics

MetricDescription
spendMarketing spend reported in Rockerbox
evenEven-weight attributed conversions
normalizedModeled multi-touch attributed conversions
revenue_evenRevenue attributed using even-weight attribution
revenue_normalizedRevenue attributed using modeled attribution
clicksPlatform-reported clicks
impressionsPlatform-reported impressions
purchase_1d_viewPlatform-reported purchases attributed to 1-day view
purchase_7d_clickPlatform-reported purchases attributed to 7-day click

Example Queries

Join Rockerbox Attribution with Facebook Platform Data

This query demonstrates how to join Rockerbox attribution with Facebook platform metrics. The query operates in two stages:
  1. Aggregate hourly Facebook performance data to daily granularity
  2. Join the aggregated platform dataset to the Rockerbox Buckets Breakdown dataset
Because platform datasets often contain hourly records, they must be aggregated to daily granularity before joining with Rockerbox datasets, which are stored at the daily level.
-- Step 1: Aggregate Facebook platform data to daily granularity
WITH facebook_daily_agg AS (

    SELECT

        -- Dimensions
        identifier,
        date,
        mta_tiers_join_key,

        -- Platform engagement metrics
        SUM(clicks) AS clicks,
        SUM(impressions) AS impressions,

        -- Platform conversion metrics
        SUM(COALESCE(view_1d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_1d_view,
        SUM(COALESCE(click_7d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_7d_click,

        -- Platform revenue metrics
        SUM(COALESCE(view_value_usd_1d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_revenue_1d_view,
        SUM(COALESCE(click_value_usd_7d:offsite_conversion_fb_pixel_purchase,0)) AS purchase_revenue_7d_click

    FROM {platform_facebook_table}

    WHERE
        date >= {start_date}
        AND date <= {end_date}

    GROUP BY
        1,2,3
)

-- Step 2: Join platform metrics to Rockerbox attribution dataset
SELECT

    -- Dimensions
    a.date,
    a.tier_1,
    a.tier_2,
    a.tier_3,
    a.tier_4,
    a.tier_5,
    a.platform_join_key,

    -- Rockerbox attribution metrics
    b.included_spend,
    b.even,
    b.normalized,
    b.revenue_even,
    b.revenue_normalized,

    -- Platform metrics
    f.clicks,
    f.impressions,
    f.purchase_1d_view,
    f.purchase_7d_click,
    f.purchase_revenue_1d_view,
    f.purchase_revenue_7d_click

FROM aggregate_mta a

-- Join Facebook platform data to Rockerbox attribution
LEFT JOIN facebook_daily_agg f
    ON f.mta_tiers_join_key = a.platform_join_key
    AND f.date = a.date

WHERE
    a.date >= {start_date}
    AND a.date <= {{end_date}}
    AND a.conversion_event_id = {{conversion identifier}}
    AND a.platform ILIKE '%facebook%'

ORDER BY
    1,2,3,4,5,6;

Notes on Join Strategy

A LEFT JOIN is recommended when joining platform data to Rockerbox attribution. This ensures that:
  • All attribution records from Rockerbox remain present in the final dataset.
  • Platform metrics are appended where matching records exist.
This approach is necessary because Rockerbox attribution may include conversions occurring after platform spend has stopped, due to longer attribution windows supported by Rockerbox.