Connecting Optimizely to TikTok Events API
Optimizely deliberately shows different people different experiences, which means every conversion figure your ad platform reports is an average across variants it knows nothing about. TikTok's audience skews to exactly the browsers and app contexts where browser-side tracking performs worst. The join between them succeeds or fails on one thing: whether the ttclid reaches the Optimizely variant assignment before the conversion happens, because TikTok can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Optimizely and TikTok: experiments inside the in-app browser
In TikTok's in-app browser, Optimizely variants flicker and can lose the ttclid, so read it from the URL before the experiment script runs and persist it server-side. Send the variation ID as a property on CompletePayment, keep the order number as event_id in every variant, check redirects keep the ttclid, and segment TikTok results cautiously.
Most TikTok traffic is mobile and inside TikTok's in-app browser, where Optimizely's snippet runs in a slow webview. Client-side variation changes flicker more there, and a page that renders late loses visitors before the TikTok pixel stores the ttclid. Read the ttclid from the URL before the experiment script runs, and persist it server-side, so capture does not depend on which variant rendered faster.
Optimizely buckets visitors with its own first-party cookie, and the in-app browser's storage is inconsistent between sessions. A TikTok visitor who returns through a second ad can be bucketed into a different variant, which contaminates both arms. If TikTok is a large share of traffic in the experiment, segment results by source and treat the TikTok slice cautiously, or exclude TikTok traffic from the test.
Send the variation ID as a property on CompletePayment so your reconciliation can split TikTok conversions by arm, and keep the order number as event_id in every variant; a variant that rebuilt the order page and lost the pixel's event_id double counts in that arm alone. Check that redirect variants keep the ttclid on the URL, and compare ttclid coverage on orders per arm.
Optimizely → TikTok · what breaks
Why this join usually fails — Optimizely → TikTok
- 01
The ttclid never reaches Optimizely
Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.
- 02
An experiment silently confounding every campaign result
A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.
- 03
The ttclid is lost in the in-app browser
TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.
- 04
Nothing reconciles afterwards
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
Optimizely → TikTok · the fix
What working looks like — Optimizely → TikTok
The ttclid on every assignment
Conversions arriving in TikTok
Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.
Reconciled against the source
Optimizely → TikTok · architecture
How Optimizely and TikTok actually connect
- 1
Optimizely holds the truth
The variant is the missing dimension. Without it, a campaign's performance is confounded by an experiment nobody told the media team about, and both teams will draw confident, wrong conclusions.
- 2
TikTok Events API needs a click to match
TikTok matches server events using ttclid where available, falling back to hashed contact information. Both should be sent — the fallback is what carries the events where the click ID did not survive.
- 3
The identifier is the bridge
The ttclid, captured at the visit and carried into the Optimizely variant assignment.
- 4
The event source decides reliability
Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.
- 5
Deduplication at the destination
TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.
Optimizely → TikTok · normal or broken
Working vs. broken, side by side — Optimizely → TikTok
Normal, not a fault
The ttclid present on the assignment
Sent from your order system with variant attached
Deduplicated correctly
TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.
Reconciles with the source
Actually broken
The ttclid missing on most records
Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.
Sent from the browser
A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.
Counted twice, or not at all
TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.
Nobody has reconciled it
Optimizely → TikTok · diagnose
Diagnostic order — Optimizely → TikTok
- 01
Count assignments carrying the ttclid
- 02
Follow one real conversion end to end
- 03
Check for running experiments before diagnosing a performance change
First question, not last. It costs one minute and explains a surprising share of unexplained movements.
- 04
Measure ttclid capture rate on TikTok traffic specifically
Not on all traffic. TikTok's in-app browser is the failure case, so a healthy overall capture rate can hide a poor one on exactly the traffic that matters.
- 05
Read the match rate, not the success message
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
Optimizely → TikTok · prove
How it gets proven — Optimizely → TikTok
Source of truth
Your order system, joined to the variant each customer was assigned.
- The ttclid confirmed present on a live assignment.
- Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
- Orders reconciled per variant against imported conversions over the full experiment window.
Optimizely → TikTok · free audit
What we check in the free audit
- Count assignments carrying the ttclid
- Follow one real conversion end to end
- Check for running experiments before diagnosing a performance change
- Measure ttclid capture rate on TikTok traffic specifically
- Read the match rate, not the success message
Checked against
Your order system, joined to the variant each customer was assigned.
Free30 minutesNo obligation
Optimizely → TikTok · when not to buy
When you don't need this — Optimizely → TikTok
- Measure identifier coverage yourself first — pull your last hundred assignments and count how many carry the ttclid.
- If you are not running experiments on pages in the paid funnel, there is no confound and nothing to integrate.
- If TikTok is a small share of spend, the effort is hard to justify. It pays when TikTok is a channel you are actively scaling.
Optimizely → TikTok · what we deliver
What gets built — Optimizely → TikTok
Identifier capture into Optimizely
Capture the identifier before the experiment framework initializes, and pass the variant assignment as a dimension alongside it.
Event source: your order system with variant attached
Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.
Dispatch to TikTok
Server events to the TikTok Events API with the ttclid, hashed contact information and a matching event_id.
Reversals where they exist
Refunds reverse and should retain the variant dimension.
Written guarantee
95%+ tracking accuracy
Measured against Your order system, joined to the variant each customer was assigned.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Optimizely → TikTok questions, answered
They run, but the in-app browser's slow loading and inconsistent cookies can cause flicker and re-bucketing. Segment results by source before trusting a winner on TikTok traffic.
The variant renders slower or its redirect drops the query string. Capture the ttclid before the experiment script runs and check redirects keep it.
Almost always because the ttclid never reached the Optimizely variant assignment. Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants. Measure coverage before debugging the dispatch.
The ttclid — TikTok's click identifier, appended to your landing page URL and also stored in the _ttp cookie. TikTok additionally matches on hashed email and phone. In-app browser behavior makes ttclid capture more fragile than the equivalents on other platforms, so persisting it server-side as soon as it is seen matters more here than elsewhere.
Your order system with variant attached. Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.
TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.
More on Optimizely → TikTok
- TikTok · Lead → booked callHow to track lead to booked call for TikTok Ads
- TikTok · Booked call → closed wonHow to track booked call to closed won for TikTok Ads
- TikTok · Free trial → paidHow to track free trial to paid for TikTok Ads
RELATED GUIDES
Where Optimizely → TikTok fits in the rest of your tracking
- TikTok · B2BTikTok Ads conversion tracking for B2B companies
- TikTok · EcommerceTikTok Ads conversion tracking for ecommerce brands
- TikTok × SubscriptionsHow to reconcile TikTok Ads against your billing system
- TikTok · Add to cart → purchaseHow to track add to cart to purchase for TikTok Ads
- Tealium → TikTokConnecting Tealium to TikTok Events API
- Optimizely → LinkedInConnecting Optimizely to LinkedIn Ads
- B2BConversion tracking for B2B, from first touch to closed-won
- Dynamic Yield → TikTokConnecting Dynamic Yield to TikTok Events API
Free · 30 min
Get Optimizely and TikTok joined properly
Free30 minutesNo obligation
