Skip to main content
Contentful → X AdsIntegration guide

Connecting Contentful to X Ads

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. X is a conversation platform where a large share of engagement is discussion rather than intent, which makes the gap between engagement metrics and conversions unusually wide. The join between them succeeds or fails on one thing: whether the twclid click identifier reaches the front-end conversion, not a Contentful record before the conversion happens, because X Ads can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Contentful landing pages and X Ads: keep twclid through redirects

For X Ads on Contentful, put twclid capture and the X pixel in the shared landing-page template, and test that Contentful redirect entries preserve the query string. Store twclid server-side at landing, since the in-app browser loses cookies, then send conversions from the recording system to X's Conversions API with twclid, hashed email and a shared conversion ID.

Marketing teams on Contentful tend to build X campaign landing pages themselves from a landing-page content type, which is the point of a headless CMS and also the risk. The twclid capture and the X pixel have to live in the shared page template, not in a per-page script field editors fill in, or the next campaign page launches untracked. Check that the template works for every content type that can be routed as a landing page.

Redirects are the specific trap. Headless sites often manage vanity URLs and retired campaign links as Contentful redirect entries resolved by the front end, and redirect handlers commonly rebuild the destination URL without the original query string. A twclid that does not survive the redirect is gone. Test a tagged link through every redirect rule you have. X traffic adds its own problem: much of it arrives in the in-app browser, where cookies are short-lived, so store twclid server-side at landing rather than relying on the pixel's cookie.

The conversion itself is sent from the system that records it (store, booking tool or CRM) to X's Conversions API with twclid, hashed email and a conversion ID. If the pixel also fires on a thank-you page, generate that ID before the hop and pass it to both. With X volumes often small, test deduplication with a live conversion rather than reading weekly totals.

Contentful → X Ads · what breaks

Why this join usually fails — Contentful → X Ads

  1. 01

    The twclid click identifier 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

    Engagement mistaken for intent

    A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.

  4. 04

    Nothing reconciles afterwards

    Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.

Contentful → X Ads · the fix

What working looks like — Contentful → X Ads

  • The twclid click identifier on every conversion

  • Conversions arriving in X Ads

    The conversion is matched to a click or an engagement and becomes available for optimisation and reporting.

  • Reconciled against the source

Contentful → X Ads · architecture

How Contentful and X Ads 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

    X Ads needs a click to match

    An event X recognises, a conversion identifier for deduplication, hashed customer information, and the click identifier where you have it.

  3. 3

    The identifier is the bridge

    The twclid click identifier, 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

    X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.

Contentful → X Ads · normal or broken

Working vs. broken, side by side — Contentful → X Ads

Normal, not a fault

  • The twclid click identifier present on the conversion

  • Sent from your commerce, CRM or billing system

  • Deduplicated correctly

    X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.

  • Reconciles with the source

Actually broken

  • The twclid click identifier 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

    A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.

  • Nobody has reconciled it

Contentful → X Ads · diagnose

Diagnostic order — Contentful → X Ads

  1. 01

    Count conversions carrying the twclid click identifier

  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

    Compare engagement rate against conversion rate by campaign

    On X the two frequently move in opposite directions, and that divergence is the finding rather than a measurement fault.

  5. 05

    Read the match rate, not the success message

    Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.

Contentful → X Ads · prove

How it gets proven — Contentful → X Ads

Source of truth

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

  • The twclid click identifier confirmed present on a live conversion.
  • Conversions reconciled per order against imported figures, with deduplication verified on a live test.
  • The conversion confirmed sourced from the commerce or CRM system rather than from anything in the content layer.

Contentful → X Ads · free audit

What we check in the free audit

  • Count conversions carrying the twclid click identifier
  • Follow one real conversion end to end
  • Establish which system holds the conversion before anything else
  • Compare engagement rate against conversion rate by campaign
  • 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 → X Ads · when not to buy

When you don't need this — Contentful → X Ads

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the twclid click identifier.
  • 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 X is a brand and community channel for you rather than a performance one, measure it that way and do not force a conversion pipeline onto it.

Contentful → X Ads · what we deliver

What gets built — Contentful → X Ads

  • 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 X Ads

    The X Conversions API, posted server-side with the click identifier and hashed customer data.

  • 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 → X Ads questions, answered

Most often a redirect, managed in Contentful or front-end config, that drops the query string. Preserve query parameters on every redirect and capture twclid server-side on the first request.

Free · 30 min

Get Contentful and X Ads joined properly

Free30 minutesNo obligation