> ## 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.

# Purchase Event Attribution

> Upstack Data attributes each purchase to the ad clicks that led to it and fires first-click, last-click, and single-click conversion events for your destinations.

When a customer buys something, Upstack looks back at the paid ad clicks that led to the purchase and fires extra conversion events based on what it finds:

* **First Paid Click** (`fpc_*`) — the first paid ad click in the customer's journey
* **Last Paid Click** (`lpc_*`) — the most recent paid ad click before the purchase
* **First and Only Paid Click** (`fopc_*`) — when the journey had just one paid ad click

Each event is named for where the click came from, and Upstack forwards it to that destination. The first and last click can come from different places, so one purchase can send First Paid Click to Meta and Last Paid Click to Google Ads.

<Warning>
  When the whole journey had just one paid click, Upstack fires only the `fopc_*` event — not `fpc_*` or `lpc_*`. If you optimize on `fpc_*` alone, those purchases will not count.
</Warning>

## Available events

Each purchase fires up to two of these events: First Paid Click and Last Paid Click, or First and Only Paid Click on its own. A new customer's order, or the first order of a subscription, fires an extra set.

Each destination names these events its own way — match them exactly when you set up conversions.

### Meta

| Attribution model  | Any purchase       | New customer         | Subscription initial                  |
| ------------------ | ------------------ | -------------------- | ------------------------------------- |
| First Paid Click   | `fpcMetaPurchase`  | `fpcMetaNcPurchase`  | `fpcMetaSubscriptionInitialPurchase`  |
| Last Paid Click    | `lpcMetaPurchase`  | `lpcMetaNcPurchase`  | `lpcMetaSubscriptionInitialPurchase`  |
| First & Only Click | `fopcMetaPurchase` | `fopcMetaNcPurchase` | `fopcMetaSubscriptionInitialPurchase` |

### TikTok

| Attribution model  | Any purchase         | New customer           | Subscription initial                    |
| ------------------ | -------------------- | ---------------------- | --------------------------------------- |
| First Paid Click   | `FpcTiktokPurchase`  | `FpcTiktokNcPurchase`  | `FpcTiktokSubscriptionInitialPurchase`  |
| Last Paid Click    | `LpcTiktokPurchase`  | `LpcTiktokNcPurchase`  | `LpcTiktokSubscriptionInitialPurchase`  |
| First & Only Click | `FopcTiktokPurchase` | `FopcTiktokNcPurchase` | `FopcTiktokSubscriptionInitialPurchase` |

### Google Ads

These are the names shown in Upstack. You map each one to a conversion action you choose in Google Ads.

| Attribution model  | Any purchase           | New customer              | Subscription initial      |
| ------------------ | ---------------------- | ------------------------- | ------------------------- |
| First Paid Click   | `fpc_google_purchase`  | `fpc_google_nc_purchase`  | `fpc_google_si_purchase`  |
| Last Paid Click    | `lpc_google_purchase`  | `lpc_google_nc_purchase`  | `lpc_google_si_purchase`  |
| First & Only Click | `fopc_google_purchase` | `fopc_google_nc_purchase` | `fopc_google_si_purchase` |

### AppLovin

These events fire and are visible in Upstack, but they are not sent to AppLovin — see below.

| Attribution model  | Any purchase             | New customer                | Subscription initial        |
| ------------------ | ------------------------ | --------------------------- | --------------------------- |
| First Paid Click   | `fpc_applovin_purchase`  | `fpc_applovin_nc_purchase`  | `fpc_applovin_si_purchase`  |
| Last Paid Click    | `lpc_applovin_purchase`  | `lpc_applovin_nc_purchase`  | `lpc_applovin_si_purchase`  |
| First & Only Click | `fopc_applovin_purchase` | `fopc_applovin_nc_purchase` | `fopc_applovin_si_purchase` |

**What you need to set up:**

* **Meta** — Upstack sends these automatically as custom events, but you must set each one up in Meta Events Manager before you can optimize on it. See [How to approve Meta custom events](/destinations/catalog/meta-capi/how-to-approve-facebook-meta-custom-events).
* **TikTok** — Upstack sends these automatically as custom events.
* **Google Ads** — map each event to a conversion action on the destination. Until you map it, the event fires but nothing reaches Google. See [Set up Google Ads server-side conversions](/destinations/catalog/google-ads/how-to-set-up-google-ads-server-side-conversions-api-in-upstack-data).
* **AppLovin** — not forwarded. AppLovin has no Conversions API, so there is nowhere to send them. The events are still generated, so you can see them in Upstack.

## Attribution window

The attribution window decides how far back Upstack searches for paid clicks before a purchase. You can change it in [Pixel Settings](https://app.upstackdata.com/account/settings/pixel) under **Purchase Event Attribution**:

| Option                              | What it considers                                 |
| ----------------------------------- | ------------------------------------------------- |
| **Lifetime** (default)              | The customer's entire journey                     |
| **7 / 14 / 28 / 30 / 60 / 90 days** | Only clicks within that many days of the purchase |

**Lifetime** gives the most complete picture. Pick a shorter window if your purchase cycle is quick and you only want recent clicks to count.

## Using the events

* **`fpc_*` events** tell you which campaigns introduce customers to your brand. Map `fpc_google_purchase` as a conversion action in Google Ads to optimize for first-touch acquisitions.
* **`lpc_*` events** show which campaigns close the sale. Compare FPC and LPC attribution to see which campaigns start journeys and which ones close them.
* **`fopc_*` events** mark purchases where one ad click drove the whole journey.

## Related

<CardGroup cols={2}>
  <Card title="Set up UTM parameters" icon="link" href="/guides/attribution/how-to-setup-utm-parameters-for-upstack-data">
    Tag your ad URLs so Upstack can attribute clicks to the right campaign.
  </Card>

  <Card title="Configure Google Ads" icon="sliders" href="/destinations/catalog/google-ads/how-to-configure-google-ads-destination-in-upstack-data">
    Set up the Google Ads destination that receives these events.
  </Card>

  <Card title="Global event mappings" icon="globe" href="/guides/custom-events/global-event-mappings">
    Map an attributed event to a conversion action on each destination.
  </Card>

  <Card title="Verify events" icon="circle-check" href="/quickstart/verify-events">
    Confirm events are firing from your storefront.
  </Card>
</CardGroup>
