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

# Whop Ads

> Connect Whop Ads and deliver conversions from Stripe, Shopify, and your app.

When you finish, a sale from Stripe, Shopify, or your app shows under **Results** on the Whop ad that earned it.

Three steps. Each one links to the page that owns the detail.

<Steps>
  <Step title="Install tracking">
    Put the Datalyr tracking script on the page your Whop ads send traffic to. See [Install](/installation/index). It links each ad click to a `visitor_id`.
  </Step>

  <Step title="Connect your revenue source">
    Connect where your sales happen, and link each sale to the visitor.

    | Source     | Setup page                        | What links the sale to the visitor                                 |
    | ---------- | --------------------------------- | ------------------------------------------------------------------ |
    | Shopify    | [Shopify](/revenue/shopify)       | The Datalyr **App embed** in your theme                            |
    | Stripe     | [Stripe](/revenue/stripe)         | `client_reference_id` on Checkout, `metadata.visitor_id` elsewhere |
    | RevenueCat | [RevenueCat](/revenue/revenuecat) | `getRevenueCatAttributes()` in your app                            |
    | Superwall  | [Superwall](/revenue/superwall)   | `getSuperwallAttributes()` in your app                             |

    For an app, the ad still lands on a web page first. Put the tracking script there. See [app campaigns](/advanced/app-campaigns).
  </Step>

  <Step title="Connect Whop Ads and set up conversions">
    Do the two procedures below. They take about two minutes.
  </Step>
</Steps>

## Connect Whop Ads

You must be an owner or admin of the Whop business, and an owner or admin in Datalyr.

<Steps>
  <Step title="Open the Whop Ads card">
    In Datalyr, open **Sources**. Select the **Whop Ads** card.
  </Step>

  <Step title="Install the Datalyr app">
    Select **Install Whop app**. Pick your business on Whop. Leave every permission ticked. Approve.
  </Step>

  <Step title="Connect">
    Back in **Sources**, select **connect** on the **Whop Ads** card. Sign in to Whop. Select **Approve**. Whop returns you to **Sources**, and the **Whop Ads** sheet opens.
  </Step>

  <Step title="Add the pixel">
    In the sheet, find **Tracking pixel**. Select **Add pixel**. If the row already shows **Installed**, skip this.
  </Step>
</Steps>

## Set up conversions

<Steps>
  <Step title="Open conversion setup">
    In **Sources**, find the card for your revenue source. Select the flag button, **Set up conversions**.
  </Step>

  <Step title="Pick Whop">
    Tick **Whop · Web** or **Whop · App**. **Account** shows **Connected Whop Ads account**.
  </Step>

  <Step title="Create the rules">
    Open **Preview mappings** to read the rules. Select **Create rules**.
  </Step>
</Steps>

On Shopify, keep Whop's custom pixel in **Customer events** if you added one. We send the order under the same ID, so Whop keeps one copy.

## Reference

### Event names

We rename these events and send every other name unchanged.

| Datalyr event                                                      | Sent to Whop as         |
| ------------------------------------------------------------------ | ----------------------- |
| `purchase`                                                         | `purchase`              |
| `signup`, `sign_up`, `signed_up`, `registration`                   | `complete_registration` |
| `trial_started`, `start_trial`                                     | `start_trial`           |
| `checkout_started`, `begin_checkout`                               | `initiate_checkout`     |
| `view_item`                                                        | `view_content`          |
| `lead`, `add_to_cart`, `schedule`, `contact`, `submit_application` | the same name           |

A custom name must match `^[a-z0-9_]{1,40}$`. We lowercase it and replace other characters with `_`.

### What links a sale to an ad

| Key                                                                            | Where it comes from                                                                                   |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| Whop visitor ID (`_wuid`)                                                      | The Whop pixel sets it. The tracking script pairs it with `visitor_id` and keeps the pair for 35 days |
| Landing URL                                                                    | The first page of the visit, with `wacid`, `wasid`, and `waid` intact                                 |
| `email`, `phone`, name, city, state, postal code, country                      | The revenue source. Sent in plain text, as Whop requires                                              |
| `ip_address`, `user_agent`, `fbclid`, `fbc`, `fbp`, `gclid`, `ttclid`, `utm_*` | The visit                                                                                             |

We skip an event that has none of these, because Whop can't credit it.

### `action_source`

| Case                                                                      | Value            |
| ------------------------------------------------------------------------- | ---------------- |
| The user clicked a Whop ad on the web, then paid on the web or in the app | `website`        |
| A **Superwall** or **RevenueCat** event with no web visit                 | `app`            |
| The rule sets a value                                                     | The rule's value |

### Limits

| Limit                    | Value                                                                                                                     |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| Event age                | 27 days. Whop rejects an older event                                                                                      |
| `purchase` value         | Must be over 0                                                                                                            |
| `currency`               | ISO 4217, sent lowercase. The rule's currency, else `usd`                                                                 |
| Deduplication            | Whop keeps one event per `event_name` and `event_id`. A Shopify order uses `shopify:purchase:<order id>`                  |
| Browser `purchase` calls | Don't call `whop.track("purchase")` on your own pages. We send the sale, and Whop counts a second ID as a second purchase |
| Request timeout          | 10 seconds. We retry HTTP 429 and 5xx                                                                                     |

<Warning>
  Whop can't delete an event. A test `purchase` stays on the ad's **Results** and **Return** for good, so don't send one with a made-up amount.
</Warning>

### Whop Payments

Whop already has a sale it processed, so we never send it back. Connect [Whop Payments](/revenue/whop) to read those sales in Datalyr.

**Whop Ads** and **Whop Payments** must use the same Whop business. They share one pixel.

## Verify

1. Click your own live Whop ad in a normal browser window. Whop ignores automated browsers.
2. Finish one real action the rule covers, such as a signup.
3. Open **Conversions**. Confirm the rule's `sent` count went up by 1.
4. Wait 2 minutes. In Whop, open the ad. Confirm the event shows under **Results**.

## When it does not work

| Symptom                                                         | Cause                                                                     | Fix                                                                                                    |
| --------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Connect returns `Install the Datalyr app on your Whop business` | The app isn't on a business you manage, or **Create events** was unticked | In **Sources**, select the **Whop Ads** card, then **Install Whop app**. Leave every permission ticked |
| Delivery `skipped`, reason `whop_no_match_key`                  | No `visitor_id`, landing URL, or contact field reached the sale           | Do the **Link the visitor** row for your source                                                        |
| Delivery `skipped`, reason `whop_purchase_value_required`       | The `purchase` has no amount                                              | Set the rule's **value** to `dynamic`                                                                  |
| Whop counts one sale twice                                      | Your page also sends `purchase` from the browser                          | Remove the `whop.track("purchase")` call                                                               |
| Results show on Whop with no ad                                 | The event matched a person, not a click                                   | Keep `wacid`, `wasid`, and `waid` on the ad's destination URL                                          |

## Next

* [Conversion delivery](/advanced/conversion-delivery): retry, dedup, and status rules for every platform.
* [Pixels & scripts](/advanced/pixels-and-scripts): what loads through the Container, and how consent gates it.
* [Whop Payments](/revenue/whop): read Whop checkout sales and memberships in Datalyr.
