Skip to main content
AfterSell → X AdsIntegration guide

Connecting AfterSell to X Ads

AfterSell works through checkout extensions and post-purchase pages, which puts its offers inside Shopify's sandboxed surfaces where your own scripts cannot reach. 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 AfterSell upsell 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

AfterSell to X Ads: purchase value from in-app browser checkouts

X shoppers often check out inside its in-app browser, so read twclid at landing and write it straight into a cart attribute where it survives onto the Shopify order. Send the Purchase to X server-side once the order holds the final total after the AfterSell offer, using the Shopify order ID as conversion ID if a pixel also fires.

Shoppers coming from X mostly arrive in its in-app browser, check out inside it, and see the AfterSell post-purchase offer there too. Storage in that browser is short-lived, so twclid needs to be read at landing and written into a cart attribute immediately, where it survives onto the Shopify order regardless of what the browser forgets.

Send the Purchase server-side from the order once it holds the final total. A pixel firing after checkout typically reports the pre-upsell basket, and on current Shopify checkout it runs from a sandboxed custom pixel anyway. If you keep both pixel and server events, use the Shopify order ID as the conversion ID in both and test it deliberately: X volumes are often small enough that a doubled count passes for a strong week.

Be careful what the upsell value is used to argue. Accepted post-purchase offers raise average order value on every channel at once, so an X campaign's ROAS improving after AfterSell was installed says nothing about X. Compare the campaign against its own pre-install baseline, or against other channels over the same period. If an X Shopify app is connected, check what it sends and which total before adding a server route.

AfterSell → X Ads · what breaks

Why this join usually fails — AfterSell → X Ads

  1. 01

    The twclid click identifier never reaches AfterSell

    Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.

  2. 02

    Trying to instrument a sandbox

    Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.

  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.

AfterSell → X Ads · the fix

What working looks like — AfterSell → 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

AfterSell → X Ads · architecture

How AfterSell and X Ads actually connect

  1. 1

    AfterSell holds the truth

    Checkout UI extensions run sandboxed. Nothing you write can observe them, so the only reliable view of what the customer accepted is the order itself.

  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 AfterSell upsell order.

  4. 4

    The event source decides reliability

    Send the final order total from the webhook, with upsell line items identified.

  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.

AfterSell → X Ads · normal or broken

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

Normal, not a fault

  • The twclid click identifier present on the order

  • Sent from the Shopify order webhook

  • 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

    Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.

  • Sent from the browser

    Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.

  • 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

AfterSell → X Ads · diagnose

Diagnostic order — AfterSell → X Ads

  1. 01

    Count orders carrying the twclid click identifier

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm the conversion is sourced from the order, not from a page

    On modern Shopify checkout there is no supported page-based option left, so this is the only correct architecture.

  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.

AfterSell → X Ads · prove

How it gets proven — AfterSell → X Ads

Source of truth

The final Shopify order total, read from the order record.

  • The twclid click identifier confirmed present on a live order.
  • Conversions reconciled per order against imported figures, with deduplication verified on a live test.
  • Final order totals reconciled from the webhook against imported conversions.

AfterSell → 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
  • Confirm the conversion is sourced from the order, not from a page
  • Compare engagement rate against conversion rate by campaign
  • Read the match rate, not the success message

Checked against

The final Shopify order total, read from the order record.

Get my free conversion tracking audit

Free30 minutesNo obligation

AfterSell → X Ads · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the twclid click identifier.
  • If your conversions already come from the order webhook, checkout extensions change nothing for you.
  • 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.

AfterSell → X Ads · what we deliver

What gets built — AfterSell → X Ads

  • Identifier capture into AfterSell

    Do not try to instrument the checkout surface. Read the order server-side, which is the supported and more reliable path anyway.

  • Event source: the Shopify order webhook

    Send the final order total from the webhook, with upsell line items identified.

  • Dispatch to X Ads

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

  • Reversals where they exist

    Refunds reverse.

Written guarantee

95%+ tracking accuracy

Measured against The final Shopify order total, read from the order record.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

AfterSell → X Ads questions, answered

Only if the conversion is sent after the upsell edit lands on the Shopify order. Browser events generally carry the original basket.

Free · 30 min

Get AfterSell and X Ads joined properly

Free30 minutesNo obligation