> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pivolio.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pivolio.com/_mcp/server.

# TikTok

Pivolio delivers to TikTok Events API 2.0 (v1.3) at
`POST https://business-api.tiktok.com/open_api/v1.3/event/track/`, passing the
token in an `Access-Token` header.

## Get your credentials

These steps are directional — TikTok's Events Manager changes shape often, so
follow the concepts rather than exact menu labels.

#### Find your pixel code

In **TikTok Ads Manager**, open Events (Events Manager) and select the web
pixel you want conversions attributed to. Its pixel code is shown with the
pixel's details. Use the same pixel as your browser tag so events dedupe
against each other instead of double-counting.

#### Generate an access token

Generate an Events API access token for that pixel from TikTok's developer
or events setup area. Copy it when it is shown — it is not retrievable
afterwards.

#### Connect in Pivolio

Open **Destinations → TikTok**, paste the pixel code and access token, and
verify. Optionally supply a test event code for the verification call.

## Credential fields

#### pixel_code

The TikTok web pixel that conversions are attached to. Required.

#### access_token

The Events API token for that pixel, sent as the `Access-Token` header.
Required, stored encrypted, never returned. Rotate by pasting a new value.

#### test_event_code

Optional, and **used only at verification time — it is never stored**. It
routes the verification event into TikTok's test view. Persisting it would
keep production conversions out of your real reporting, so Pivolio drops it
once verification finishes.

## Event mapping

TikTok ships these defaults. Anything unlisted is skipped unless you add a
[custom mapping](/documentation/destinations/event-mappings).

| Pivolio event                      | TikTok event         |
| ---------------------------------- | -------------------- |
| `page_view`, `view_content`        | ViewContent          |
| `add_to_cart`                      | AddToCart            |
| `add_to_wishlist`                  | AddToWishlist        |
| `initiate_checkout`                | InitiateCheckout     |
| `add_payment_info`                 | AddPaymentInfo       |
| `order_completed`, `purchase`      | CompletePayment      |
| `lead_submitted`, `lead`           | SubmitForm           |
| `complete_registration`, `sign_up` | CompleteRegistration |
| `search`                           | Search               |
| `subscribe`                        | Subscribe            |
| `contact`                          | Contact              |
| `download`                         | Download             |
| `click_button`                     | ClickButton          |

Note that TikTok has no distinct page-view event — both `page_view` and
`view_content` land on ViewContent.

## The HTTP 200 quirk

TikTok answers almost everything with **HTTP 200**, including failures. The
real outcome is a numeric `code` in the response body: zero means accepted,
anything else is an error that a naive integration reads as success.

Pivolio inspects the body code, not just the status line, and classifies it:

| Body code                                   | Treated as                                      |
| ------------------------------------------- | ----------------------------------------------- |
| `40100`, `40101`, `40500`, `50000`, `50001` | Retryable — retried with backoff                |
| Any other non-zero                          | Permanent failure — surfaced in delivery health |

This is why a TikTok destination can show failures while every request
"succeeded" at the transport layer. If you are comparing Pivolio's delivery
numbers against your own logs, compare against the body code.

## Related

* [Event mappings](/documentation/destinations/event-mappings)
* [Consent rules](/documentation/destinations/consent-rules)
* [Troubleshooting](/documentation/destinations/troubleshooting-delivery)