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

# Facebook CPC

cpc

# Overview

Facebook Cost Per Click (Facebook CPC) refers to the Facebook-reported cost for each click on a Facebook ad.

> 📘 Facebook CPC = Facebook Ad Spend / Facebook Ad Clicks

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\
Clicks = `SUM(clicks)`  --> [Ads](https://triplewhale.readme.io/docs/ads-table) table\
Facebook Ads = `where channel = 'facebook-ads'`

# Insights and Actions

Facebook Cost Per Click (CPC) measures how much you spend for each click on your ads, providing insights into ad efficiency:

* **Track Campaign Efficiency**: Monitor CPC to gauge the cost-effectiveness of different Facebook campaigns, identifying which are giving you the best value per click.
* **Refine Ad Targeting**: Use CPC data to refine your targeting strategies, aiming for lower CPC with higher conversion potential.
* **Budget Optimization**: Allocate more budget to campaigns with a lower CPC to maximize reach without increasing spend.
* **A/B Testing**: Experiment with different ad elements (like images, headlines, and CTAs) to see which adjustments lead to a lower CPC.

# Example Use

### Prompt

> What was the Facebook CPC for yesterday?

### Response

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

### Query

```sql
SELECT
  COALESCE(SUM(a.spend) / NULLIF(SUM(a.clicks), 0), 0) AS cpc
FROM
  ads_table AS a
WHERE
  a.channel = 'facebook-ads'
  AND a.event_date = CURRENT_DATE() - 1
  AND a.clicks > 0;
```