---
updatedAt: 2025-01-29T10:30:18.000Z
agentTools:
  projectIndex: https://triplewhale.readme.io/llms.txt
---

# Facebook CPA

cpa

# Overview

Facebook Cost per Acquisition (CPA) measures the total Facebook advertising cost required to acquire one paying customer.

> 📘 Facebook CPA = Facebook Ad Spend / Facebook-Reported Conversions

The calculation is based on data from the [Ads](https://triplewhale.readme.io/docs/ads-table) table.

### Detailed breakdown

The formula above is derived from the following components:

Ad Spend = `SUM(spend)` --> [Ads](https://triplewhale.readme.io/docs/ads-table) table\
Channel-Reported Conversions (Purchases) = `SUM(conversions)` --> [Ads](https://triplewhale.readme.io/docs/ads-table) table\
Facebook Ads = `where channel = 'facebook-ads'`

# Insights and Actions

Facebook CPA is a key indicator of the cost-effectiveness of your Facebook ads in acquiring paying customers:

* **Optimize Audience Targeting**: Analyze CPA by audience segment to identify which groups provide the lowest cost per acquisition, and focus ad spend on those segments.
* **Enhance Creative Efficiency**: Experiment with different ad formats and creatives to reduce CPA and improve the efficiency of customer acquisition.
* **Reallocate Budget**: Direct ad spend towards campaigns and ad sets with lower CPA to improve the overall return on investment.
* **Test Offers and Landing Pages**: Use CPA as a measure to evaluate the effectiveness of your offers and landing pages. A higher CPA may indicate the need for more compelling offers or improved landing page performance to convert visitors into customers.

# Example Use

### Prompt

> What's my Facebook CPA over the last 30 days?

### Response

![](https://files.readme.io/ceb34b698ff45b60ce48ad2b02de85a64fea67441d021628934c273d5a6d1f47-image.png)

### Query

```sql
SELECT
  a.channel AS channel,
  COALESCE(SUM(a.spend) / NULLIF(SUM(a.conversions), 0), 0) AS cpa
FROM
  ads_table AS a
WHERE
  a.channel = 'facebook-ads'
  AND a.event_date BETWEEN CURRENT_DATE() - 30 AND CURRENT_DATE()  - 1
GROUP BY
  a.channel
ORDER BY
  cpa DESC;
```