Skip to main content
Contentful → TikTokIntegration guide

Connecting Contentful to TikTok Events API

Contentful is headless content only — it has no checkout, no orders and no customers, which is the single most important thing to establish before anyone quotes for work. 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 front-end conversion, not a Contentful 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

Contentful sites and TikTok: catching ttclid in a headless app

On a headless Contentful site, read ttclid server-side on the first request and set a first-party cookie, surviving locale and slash redirects. Commerce sends CompletePayment and the CRM or form handler sends SubmitForm, each with ttclid, hashed email and phone, and an event_id the pixel also fires on the client-side confirmation route. Add content type to ViewContent.

TikTok clicks open in the in-app browser, and a headless Contentful front end that redirects on load or hydrates slowly can lose the ttclid before any script reads it. Read it on the server from the first request and set it as a first-party cookie from the front-end host; do not wait for the TikTok pixel to load and do it for you. Locale redirects, trailing-slash redirects and consent banners that block scripts until a click are the usual places it goes missing.

The conversion itself comes from the system holding the money: the commerce platform sends CompletePayment, the CRM or form handler sends SubmitForm, each with the ttclid, hashed email and phone, and an event_id that the pixel on the confirmation route also uses. If the confirmation page is a client-side route, make sure the pixel event fires on that route change and not only on full page loads; otherwise the Events API looks like the only source and you cannot tell whether deduplication works.

Content-heavy sites often find TikTok sends cheap traffic to editorial pages. Pass the Contentful content type in the ViewContent event's properties so you can see whether TikTok produces readers or buyers before scaling spend. A sudden drop in TikTok-attributed conversions right after a front-end deploy is far more likely to be a router, redirect or middleware change than anything inside Contentful, so check the deploy diff first.

Contentful → TikTok · what breaks

Why this join usually fails — Contentful → TikTok

  1. 01

    The ttclid never reaches Contentful

    Because Contentful is headless, the front end is a separate application — usually Next.js, Nuxt or similar — and that application is where client-side routing, caching and identifier capture all actually happen. Attributing a tracking problem to Contentful is nearly always a misdiagnosis.

  2. 02

    Blaming the CMS for a front-end problem

    Headless setups fail at the front end — client-side routing that fires one pageview per session, an identifier lost on a route change — and the CMS gets blamed. Contentful is not in that path at all.

  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.

Contentful → TikTok · the fix

What working looks like — Contentful → TikTok

  • The ttclid on every conversion

  • Conversions arriving in TikTok

    Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.

  • Reconciled against the source

Contentful → TikTok · architecture

How Contentful and TikTok actually connect

  1. 1

    Contentful holds the truth

    Contentful stores content and serves it via API. The commercial record lives in your commerce platform, your CRM or your billing system, and that is where measurement belongs.

  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 front-end conversion, not a Contentful record.

  4. 4

    The event source decides reliability

    Send from the system that holds the money. Contentful contributes the content layer and nothing to the conversion.

  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.

Contentful → TikTok · normal or broken

Working vs. broken, side by side — Contentful → TikTok

Normal, not a fault

  • The ttclid present on the conversion

  • Sent from your commerce, CRM or billing system

  • 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

    Because Contentful is headless, the front end is a separate application — usually Next.js, Nuxt or similar — and that application is where client-side routing, caching and identifier capture all actually happen. Attributing a tracking problem to Contentful is nearly always a misdiagnosis.

  • Sent from the browser

    Headless setups fail at the front end — client-side routing that fires one pageview per session, an identifier lost on a route change — and the CMS gets blamed. Contentful is not in that path at all.

  • 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

Contentful → TikTok · diagnose

Diagnostic order — Contentful → TikTok

  1. 01

    Count conversions carrying the ttclid

  2. 02

    Follow one real conversion end to end

  3. 03

    Establish which system holds the conversion before anything else

    In a headless stack it is never the CMS, and starting there wastes the engagement.

  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.

Contentful → TikTok · prove

How it gets proven — Contentful → TikTok

Source of truth

Whatever system takes the money — Contentful holds none of it.

  • The ttclid confirmed present on a live conversion.
  • Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
  • The conversion confirmed sourced from the commerce or CRM system rather than from anything in the content layer.

Contentful → TikTok · free audit

What we check in the free audit

  • Count conversions carrying the ttclid
  • Follow one real conversion end to end
  • Establish which system holds the conversion before anything else
  • Measure ttclid capture rate on TikTok traffic specifically
  • Read the match rate, not the success message

Checked against

Whatever system takes the money — Contentful holds none of it.

Get my free conversion tracking audit

Free30 minutesNo obligation

Contentful → TikTok · when not to buy

When you don't need this — Contentful → TikTok

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the ttclid.
  • There is no Contentful-specific tracking build. The work is in your front-end framework and your commerce system, and we would say so rather than bill for the CMS.
  • 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.

Contentful → TikTok · what we deliver

What gets built — Contentful → TikTok

  • Identifier capture into Contentful

    Capture and persist the identifier in the front-end application, server-side, and carry it into whichever system records the conversion.

  • Event source: your commerce, CRM or billing system

    Send from the system that holds the money. Contentful contributes the content layer and nothing to the conversion.

  • 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

    Handled wherever the money lives.

Written guarantee

95%+ tracking accuracy

Measured against Whatever system takes the money — Contentful holds none of it.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Contentful → TikTok questions, answered

It was usually stripped by a redirect or a client-side route change before anything stored it. Read it from the first server request and set a first-party cookie there.

Free · 30 min

Get Contentful and TikTok joined properly

Free30 minutesNo obligation