Ad spend, ROAS and CPA by campaign
Connect Google Ads, Meta Ads, LinkedIn Ads or TikTok Ads, then read spend, ROAS, CPA and CAC by campaign or channel joined to your conversions, in the app, over the API and on a dashboard template.
Spend from your ad platforms lands next to your own conversions, so you can read return on ad spend per campaign without a spreadsheet.
Set it up
Connect the platform. In Connectors, add Google Ads, Meta Ads, LinkedIn Ads or TikTok Ads. Each pulls daily spend (date, campaign, ad group, cost, currency, impressions, clicks, plus the conversions the platform reports) and re-pulls the last days again because platforms restate recent numbers. No platform to connect? Import a CSV with
POST /v1/projects/{project_id}/web/ad-spend/import(columnsdate,spend, optionalchannel,campaign,campaign_id,ad_group,currency,impressions,clicks,conversions,conversion_value).Tag your ad links. Conversions are matched to spend by
utm_campaign(campaign) or by channel, so the campaign name in the ad platform and theutm_campaignon the landing URL must agree. The marketing diagnostics on the Attribution page list spend campaigns that match no UTM value, with the closest suggestion.Send a conversion. Any event (
$purchase,signup) or a saved web goal. Revenue comes from the project's revenue settings (default property$revenue).
Read it
On the web analytics Attribution page the spend table shows, per campaign or channel: spend, conversions, revenue, ROAS (revenue / spend), CPA (spend / conversions), CAC (spend / new customers), CPC, CTR, and the platform's own reported conversions and ROAS next to ours. The attribution model decides which campaign earns each conversion (see Attribution models).
curl "$LUCIDA_API/v1/projects/$PROJECT/web/ad-spend/report?conversion_event=%24purchase&dimension=campaign&model=linear&lookback_days=30" \
-H "Authorization: Bearer $LUCIDA_KEY"rows[] carry key, spend, conversions, revenue, roas, cpa, cac, impressions, clicks, cpc, ctr, reported_conversions, reported_value, reported_roas, cost_per_reported_conversion; roas, cpa and cac are null when the denominator is zero. All money is in the project's base currency at each day's rate. GET /v1/projects/{project_id}/web/ad-spend/daily returns spend per day and source for charts.
Dashboard template
Dashboards > New from template > Marketing ROAS and CPA creates a dashboard with two Ad spend ROAS and CPA widgets: by campaign (last touch) and by channel (linear). Edit a widget to set the number of days; the conversion event defaults to $purchase.