Chart your export here
Drop a CSV here. xmetric reads every row in this browser and draws a first chart you can regroup or change the measure of. Nothing is uploaded.
No file loaded yet. You can also drop a CSV on this box.
How to export GA4 Traffic acquisition data for spend blending
Google Analytics 4 imports Google Ads cost automatically when linked, but non-Google channels (Meta Ads, LinkedIn Ads, sponsorships) require manual cost imports via Campaign data import (utm_source and utm_medium) or an external join.
- In Google Analytics 4, open Reports > Acquisition > Traffic acquisition.
- Switch the primary dimension dropdown from
Session primary channel group (Default Channel Group)toSession source / mediumorSession campaign, and addDateorMonthas a secondary dimension by clicking the+button. - Click Share this report > Download File > Download CSV (exports up to 100,000 rows as of October 2026).
| GA4 Export Column Name | Data Type | Purpose in Attribution View |
|---|---|---|
Session primary channel group (Default Channel Group) | String | High-level channel rollup (Paid Search, Organic Search, Direct, Paid Social) |
Session source / medium | String | Join key with UTM tags (for example google / cpc, meta / paid_social) |
Session campaign | String | Join key with ad platform campaign names (utm_campaign) |
Sessions | Integer | Total session visits per channel |
Engaged sessions | Integer | Sessions lasting >10 seconds, 2+ screens/pages, or triggering a key event |
Key events | Integer | Attributed conversion events for the session |
Total revenue | Currency | Attributed ecommerce or event value |
Key attribution formulas and SQL equivalents
1. Channel Customer Acquisition Cost (CAC) and ROAS
Once your GA4 CSV with cost data is open in the xmetric app, compute effective CAC and ROAS side by side as calculated fields. (Joining a separate ad spend CSV on normalized campaign and month is coming.)
xmetric / Tableau formula (CAC):
SUM([Ad Spend]) / NULLIF(SUM([Key events]), 0)xmetric / Tableau formula (ROAS):
SUM([Total revenue]) / NULLIF(SUM([Ad Spend]), 0)SQL equivalent:
SELECT
g."Session source / medium" AS source_medium,
g."Session campaign" AS campaign,
SUM(s.spend_usd) AS ad_spend,
SUM(g."Sessions") AS sessions,
SUM(g."Key events") AS key_events,
SUM(g."Total revenue") AS revenue,
SUM(s.spend_usd) / NULLIF(SUM(g."Key events"), 0) AS cac,
SUM(g."Total revenue") / NULLIF(SUM(s.spend_usd), 0) AS roas
FROM ga4_traffic_acquisition g
LEFT JOIN ad_spend_csv s
ON LOWER(TRIM(g."Session campaign")) = LOWER(TRIM(s.campaign_name))
GROUP BY 1, 2
ORDER BY ad_spend DESC;2. Share of Spend vs. Share of Key Events (FIXED LOD)
Spot channels that consume a large share of paid budget while delivering a small share of total conversions.
xmetric / Tableau formula:
(SUM([Key events]) / MIN({ FIXED : SUM([Key events]) }))
- (SUM([Ad Spend]) / MIN({ FIXED : SUM([Ad Spend]) }))SQL equivalent:
SELECT
"Session primary channel group (Default Channel Group)" AS channel_group,
SUM("Key events") * 1.0 / NULLIF(SUM(SUM("Key events")) OVER (), 0) AS share_of_key_events,
SUM(ad_spend) * 1.0 / NULLIF(SUM(SUM(ad_spend)) OVER (), 0) AS share_of_spend
FROM joined_channel_data
GROUP BY 1;3. Cost per Engaged Session (Quality-Adjusted CPC)
Ad platforms report cost per link click, which ignores visitors who bounce before the page loads. Dividing spend by GA4 Engaged sessions reveals true cost per qualified visit.
xmetric / Tableau formula:
SUM([Ad Spend]) / NULLIF(SUM([Engaged sessions]), 0)Where GA4 native attribution and paid connectors differ
- Session-scoped vs. data-driven attribution: The GA4
Traffic acquisitionreport uses the session-scoped Paid and organic channels last click attribution model forSession source / medium, whereas GA4'sAdvertising > Attributionreports default to data-driven attribution across touchpoints. If you want multi-touch credit weights from GA4, export the Model comparison CSV from the Advertising workspace instead. - Data Studio (formerly Looker Studio) 3rd-party connector costs: Data Studio (renamed from Looker Studio in April 2026; free self-service tier, Pro at $9 per user per project per month as of October 2026) includes free built-in connectors for GA4 and Google Ads, but blending Meta Ads, LinkedIn Ads, or TikTok Ads in Data Studio usually requires a paid third-party partner connector. In xmetric, you drop the exported CSV into your browser for free (blending several CSVs is coming).
Questions people ask
How do I fix mismatched campaign names between GA4 and Meta Ads?
Use a calculated field in xmetric with LOWER(TRIM([Session campaign])) on both tables, or map via utm_id if your ad URLs pass campaign IDs.
Why do GA4 Key events not match conversions reported in Meta Ads Manager?
Meta Ads Manager defaults to a 7-day click and 1-day view attribution window, crediting view-through conversions that never clicked a link. GA4 Traffic acquisition only counts sessions where the user clicked through to your site with UTM parameters.
Can I analyze the channel view without uploading my financial numbers?
Yes. Files you drop are read in your browser and nothing is uploaded, unless you sign in and save a workbook online.
Will xmetric support live BigQuery or Postgres marketing warehouse connections?
Yes, they are coming. Live connections to BigQuery and Postgres are in development, along with an xmetric MCP server, ChatGPT app and Claude connector that will let agents query your attribution tables directly.
Drop your GA4 Traffic_acquisition.csv above for a first chart, then build the CAC, ROAS and cost per engaged session view in the xmetric app.