TikTok Ads affiliate tracking: capture the ttclid and send sales through the Events API

November 19, 2026 · Hoplytic team · 2 min read

The short version: this guide in 53 seconds.
Read the video transcript

How do you track affiliate sales from TikTok ads? Capture the click ID, then send the sale back.

Put your tracking link in the ad. TikTok swaps in the campaign ID on every click, and the ad ID. It adds its click ID, the TTCLID, and your tracker stores it.

In Events Manager, set up a pixel and an Events API token. Give both to your tracker. Each sale goes back as a purchase event with the TTCLID and your commission.

TikTok opens links in its in-app browser, so pixels miss these sales. Server-side reporting doesn't.

Pick TikTok Ads in the link maker, and the macros and TTCLID are handled. Add TikTok under Send back, and each sale goes within about twenty seconds.

The full guide is right below. Hoplytic: ad tracking made simple.

Key points

TikTok traffic is cheap and fast to test, but its algorithm needs conversion signals to find buyers. With affiliate offers it never sees the sale unless you report it.

Short answer: put your tracking link in the ad with __CAMPAIGN_ID__ and __CID__ for campaign and ad. TikTok adds its click ID (ttclid), which your tracker stores. When the network reports the sale, the tracker sends it to TikTok's Events API with that ttclid and your commission as the value.

The URL

https://go.yoursite.com/offer?campaign=__CAMPAIGN_ID__&ad=__CID__

TikTok replaces the macros on each click and appends ttclid. Your tracker stores all three with the click and passes its own click ID to the affiliate network. See TikTok Ads macros for the full list.

Reporting sales to TikTok

  1. In TikTok Events Manager, set up a web event source (pixel) and generate an Events API access token.
  2. Give your tracker the pixel ID and the token.
  3. For each affiliate sale whose click has a ttclid, the tracker sends a purchase event with the ttclid, event time, value and currency.
  4. Use that event as the optimisation goal once it has enough volume.

Things that go wrong

Getting cost in

TikTok doesn't pass the cost of each click in the URL. Enter your daily spend from Ads Manager on the tracking link and your tracker spreads it over that day's clicks, giving cost, profit and ROAS per campaign and ad. See ROAS tracking.

On Hoplytic

Pick TikTok Ads in the link maker: the campaign and ad macros are added and the ttclid is stored automatically. Add TikTok under Send back with your pixel ID and access token, and each sale is sent within about 20 seconds of the network reporting it, retried for up to 12 hours if TikTok is unavailable.

Choose the ad platform, then when to send each sale and its value.

Questions people ask

Can I put the TikTok pixel on an affiliate offer?

Not on the merchant's thank-you page. Instead, your tracker learns about the sale from the network and sends it to TikTok's Events API with the ttclid from the original click.

What do I need for the Events API?

A pixel (event source) ID and an access token from TikTok Events Manager. The tracker sends each purchase with the ttclid, the time and the value.

Does TikTok allow affiliate links in ads?

TikTok reviews the landing page and has rules on misleading claims and certain product categories. Many affiliates send ads to their own landing page first. Check TikTok's advertising policies and the offer's terms.

More in Conversion tracking

Also: tracking glossary · ad platform macros · Markdown copy