Metric · Marketing

What is cost per acquisition, and how do you measure it in Metabase?

Cost per acquisition (CPA) is total spend divided by acquisitions — paying customers, or whatever target conversion event a campaign is optimized toward. It's the efficiency metric one rung below CAC and one rung above cost per lead. Measure it in Metabase from spend synced from Google Ads, Meta Ads, and LinkedIn Ads, joined to conversions from your own backend.

TL;DRspend ÷ acquisitions, blended and per channel, with conversions counted from your warehouse rather than summed from platform dashboards. Platforms attribute generously; the same purchase can show up as a conversion in three of them at once.

What does a CPA chart look like in Metabase?

Chart blended CPA by month as a line, and read the slope as the efficiency story: a steady decline means spend is buying acquisitions more cheaply as targeting and channel mix improve. A spike like November's is usually seasonal — Q4 auctions price every advertiser up — and reads next to the calendar, not as a broken funnel.

CPA in Metabase: a line chart of blended cost per acquisition by month.
Blended CPA as a Metabase card, built from synced ad spend and conversion data. Figures are illustrative.

What cost per acquisition measures

It measures how much media budget it takes to produce one unit of the outcome you actually want — a purchase, a subscription, a funded account. That makes it the natural currency for budget allocation: campaigns and channels compete on CPA against a target derived from what an acquisition is worth. Trended blended CPA also works as an early-warning signal for CAC, because media efficiency usually deteriorates before the fully loaded number does.

CPA vs. CAC

The two get used interchangeably in decks, but they answer different questions. CPA is scoped: this channel's (or this campaign's) media spend over the conversions attributed to it. CAC is fully loaded: all sales and marketing cost — salaries, agencies, tools, spend — over all new customers, attribution-free. CPA tells you where the next dollar of budget should go; CAC tells you whether acquisition is affordable at all. The scoping also means CPA depends on an attribution model while CAC mostly doesn't, so when the two trend in opposite directions, look at attribution first.

What data does it need?

  • An ad_performance_daily table with channel, campaign, stat_date, and spend, as each platform reports it.
  • A conversions table from your backend or CRM with converted_at, conversion_type, and attributed channel/campaign fields — deduplicated, one row per real acquisition.
  • A written attribution rule (window and priority) applied consistently when stamping attributed_channel.

SQL patterns

Blended CPA by month PostgreSQL
WITH monthly_spend AS (
  SELECT
    date_trunc('month', stat_date) AS month,
    SUM(spend) AS spend
  FROM ad_performance_daily
  GROUP BY 1
),
monthly_acquisitions AS (
  SELECT
    date_trunc('month', converted_at) AS month,
    COUNT(*) AS acquisitions
  FROM conversions
  WHERE conversion_type = 'purchase'
  GROUP BY 1
)
SELECT
  s.month,
  s.spend,
  a.acquisitions,
  ROUND(s.spend / NULLIF(a.acquisitions, 0), 2) AS blended_cpa
FROM monthly_spend s
LEFT JOIN monthly_acquisitions a USING (month)
WHERE s.month >= date_trunc('month', CURRENT_DATE) - INTERVAL '12 months'
ORDER BY 1;
CPA by channel and campaign PostgreSQL
WITH spend AS (
  SELECT
    channel,
    campaign,
    SUM(spend) AS spend
  FROM ad_performance_daily
  WHERE stat_date >= CURRENT_DATE - INTERVAL '90 days'
  GROUP BY 1, 2
),
conv AS (
  SELECT
    attributed_channel AS channel,
    attributed_campaign AS campaign,
    COUNT(*) AS acquisitions
  FROM conversions
  WHERE conversion_type = 'purchase'
    AND converted_at >= CURRENT_DATE - INTERVAL '90 days'
  GROUP BY 1, 2
)
SELECT
  s.channel,
  s.campaign,
  s.spend,
  COALESCE(c.acquisitions, 0) AS acquisitions,
  ROUND(s.spend / NULLIF(c.acquisitions, 0), 2) AS cpa
FROM spend s
LEFT JOIN conv c USING (channel, campaign)
ORDER BY s.spend DESC;

Pitfalls

Summing platform-reported conversions. → Each platform attributes with its own windows and modeled conversions, so the same purchase is claimed multiple times. Count acquisitions once, in your warehouse, and let platform numbers steer only in-platform bidding.
Comparing CPAs across different conversion events. → A trial start on one channel and a paid subscription on another are not the same acquisition. CPA comparisons only mean something when the conversion event is identical — label the event on every card.
Ignoring the attribution window. → A 7-day-click CPA and a 30-day-click-plus-view CPA can differ by half for the same campaign. Fix one window, note it on the dashboard, and re-state history when you change it — otherwise the trend line is fiction.
Reading CPA in the first days of a campaign. → Conversions lag clicks, so young campaigns always look expensive and recently ended ones keep cheapening as late conversions land. Evaluate completed windows, or use a lagged view that excludes the immature tail.

Where this metric applies

Metrics

Dashboards

FAQ

CPA vs. CAC — what's the difference?
CPA is usually a channel- or campaign-level number: media spend divided by conversions attributed to that spend. CAC is fully loaded and company-wide — total sales and marketing cost, salaries and tools included, divided by all new customers. A campaign can post a healthy CPA while blended CAC drifts upward, because CPA never sees the fixed costs. Use CPA to steer budget between channels and CAC to judge whether the whole acquisition machine pays back.
Why do platform-reported CPAs disagree with our warehouse?
Every ad platform claims conversions using its own attribution rules — view-through windows, modeled conversions, its own click IDs — so Google Ads, Meta Ads, and TikTok Ads will happily claim the same purchase three times. Summing platform-reported conversions overcounts; the platform CPAs come out flatteringly low. Treat platform numbers as steering input for in-platform optimization, and compute the CPA you report from deduplicated conversions in your own warehouse.
Should I track blended or per-channel CPA?
Both, on the same dashboard. Blended CPA (all paid spend over all acquisitions) is robust to attribution noise and shows whether efficiency is really improving; per-channel CPA shows where to move budget. The failure mode is choosing one: blended-only hides a channel quietly getting expensive, per-channel-only lets attribution games flatter every channel at once while the blended number worsens. When per-channel CPAs all look great but blended CPA is rising, attribution is double-counting.
How do you calculate cost per acquisition?
Divide spend by acquisitions from the same period and scope: SUM(spend) / NULLIF(COUNT(acquisitions), 0). The two load-bearing choices are what counts as an acquisition — a paid customer, a subscription start, whatever target event you name — and which attribution window ties a conversion back to spend. Write both down once and apply them identically across channels, otherwise you are comparing definitions. Related: cost per lead prices the step before acquisition, CPC the step before that.
How do you track CPA in Metabase?
Metabase reads from your SQL database or warehouse, so land daily spend from Google Ads, Meta Ads, and LinkedIn Ads via a pipeline tool like Airbyte or Fivetran, alongside a deduplicated conversions table from your backend. Chart blended CPA by month, add a channel/campaign breakdown, and pin both to a paid channel performance dashboard next to ROAS.