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

# Postbacks to Meta and TikTok

> Send matched installs and purchases back to the ad network, so it can optimise on them.

A web-to-app ad is a website ad to Meta and TikTok. TrueOrigin reports the install and the
purchases after it as **website events on your own Meta dataset or TikTok pixel**, the
events the click page would have sent if the user had converted on the web. No Meta or
TikTok SDK goes into your app.

## Connect Meta

1. Meta **Events Manager → Data sources →** the dataset (Pixel) your ads optimise on
   **→ Settings**. Copy the **Dataset ID**.
2. On the same page, under **Conversions API**, **Generate access token**.
3. In the dashboard, **Settings → Meta → Connect Meta**, paste both.

## Connect TikTok

1. TikTok **Events Manager →** the pixel your ads use **→ Settings**. Copy the **Pixel
   code**.
2. **Generate Access Token** (Events API).
3. In the dashboard, **Settings → TikTok → Connect TikTok**, paste both.

## Test before going live

1. In Events Manager, open **Test events** and copy the **test event code**.
2. Enter it as **Test event code** in the dashboard. While it is set, every event is sent
   as a test and counts for nothing in reporting or optimisation.
3. **Send test event** sends one install right away. It shows under Test events within a
   minute.
4. Clear the code to go live.

The row shows **Live**, **Test mode**, **Paused** or **Error** with the network's last
error.

## What is sent

| Event                    | Meta                   | TikTok       |
| ------------------------ | ---------------------- | ------------ |
| Install                  | `CompleteRegistration` | `Download`   |
| Trial started            | `StartTrial`           | `StartTrial` |
| Trial converted          | `Subscribe`            | `Subscribe`  |
| Subscription started     | `Subscribe`            | `Subscribe`  |
| Renewal (off by default) | `Purchase`             | `Purchase`   |
| One-time purchase        | `Purchase`             | `Purchase`   |

Each event can be switched off or renamed per network. Renewals are off by default: they
land long after the click, outside the networks' attribution windows. Purchase events
carry the price and currency from [RevenueCat](/revenuecat).

* Only **matched** installs are sent, and only to the network the install counts for:
  * A tap on your ad link goes to the network of its click id: `fbclid` to Meta, `ttclid`
    to TikTok.
  * A tap on a named link, such as a creator's, goes nowhere, even with `fbclid`:
    Instagram adds that to taps on a bio link that no ad paid for. Put the link in an ad
    with the network's [URL parameters](/tracking-links) and its taps go to that network.
  * Ambiguous and unmatched installs are never sent.
* Each event carries the tap's click id, IP address and user agent, as the Pixel would
  have, and a hashed install id so the network can deduplicate.
* Refunds, cancellations, and sandbox or test purchases are never sent.
* Postbacks start with the first install matched after you connect. Nothing is sent
  retroactively, and events older than 7 days are skipped because the networks reject
  them.

Google, Snapchat and Apple Ads postbacks are not available yet.
