Skip to main content
PrestaShop → X AdsIntegration guide

Connecting PrestaShop to X Ads

PrestaShop is self-hosted open source with a large module ecosystem, which means the store's behaviour depends heavily on which modules are installed. 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 PrestaShop order 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

PrestaShop to X Ads: twclid on the order, purchases sent server-side

Store the twclid server-side the moment PrestaShop sees it and copy it to the cart, because X's in-app browser often loses the session. Send the purchase to X's Conversions API from the order validation hook with twclid, hashed email and phone, value, and the order reference as conversion ID. Offline payments wait for paid state.

X's in-app browser is where this pair loses most conversions: a shopper taps a promoted post, lands on the PrestaShop store, and either buys in that browser or switches to Safari or Chrome to finish. The twclid in the landing URL needs to be stored server-side the moment PrestaShop sees it, in PrestaShop's own cookie and copied to the cart, so a shopper who completes in the same session carries it to the order.

Send the purchase to X's Conversions API from the order validation hook with twclid, hashed email and phone, value, currency and the order reference as the conversion ID. If an X pixel module also fires on the order confirmation page, it must send that same order reference, which generic pixel modules may not do without editing; otherwise make purchases server-only. For bank wire and other offline payment methods, send on the paid state rather than at validation.

X order volumes are often small enough that one module update can silently double them, and PrestaShop stores receive module updates constantly. After any module change, compare X's purchases against PrestaShop orders carrying a twclid for the same day. A shopper who switched browsers lost the twclid on the way; for those orders the hashed email is the only remaining match key, so make sure it is always sent.

PrestaShop → X Ads · what breaks

Why this join usually fails — PrestaShop → X Ads

  1. 01

    The twclid click identifier never reaches PrestaShop

    Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.

  2. 02

    Module ecosystem interference

    PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.

  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.

PrestaShop → X Ads · the fix

What working looks like — PrestaShop → X Ads

  • The twclid click identifier on every order

  • 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

PrestaShop → X Ads · architecture

How PrestaShop and X Ads actually connect

  1. 1

    PrestaShop holds the truth

    You own the data and can query it directly. Pin down which order states count as revenue, since PrestaShop's state machine is more granular than most.

  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 PrestaShop order.

  4. 4

    The event source decides reliability

    Fire server-side from the hook rather than the confirmation template.

  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.

PrestaShop → X Ads · normal or broken

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

Normal, not a fault

  • The twclid click identifier present on the order

  • Sent from the PrestaShop order validation hook

  • 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

    Module conflicts and caching both interfere with anything running in the page, and multi-store installations complicate which store an order belongs to.

  • Sent from the browser

    PrestaShop stores accumulate modules, and any of them can alter checkout behaviour or strip what your code depends on. Failures appear after an unrelated update.

  • 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

PrestaShop → X Ads · diagnose

Diagnostic order — PrestaShop → X Ads

  1. 01

    Count orders carrying the twclid click identifier

  2. 02

    Follow one real conversion end to end

  3. 03

    Check order metadata on ten recent orders

    Partial coverage across orders points at a module conflict rather than a missing implementation.

  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.

PrestaShop → X Ads · prove

How it gets proven — PrestaShop → X Ads

Source of truth

PrestaShop's order records in your own database, for the same window and order state set.

  • The twclid click identifier confirmed present on a live order.
  • Conversions reconciled per order against imported figures, with deduplication verified on a live test.
  • Order metadata confirmed present across ten consecutive orders rather than one.

PrestaShop → X Ads · free audit

What we check in the free audit

  • Count orders carrying the twclid click identifier
  • Follow one real conversion end to end
  • Check order metadata on ten recent orders
  • Compare engagement rate against conversion rate by campaign
  • Read the match rate, not the success message

Checked against

PrestaShop's order records in your own database, for the same window and order state set.

Get my free conversion tracking audit

Free30 minutesNo obligation

PrestaShop → X Ads · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the twclid click identifier.
  • If your PrestaShop install is heavily moduled and maintained by another party, scope their involvement before starting.
  • 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.

PrestaShop → X Ads · what we deliver

What gets built — PrestaShop → X Ads

  • Identifier capture into PrestaShop

    Capture the identifier and write it to order metadata through a hook, server-side, so it does not depend on page execution.

  • Event source: the PrestaShop order validation hook

    Fire server-side from the hook rather than the confirmation template.

  • Dispatch to X Ads

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

  • Reversals where they exist

    Credit slips are recorded against the order.

Written guarantee

95%+ tracking accuracy

Measured against PrestaShop's order records in your own database, for the same window and order state set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

PrestaShop → X Ads questions, answered

Add the X pixel through a module or the theme for browsing events, and send purchases server-side from the order hook through the X Conversions API with twclid stored on the order. If both fire, share the order reference as the conversion ID.

Free · 30 min

Get PrestaShop and X Ads joined properly

Free30 minutesNo obligation