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

# Ad Platform Pixels

> Send OnlyFans conversions to Meta Conversions API and TikTok Events API server-side, and optimize ad campaigns on real subscription and purchase events.

You cannot install a browser pixel on OnlyFans: it is not your website. Ad Platform Pixels solve this server-side. When a fan attributed to your [Tracking Link](/tracking-links) subscribes, buys or starts chatting, our servers send the event straight to the Meta Conversions API or TikTok Events API with the matching data the platforms need.

The result: Meta and TikTok see which ads produce paying subscribers, and their smart campaigns can optimize for that instead of clicks.

## What gets sent

Each event carries the fields ad platforms use for attribution and match quality:

| Field              | Content                                                                    |
| ------------------ | -------------------------------------------------------------------------- |
| Event name         | Your mapped event, e.g. `Subscribe`, `Purchase`, `Lead`                    |
| Click ID           | `fbc` (built from the captured `fbclid`) for Meta, raw `ttclid` for TikTok |
| External ID        | The fan's OnlyFans ID, SHA-256 hashed. Never sent in plain text            |
| IP and user agent  | Of the original ad click, to raise event match quality                     |
| Landing page URL   | The OnlyFans page the click landed on                                      |
| Event ID           | A stable deduplication key, safe against retries                           |
| Value and currency | Purchase amount in USD, on transaction events only                         |

No names, emails or message content are ever sent. Access tokens are stored encrypted and are not displayed again after saving.

<Info>
  Click IDs are captured automatically when the visitor arrives through your Tracking Link with `fbclid` or `ttclid` in the URL. Meta and TikTok append these to ad traffic by default, so there is nothing to configure on the ad side.
</Info>

## Events you can map

| Event                | Fires when                                                       | Meta default | TikTok default    |
| -------------------- | ---------------------------------------------------------------- | ------------ | ----------------- |
| New Subscriber       | A fan subscribes through your link                               | `Subscribe`  | `Subscribe`       |
| New Transaction      | An attributed fan spends money (subscription, renewal, tip, PPV) | `Purchase`   | `CompletePayment` |
| Dialog (3+ messages) | An attributed fan exchanges 3 or more chat messages              | `Lead`       | `Contact`         |

You can remap any event to another standard platform event, or disable it. Transaction events include the amount, so keep them on `Purchase` / `CompletePayment` if you plan to use value-based optimization.

## Set up a Meta pixel

<Steps>
  <Step title="Get your Pixel ID and token">
    In Meta **Events Manager**, open your dataset (pixel) and copy its ID. Then go to **Settings**, find the **Conversions API** section and click **Generate access token**.
  </Step>

  <Step title="Add the pixel in Studio">
    Open **Tracking Links > Pixels**, click **Add pixel**, choose **Meta Ads**. Paste the Pixel ID and the access token, adjust event mapping if needed.
  </Step>

  <Step title="Verify with a test event">
    Paste a **Test Event Code** from the Events Manager **Test events** tab and save. Send a test from Studio and watch it appear in Test events. Clear the code when you go live, otherwise events stay in test mode.
  </Step>

  <Step title="Attach the pixel to links">
    In the link's create or settings dialog, pick the pixel under **Destinations**. One pixel can serve any number of links, and one link can feed several pixels.
  </Step>
</Steps>

## Set up a TikTok pixel

<Steps>
  <Step title="Get your Pixel Code and token">
    In TikTok **Events Manager**, open your web events pixel and copy the pixel code. Then go to **Settings** and use **Generate Access Token** (Events API).
  </Step>

  <Step title="Add the pixel in Studio">
    Open **Tracking Links > Pixels**, click **Add pixel**, choose **TikTok Ads**. Paste the pixel code and the access token.
  </Step>

  <Step title="Test, then go live">
    Use a **Test Event Code** from TikTok's test tool to verify delivery, then clear it.
  </Step>

  <Step title="Attach the pixel to links">
    Select the pixel under **Destinations** on the links that receive TikTok traffic.
  </Step>
</Steps>

## Health checks

Studio verifies each pixel continuously:

* **On save**: a test event is sent immediately to confirm the token and pixel ID work.
* **On every live event**: the platform's response updates the health badge, so an expired token is flagged within minutes of the first failed send.
* **Daily**: quiet pixels are probed in the background.

A red badge shows the exact error returned by the platform. The most common cause is an expired or regenerated access token: create a new token and save it in the pixel form.

Health probes always carry a test event code, so they never pollute your ads reporting.

## Running smart campaigns on pixel events

* Optimize Meta campaigns for the `Subscribe` or `Purchase` event received through the pixel, and TikTok campaigns for `Subscribe` or `CompletePayment`.
* Purchase events carry USD values that match your OnlyFans earnings, so value-based bidding reflects real revenue, not proxy metrics.
* Events arrive within about a minute of the conversion. Renewals and later purchases keep flowing in as `Purchase` events for as long as the link stays active.
* Use one pixel per ad account and attach it to every Tracking Link that receives traffic from that account.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Events do not show up in Events Manager">
    Check the pixel's health badge in **Tracking Links > Pixels** and the [delivery log](/tracking-links-postbacks#delivery-log). If deliveries show as failed, the response body contains the platform's error message. If there are no deliveries at all, the link has no conversions yet: events fire on subscriptions, not clicks.
  </Accordion>

  <Accordion title="Events arrive but match quality is low">
    Make sure your ads keep `fbclid` / `ttclid` in the destination URL (platforms add them by default; some URL shorteners strip them). Events for fans who arrived without a click ID still send the hashed external ID, IP and user agent, but match worse.
  </Accordion>

  <Accordion title="Test events do not appear">
    The test event code must be currently open in the platform's test tool while you send. Codes expire; grab a fresh one from Events Manager and save it in the pixel form.
  </Accordion>

  <Accordion title="Purchases have no value">
    Values are attached to the New Transaction event only. If you remapped New Subscriber to Purchase, those events carry no amount; keep Purchase mapped to New Transaction.
  </Accordion>
</AccordionGroup>
