Skip to main content
FEATURE · TIKTOK INTEGRATION

TikTok finally knows your ad worked.

Browser Pixel plus Events API server-side mirror, with ttclid captured and event_id deduplicated. Restaurant TikTok Shopping campaigns can finally optimize toward orders.

TL;DR
  • Every diner tap fires both ttq.track (browser) and an Events API POST (server), deduped by event_id.
  • The ttclid URL parameter is captured on landing, cookie-stored, and re-attached to every conversion downstream.
  • TikTok Shopping campaigns optimize toward your PlatformClick event within ~7 days.
WHY TIKTOK IS DIFFERENT FROM META

Different click ID, different API, different dedup semantics.

A common mistake we see is teams that built Meta CAPI assume they can clone the same logic for TikTok. They cannot. TikTok\'s click identifier is ttclid (Meta uses fbclid). TikTok\'s server endpoint is business-api.tiktok.com/open_api/v1.3/event/track/ (Meta uses graph.facebook.com). TikTok\'s field naming is different — content_id and content_name instead of Meta\'s custom_data block.

TikTok also has a quirk where the browser Pixel\'s queueing model can drop events if the page transitions before ttq.track resolves. For restaurant smart links, where the user taps DoorDash and the page hands them off in under 300ms, this is a real problem. Our implementation fires the server Events API call in parallel with the browser Pixel call, so even if the browser call gets cancelled mid-redirect, the server event always lands.

On top of all this, TikTok\'s ad blocker situation is worse than Meta\'s. The browser Pixel is blocked by a much higher percentage of users — easily 30-40% on iOS — because privacy-conscious users explicitly target TikTok. Events API is the only way to keep TikTok\'s algorithm honest about which ads actually drive orders.

HOW DINEROUTE IMPLEMENTS IT

Three things happen between landing and the deduplicated TikTok event.

The pattern mirrors Meta CAPI in structure, but every field name and endpoint is TikTok-specific.

01

ttclid captured on landing

TikTok appends ?ttclid=... to every ad-click URL. On page load we parse it out, persist to a first-party cookie, and keep it on hand for the conversion event downstream.

02

Browser Pixel fires the click

On the platform tap we call ttq.track("ClickButton", { content_name: "doordash" }, { event_id }) — the browser side. Same event_id pattern as our Meta CAPI setup.

03

Events API server-side mirror

A simultaneous POST to https://business-api.tiktok.com/open_api/v1.3/event/track/ ships the deduped event with ttclid, IP, UA, and (optionally) hashed email/phone.

EXAMPLE EVENTS API PAYLOAD (the server side of one click)
{
  "pixel_code": "C8R2FOUBP1QABCDEFGH",
  "event": "ClickButton",
  "event_id": "c2c7e62a-9a4b-4f5a-b6f1-2b7e3a9a8c2d",
  "timestamp": "2026-05-21T15:00:00Z",
  "context": {
    "ad": { "callback": "ttclid_value_restored_from_cookie" },
    "page": { "url": "https://malai.dineroute.com/southlake" },
    "user": {
      "external_id": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "ip": "203.0.113.42",
      "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 ...)"
    },
    "limited_data_use": false
  },
  "properties": {
    "content_id": "doordash",
    "content_name": "DoorDash · Southlake",
    "currency": "USD",
    "value": 0
  },
  "test_event_code": "TEST12345"
}
Our TikTok CPA is lower than Meta\'s now. That has never been true.
A restaurant CMO 21 days into TikTok Shopping · DFW chain
SETUP IN ~5 MINUTES

Five steps, one onboarding wizard.

Same shape as the Meta setup, but with TikTok's naming conventions.

1

Get your TikTok Pixel ID

TikTok Ads Manager → Assets → Events → Web Events → Pixel. Copy the 20-character Pixel ID and paste it into DineRoute settings.

2

Generate an Events API token

In the same Pixel settings, go to the Events API tab and generate an access token. Token stays in DineRoute encrypted; only the relay reads it.

3

Pick your conversion event name

We default to "ClickButton" mapped to your platform-tap, but you can map to "InitiateCheckout" or a custom event if your TikTok Shopping campaigns are optimized around a specific one.

4

Test in TikTok Events Manager

Open Events → your Pixel → Test Event tool, paste the test code (URL param ?test_event_code=TEST123), fire a real click. You should see Browser + Server entries within 30 seconds.

5

Switch campaign optimization goal

In TikTok Ads Manager, change your campaign from Reach or Traffic to Conversions, set the goal to your new event. Allow 5-7 days for the algorithm to learn.

6

Layer in TikTok Shopping

Once your conversion event has been firing reliably for 7-14 days, switch from Traffic to Conversions, and from Conversions to a Shopping campaign. The algorithm starts buying you order-likely diners instead of curious scrollers.

DINEROUTE VS BUILD-IT-YOURSELF

The TikTok stack is the one most agencies skip.

TikTok\'s Events API documentation is sparse and the SDK story is essentially nonexistent. Most "TikTok Pixel installed" claims are browser-only.

CapabilityDineRouteRoll your own
TikTok Pixel browser-side Auto on every platform tap Custom JS in your landing page
ttclid capture + first-party cookie Auto Almost no one builds this
Events API server-side mirror Built-in Custom worker, no SDK
event_id dedup Automatic UUID per click You build it
TikTok Test Events validation Wired into onboarding Manual QA
iOS conversion signal recovery 25-40% recovered Lost to browser-only Pixel
FAQ

Six questions media buyers ask about TikTok specifically.

How is TikTok different from Meta in terms of conversion tracking?

TikTok's click identifier is ttclid (versus Meta's fbclid). TikTok's Events API is similar in structure to Meta CAPI but uses different endpoint URLs, different field names (content_name vs custom_data, content_id vs product), and different dedup semantics. You cannot reuse a Meta CAPI implementation directly.

Why do I need server-side TikTok tracking?

TikTok's browser Pixel is increasingly blocked by ad blockers, especially on iOS. The Events API ships from your server origin, which is much harder to block. For restaurant campaigns, this typically recovers 25-40% of TikTok conversion signal that pure-Pixel setups lose.

What is ttclid?

ttclid is the click identifier TikTok appends to every ad-click URL. We capture it on landing, persist it to a first-party cookie, and re-attach it to every conversion event we ship to the Events API. Without ttclid, TikTok cannot attribute the conversion back to a specific ad.

Does DineRoute work with TikTok Shopping?

Yes. TikTok Shopping campaigns optimize on conversion events with content_id and value parameters. We pass both — restaurant platform name as content_id, $0 default value unless you wire up offline conversion import. For real restaurant ad use, our customers run Shopping campaigns alongside Traffic campaigns and see TikTok learn within 7 days.

How does event_id deduplication work on TikTok's side?

TikTok matches (pixel_code, event_id) across the browser and server events in a ~60-minute window and keeps one. The server-side event takes precedence because it includes IP + UA + hashed identifiers. Same pattern as Meta CAPI.

What about consent and CCPA?

We pass TikTok's opt-out flag (limited_data_use field in Events API payload) when the diner has declined tracking. Hashed PII only ships if the diner provided email/phone in a downstream flow with explicit consent. DineRoute is covered by our standard Data Sharing Agreement.

WIRE UP TIKTOK

Make TikTok actually attribute your orders.

Paste your TikTok Pixel ID + Events API token. Fire a test click. The Conversions column starts moving in 48 hours.

No credit card. 14-day trial. Cancel any time.