Skip to main content
You can optimize your TikTok ads based on events that happen after form submission — such as sales, offer completions, or buyer acceptance — by sending server-side events from Pingtree to TikTok’s Events API. This gives you more accurate attribution than pixel-based tracking alone, especially when combined with the ttclid click identifier.

Capturing the TikTok Click ID

When a lead arrives from a TikTok ad, Pingtree automatically captures the ttclid parameter from the URL and stores it on the lead record. This identifier links the conversion back to the specific ad click, improving match rates in TikTok Ads Manager.

Step 1: Generate an Access Token

  1. Log into TikTok Ads Manager.
  2. Open the Pixel you want to track with.
  3. Go to the Settings tab.
  4. Click Generate Access Token under Server-Side Tracking.
Save this token securely — you’ll need it to authorize all API calls. Tokens expire periodically, so set a reminder to rotate them.

Step 2: Define Conversion Points

TikTok conversion events can be tied to any stage in the lead lifecycle. You can map any TikTok standard event or custom event to a Pingtree trigger:
TriggerWhen It FiresConfigure At
Form SubmissionUser submits a formSource > Postbacks > On Form Submit
Lead SoldLead is accepted by a buyerDistribution > Posting API
Offer Wall ClickUser clicks on an offerSource > Postbacks > On Offer Click
Offer Wall ConversionUser completes a third-party offerSource > Postbacks > Filter by Events
Custom Buyer-Based EventsLead is routed to a specific buyerDistribution > Routing Rules with event conditions

Step 3: Send Events to TikTok

Endpoint:
POST https://business-api.tiktok.com/open_api/v1.3/event/track/
Headers:
Access-Token: {YOUR_ACCESS_TOKEN}
Content-Type: application/json
Tip: Confirm the exact endpoint version in your TikTok Events Manager, as TikTok may update the API version over time.

Payload Field Mapping

Pingtree FieldTikTok FieldJSON PathNotes
emailemaildata.0.user.emailSHA-256 hashed
mobilephone_numberdata.0.user.phoneSHA-256 hashed
transaction_idevent_iddata.0.event_idUnique per event
ipipdata.0.user.ipImproves match rate
user_agentuser_agentdata.0.user.user_agentRecommended
ttclidttcliddata.0.user.ttclidTikTok click identifier
utc_timestamptimestampdata.0.event_timeUNIX timestamp in UTC
revenuevaluedata.0.properties.valueRevenue or sale amount
(static)event_sourceevent_sourceSet to "web"
(custom)eventdata.0.evente.g., CompleteRegistration, Purchase
(static)currencydata.0.properties.currencyUsually "USD"
(static)content_typedata.0.properties.content_typeUsually "product"

Sample Payload

{
  "event_source": "web",
  "event_source_id": "{PIXEL_ID}",
  "data": [
    {
      "event": "CompleteRegistration",
      "event_time": 1655321234,
      "event_id": "txn_abc123",
      "user": {
        "email": "c3fcd3d76192e4007dfb496cca67e13b",
        "phone": "b7c3d3d131bde4123ac85b9e6807631f",
        "ttclid": "E.C.P.abc123xyz",
        "ip": "203.0.113.1",
        "user_agent": "Mozilla/5.0..."
      },
      "properties": {
        "value": 50.0,
        "currency": "USD",
        "content_type": "product"
      }
    }
  ]
}

Attribution Tips

  • Always include ttclid when available — it is the strongest signal for TikTok attribution.
  • Hash email and phone with SHA-256 before sending. Pingtree’s data transformer can handle this automatically.
  • Use real event timestamps in UTC to avoid time drift issues.
  • Include ip and user_agent to improve match rates when ttclid is not available.

Troubleshooting

TikTok provides a Test Events tool in the Events Manager to validate your server-side events before going live:
  1. In TikTok Events Manager, locate your pixel and find the Test Events section.
  2. Copy the test event code.
  3. In Pingtree, go to your postback configuration and add a static field with the test code.
  4. Fire a test event using the Test Postback tool in Pingtree.
  5. Check TikTok Events Manager to confirm the event was received and matched.
For implementation help, contact your account manager or reach out via Live Support in the Pingtree app.