Connecting Statamic to TikTok Events API
Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. 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 Statamic or Laravel order record 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
Statamic to TikTok: ttclid capture with no PHP on landing pages
Read the ttclid with JavaScript on landing and post it to an uncached Laravel endpoint tied to a server session, rather than trusting in-app browser cookies. At checkout attach ttclid, _ttp, email and phone to the order, then send CompletePayment from the order event with the order ID as event_id, shared with an uncached confirmation pixel. Check query-string caching.
TikTok traffic lands in an in-app browser, often on a statically cached Statamic page, which combines the two weakest capture conditions: no server code on the landing request and inconsistent webview storage. Read the ttclid in JavaScript on landing and post it straight to an uncached Laravel endpoint that ties it to a server-side session, rather than trusting a cookie to survive until checkout.
At checkout, attach the stored ttclid, the _ttp cookie value and the customer's email and phone to the Laravel order, then send CompletePayment from the order event with the order ID as event_id. If a TikTok pixel also fires on the confirmation page, give it the same order ID, which means that route cannot be statically cached.
Check how your cache handles query strings before launching TikTok campaigns. Each ad click carries a unique ttclid, so a configuration that treats every query string as a new cache entry turns a campaign into thousands of cached files, while one that ignores query strings serves the page without the server ever seeing the ttclid. Either is workable once you know which one you have.
Statamic → TikTok · what breaks
Why this join usually fails — Statamic → TikTok
- 01
The ttclid never reaches Statamic
Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.
- 02
Static caching bypassing PHP entirely
Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.
- 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.
Statamic → TikTok · the fix
What working looks like — Statamic → 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
Statamic → TikTok · architecture
How Statamic and TikTok actually connect
- 1
Statamic holds the truth
Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.
- 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 Statamic or Laravel order record.
- 4
The event source decides reliability
Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
- 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.
Statamic → TikTok · normal or broken
Working vs. broken, side by side — Statamic → TikTok
Normal, not a fault
The ttclid present on the order
Sent from your Laravel application's order event
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
Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.
Sent from the browser
Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.
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
Statamic → TikTok · diagnose
Diagnostic order — Statamic → TikTok
- 01
Count orders carrying the ttclid
- 02
Follow one real conversion end to end
- 03
Check whether full static caching is enabled
If it is, any per-request logic in a template is not running and never was.
- 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.
Statamic → TikTok · prove
How it gets proven — Statamic → TikTok
Source of truth
Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.
- The ttclid confirmed present on a live order.
- Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
- Order data confirmed persisted on a purchase made while full static caching was active.
Statamic → TikTok · free audit
What we check in the free audit
- Count orders carrying the ttclid
- Follow one real conversion end to end
- Check whether full static caching is enabled
- Measure ttclid capture rate on TikTok traffic specifically
- Read the match rate, not the success message
Checked against
Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.
Free30 minutesNo obligation
Statamic → TikTok · when not to buy
When you don't need this — Statamic → TikTok
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the ttclid.
- If commerce lives in a separate system entirely, work there — Statamic is the content layer.
- 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.
Statamic → TikTok · what we deliver
What gets built — Statamic → TikTok
Identifier capture into Statamic
Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.
Event source: your Laravel application's order event
Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
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
Whatever your application defines as a refund.
Written guarantee
95%+ tracking accuracy
Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Statamic → TikTok questions, answered
Yes: the ttclid cannot be captured server-side on a page served from the static cache. Capture it in the browser and send it to an uncached endpoint.
From your Laravel order event, with the ttclid stored on the order and the order ID as event_id.
Almost always because the ttclid never reached the Statamic or Laravel order record. Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run. 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 Laravel application's order event. Fire from the application event. Static caching means the template that rendered the page may never have executed anything.
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 Statamic → 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 Statamic → TikTok fits in the rest of your tracking
- TikTok · Local servicesTikTok Ads conversion tracking for local service businesses
- TikTok · B2BTikTok Ads conversion tracking for B2B companies
- TikTok × Ecommerce OrdersHow to reconcile TikTok Ads against your store's order table
- TikTok · Comparison page → demoHow to track comparison page visit to demo request for TikTok Ads
- Drupal Commerce → TikTokConnecting Drupal Commerce to TikTok Events API
- Statamic → SnapchatConnecting Statamic to Snapchat
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Duda → TikTokConnecting Duda to TikTok Events API
Free · 30 min
Get Statamic and TikTok joined properly
Free30 minutesNo obligation
