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

# ElasticFunnels

> Connect ElasticFunnels so every sale, refund and renewal is credited back to the video that made it.

TrackPlay tags every ElasticFunnels checkout link on your page with the viewer's session,
carried on `vtid`. ElasticFunnels posts each sale back with that value attached, and
TrackPlay joins it to the play that produced it.

## Connect it

<Snippet file="connect-integration.mdx" />

The parameter to pick is **`vtid`**, which is already selected for you. Change it only if
you use `vtid` for something else.

## Set up the postback URL

Copy the URL from the **Postback Setup** window. In ElasticFunnels, go to
**Settings → Merchants**, pick your merchant, click **Edit**, and open the
[**Postback URLs**](https://docs.elasticfunnels.io/merchants/postback-urls) tab. Paste the
URL in and tick **Enabled**.

Then push a test sale. The status flips from **Not configured** to **Active** the moment
the first postback lands.

<Warning>
  Your postback URL is a secret. Anyone holding it can post fake conversions into your
  workspace. Give it to ElasticFunnels and nobody else.
</Warning>

## Signing secret

ElasticFunnels signs every postback it sends. Paste the signing secret from that same
**Postback URLs** tab into TrackPlay and each delivery is checked against the signature
before it is accepted, so nobody who guesses your URL can write a sale into your account.

The secret is optional. Leave it blank and your postbacks still land, with the URL itself
as the only protection. Fill it in if you can: ElasticFunnels shows the secret once, so
copy it when you first set the postback up.

<Note>
  ElasticFunnels lets you rotate the signing secret at any time. If you do, paste the new
  one into TrackPlay in the same sitting. Postbacks signed with a secret TrackPlay does not
  have are rejected.
</Note>

## Which events are recorded

| ElasticFunnels event   | Recorded as  |
| ---------------------- | ------------ |
| `purchase`             | Sale         |
| `subscription_renewal` | Rebill       |
| `refund`               | Refund       |
| `chargeback`           | Chargeback   |
| `subscription_cancel`  | Cancellation |

Refunds and chargebacks come through with a negative amount from ElasticFunnels. TrackPlay
records the gross amount and marks the row as a refund, so your revenue reporting nets out
correctly without any double negatives.

Everything else ElasticFunnels can send is acknowledged and not recorded, because none of
it is money moving: `abandon`, `shipped`, `failed_payment`, `subscription_change` and
`subscription_renewal_failed`. A plan upgrade or downgrade is not counted; the renewal that
follows it reports the new amount by itself.

Test sends and sandbox merchants are flagged as test conversions, so they never reach your
real revenue numbers.

## What TrackPlay does to your links

Every link and form pointing at an ElasticFunnels checkout (the `/b?p=` pattern) gets the
parameter added automatically.

```
https://pay.example.com/b?p=OFFER123
→ https://pay.example.com/b?p=OFFER123&vtid=<session>
```

ElasticFunnels links are the one case where TrackPlay does not also append its own `tp_ck`
key. `vtid` already carries everything needed to attribute the sale, so the checkout URL
stays as short as it can be.

## When it does not work

<AccordionGroup>
  <Accordion title="Status is stuck on 'Not configured'">
    No postback has arrived yet. Check the URL is saved in the **Postback URLs** tab, that
    **Enabled** is ticked, and push a real test sale.
  </Accordion>

  <Accordion title="Postbacks are rejected">
    The signing secret does not match. Re-copy it from ElasticFunnels (a trailing space is
    enough to break it) and save again. Deliveries older than five minutes are also
    rejected, which normally means a clock problem rather than a wrong secret.
  </Accordion>

  <Accordion title="Sales arrive with no video attached">
    The link was not tagged. Confirm your buy button points at a `/b?p=` checkout URL and
    that no redirect in between is stripping the query string. A sale made from a link you
    built by hand, or an organic one, has no session to join to and will show up
    unattributed.
  </Accordion>

  <Accordion title="ElasticFunnels keeps retrying">
    ElasticFunnels retries a failed delivery on a 1m → 5m → 30m → 2h → 12h schedule and
    then marks it dead. You can re-queue it from its own delivery log once the cause is
    fixed.
  </Accordion>
</AccordionGroup>
