Skip to main content
Statamic → TikTokIntegration guide

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

  1. 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.

  2. 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.

  3. 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.

  4. 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. 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. 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. 3

    The identifier is the bridge

    The ttclid, captured at the visit and carried into the Statamic or Laravel order record.

  4. 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. 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

  1. 01

    Count orders carrying the ttclid

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether full static caching is enabled

    If it is, any per-request logic in a template is not running and never was.

  4. 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.

  5. 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.

Get my free conversion tracking audit

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.

Get my free conversion tracking audit

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.

Free · 30 min

Get Statamic and TikTok joined properly

Free30 minutesNo obligation