Connecting AfterSell to TikTok Events API
AfterSell works through checkout extensions and post-purchase pages, which puts its offers inside Shopify's sandboxed surfaces where your own scripts cannot reach. 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 AfterSell upsell order 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
AfterSell to TikTok Events API: CompletePayment at the final total
Read ttclid the instant a TikTok shopper lands and write it to a cart attribute, since the in-app browser may lose it before checkout ends. Send CompletePayment from the Shopify order webhook once AfterSell's post-purchase step settles, with the final total, upsell items in contents, hashed email and phone, and an event_id shared with any browser event.
Shoppers from TikTok ads often go through checkout and AfterSell's post-purchase offer inside TikTok's in-app browser, then close it the moment the order is placed. A browser CompletePayment that depends on a later page loading misses those orders entirely, and one fired at checkout_completed, which with AfterSell runs on the first offer page, misses the upsell value.
Send CompletePayment from the Shopify order webhook once the post-purchase step has settled, with value as the final order total and contents listing the upsell items. The ttclid has to be read on the storefront the instant the visitor lands and written to a cart attribute, since the webview's storage may not hold it to the end of checkout and nothing in the extension can recover it. Add hashed email and phone from the order as the fallback match for orders where the ttclid is missing.
If the TikTok channel app is already sending a browser CompletePayment, either give your server event the same event_id, which means generating it on the storefront and storing it as a cart attribute too, or turn the app's purchase event off. Then measure ttclid presence on orders from TikTok traffic alone, and compare upsell take rate on those orders with the rest.
AfterSell → TikTok · what breaks
Why this join usually fails — AfterSell → TikTok
- 01
The ttclid never reaches AfterSell
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
- 02
Trying to instrument a sandbox
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
- 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.
AfterSell → TikTok · the fix
What working looks like — AfterSell → TikTok
The ttclid on every order
Conversions arriving in TikTok
Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.
Reconciled against the source
AfterSell → TikTok · architecture
How AfterSell and TikTok actually connect
- 1
AfterSell holds the truth
Checkout UI extensions run sandboxed. Nothing you write can observe them, so the only reliable view of what the customer accepted is the order itself.
- 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 AfterSell upsell order.
- 4
The event source decides reliability
Send the final order total from the webhook, with upsell line items identified.
- 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.
AfterSell → TikTok · normal or broken
Working vs. broken, side by side — AfterSell → TikTok
Normal, not a fault
The ttclid present on the order
Sent from the Shopify order webhook
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
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
Sent from the browser
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
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
AfterSell → TikTok · diagnose
Diagnostic order — AfterSell → TikTok
- 01
Count orders carrying the ttclid
- 02
Follow one real conversion end to end
- 03
Confirm the conversion is sourced from the order, not from a page
On modern Shopify checkout there is no supported page-based option left, so this is the only correct architecture.
- 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.
AfterSell → TikTok · prove
How it gets proven — AfterSell → TikTok
Source of truth
The final Shopify order total, read from the order record.
- The ttclid confirmed present on a live order.
- Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
- Final order totals reconciled from the webhook against imported conversions.
AfterSell → TikTok · free audit
What we check in the free audit
- Count orders carrying the ttclid
- Follow one real conversion end to end
- Confirm the conversion is sourced from the order, not from a page
- Measure ttclid capture rate on TikTok traffic specifically
- Read the match rate, not the success message
Checked against
The final Shopify order total, read from the order record.
Free30 minutesNo obligation
AfterSell → TikTok · when not to buy
When you don't need this — AfterSell → TikTok
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the ttclid.
- If your conversions already come from the order webhook, checkout extensions change nothing for you.
- 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.
AfterSell → TikTok · what we deliver
What gets built — AfterSell → TikTok
Identifier capture into AfterSell
Do not try to instrument the checkout surface. Read the order server-side, which is the supported and more reliable path anyway.
Event source: the Shopify order webhook
Send the final order total from the webhook, with upsell line items identified.
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.
Written guarantee
95%+ tracking accuracy
Measured against The final Shopify order total, read from the order record.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
AfterSell → TikTok questions, answered
The in-app browser often closes before a thank-you-page pixel loads, and the ttclid may not survive its storage. Sending CompletePayment from the order webhook, with the ttclid stored on the order, avoids both.
No. Send one CompletePayment at the settled total so value-based optimization sees the whole order, and keep upsell take rate in your own reporting.
Almost always because the ttclid never reached the AfterSell upsell order. Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported. 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.
The Shopify order webhook. Send the final order total from the webhook, with upsell line items identified.
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 AfterSell → 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 AfterSell → TikTok fits in the rest of your tracking
- TikTok · FashionTikTok Ads conversion tracking for fashion brands
- TikTok · BeautyTikTok Ads conversion tracking for beauty brands
- TikTok × Ecommerce OrdersHow to reconcile TikTok Ads against your store's order table
- TikTok · Add to cart → purchaseHow to track add to cart to purchase for TikTok Ads
- Rebuy → TikTokConnecting Rebuy to TikTok Events API
- AfterSell → SnapchatConnecting AfterSell to Snapchat
- FashionConversion tracking for fashion brands, reported net of returns
- Checkout Champ → TikTokConnecting Checkout Champ to TikTok Events API
Free · 30 min
Get AfterSell and TikTok joined properly
Free30 minutesNo obligation
