> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost per Purchase: Measure Ad Spend Efficiency

> Track cost per purchase to measure ad spend efficiency for your Shopify store. Calculate your average advertising cost per conversion event.

<Tip>
  Cost per Purchase measures the average advertising spend required to generate one purchase event tracked by the Upstack pixel.
</Tip>

## Formula

<Info>
  **Cost per Purchase** = **Channel Spend** ÷ **Purchase Events**
</Info>

### Formula Components

| Metric              | Definition                                                |
| ------------------- | --------------------------------------------------------- |
| **Channel Spend**   | Total advertising spend across all connected ad platforms |
| **Purchase Events** | Purchase events tracked by the Upstack pixel              |

| Metadata        |                         |
| --------------- | ----------------------- |
| **Type**        | Currency                |
| **Data Source** | [Upstack Pixel](/pixel) |
| **Aggregation** | Ratio                   |

***

## Example

Your Shopify store spent **\$15,000 on ads** in March and the Upstack pixel tracked **500 purchase events**.

| Week      | Ad Spend     | Purchase Events | Cost/Purchase |
| --------- | ------------ | --------------- | ------------- |
| Week 1    | \$3,500      | 110             | \$31.82       |
| Week 2    | \$4,000      | 130             | \$30.77       |
| Week 3    | \$3,800      | 125             | \$30.40       |
| Week 4    | \$3,700      | 135             | \$27.41       |
| **Total** | **\$15,000** | **500**         | **\$30.00**   |

***

## How It Works

Upstack calculates Cost per Purchase by dividing your total advertising spend across all channels by the number of purchase events tracked by the pixel. This gives you a unified cost efficiency metric that spans Meta, Google, TikTok, and any other connected ad platforms—measuring how much you spend on average to generate each Shopify purchase.

***

## When to Use

| Scenario                 | Action                                                    |
| ------------------------ | --------------------------------------------------------- |
| Evaluating ad efficiency | Compare against target CPA to assess campaign health      |
| Budget optimization      | Shift spend toward channels with lower cost per purchase  |
| Forecasting              | Project total ad spend needed to hit revenue targets      |
| Channel comparison       | Identify which platforms drive purchases most efficiently |

***

## Related Metrics

| Metric                                                                                   | Relationship                                   |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [Conversions](/reference/metrics/funnel/conversions/conversions)                         | Attributed conversion events for ROAS analysis |
| [Conversion Value](/reference/metrics/funnel/conversions/conversion-value)               | Total revenue from conversions                 |
| [Session Conversion Rate](/reference/metrics/funnel/conversions/session-conversion-rate) | Percentage of sessions that convert            |

[See all Attributed Conversions metrics →](/reference/metrics/funnel/conversions)
