Blended performance
Revenue and media spend
Revenue Spend
Attributed revenue$1.84M
Media investment$436K
4.22× ROAS
| Journey | Customers | Conv. rate | Revenue | Avg. days |
|---|
Ad clicks, website behavior, email engagement, and CRM revenue joined into a single timeline.
Compare customer, campaign, content, page, and social results using consistent revenue outcomes.
Every source is normalized, deduplicated, and stitched to a durable customer key before metrics reach the dashboard.
The query uses layered CTEs to standardize source schemas, create durable customer identities, sequence touchpoints, and allocate revenue.
Convert every platform into the same event grain.
Link anonymous click IDs to known CRM contacts.
Order all touchpoints before each conversion.
Apply attribution weights and reconcile revenue.
WITH paid_media AS (
SELECT
event_timestamp,
'google_ads' AS source,
campaign_id,
gclid AS click_id,
cost,
conversions
FROM `demo.raw.google_ads`
UNION ALL
SELECT
event_timestamp,
'meta_ads' AS source,
campaign_id,
fbclid AS click_id,
spend AS cost,
purchases AS conversions
FROM `demo.raw.meta_ads`
),
identity_map AS (
SELECT
COALESCE(crm.contact_id, web.user_id) AS customer_id,
web.click_id,
crm.email_hash
FROM `demo.raw.web_events` web
LEFT JOIN `demo.raw.crm_contacts` crm
ON web.email_hash = crm.email_hash
)
SELECT * FROM unified_journeys;