Connecting Clerk to X Ads
Clerk handles both authentication and organisation membership, which matters for B2B products where the paying entity is a company and the signing-up entity is a person. 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 Clerk user and organisation 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
Clerk signups to X Ads: twclid through in-app OAuth
Offer email-code signup on X landing pages, since Google OAuth often fails in X's in-app browser. Read twclid on landing, pass it into signup metadata, and move it to private metadata in your user.created webhook. Send X one signup per organization created and a purchase on its first invoice, with the invoice ID as conversion ID.
Developer and startup audiences click X ads inside the X app, which opens your landing page in its in-app browser. Clerk sign-in with Google often fails there or bounces out to the system browser, because Google blocks OAuth in many embedded webviews. When the user finishes signing up in Safari or Chrome, the twclid and every cookie set in the webview stay behind.
Two fixes. Offer email-code sign-up prominently on pages that receive X traffic, so the user can complete inside the webview where twclid is still available; and read twclid on the landing page and pass it into the sign-up's metadata at creation, then move it to private metadata in your user.created webhook. If the user still switches browsers, accept the loss rather than matching by guesswork.
Map events conservatively. X volumes are small, and counting each teammate's sign-up makes a campaign look ready to scale when it produced one customer. Send a sign-up conversion per organization created, and a purchase on the organization's first invoice, with the invoice ID as the conversion ID shared with any browser tag. Confirm the event setup and attribution windows in X's Events Manager, since B2B trials often convert after a short click window has closed.
Clerk → X Ads · what breaks
Why this join usually fails — Clerk → X Ads
- 01
The twclid click identifier never reaches Clerk
Several people from one company sign up separately, each carrying a different acquisition source.
- 02
Counting seats instead of customers
Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.
- 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.
- 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.
Clerk → X Ads · the fix
What working looks like — Clerk → X Ads
The twclid click identifier on every account
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
Clerk → X Ads · architecture
How Clerk and X Ads actually connect
- 1
Clerk holds the truth
In B2B SaaS the subscription belongs to an organisation and several users belong to it. Attributing revenue per user counts one customer several times.
- 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
The identifier is the bridge
The twclid click identifier, captured at the visit and carried into the Clerk user and organisation.
- 4
The event source decides reliability
Send paid conversions per organisation, deduplicated across its users.
- 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.
Clerk → X Ads · normal or broken
Working vs. broken, side by side — Clerk → X Ads
Normal, not a fault
The twclid click identifier present on the account
Sent from your billing system, keyed on the organisation
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
Several people from one company sign up separately, each carrying a different acquisition source.
Sent from the browser
Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.
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
Clerk → X Ads · diagnose
Diagnostic order — Clerk → X Ads
- 01
Count accounts carrying the twclid click identifier
- 02
Follow one real conversion end to end
- 03
Compare user signups against paying organisations
The ratio is the size of the overcount, and in B2B products it is rarely close to one.
- 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.
- 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.
Clerk → X Ads · prove
How it gets proven — Clerk → X Ads
Source of truth
Your billing system, joined to the Clerk organisation rather than the user.
- The twclid click identifier confirmed present on a live account.
- Conversions reconciled per order against imported figures, with deduplication verified on a live test.
- Paid conversions reconciled per organisation against imported conversions, deduplicated across users.
Clerk → X Ads · free audit
What we check in the free audit
- Count accounts carrying the twclid click identifier
- Follow one real conversion end to end
- Compare user signups against paying organisations
- Compare engagement rate against conversion rate by campaign
- Read the match rate, not the success message
Checked against
Your billing system, joined to the Clerk organisation rather than the user.
Free30 minutesNo obligation
Clerk → X Ads · when not to buy
When you don't need this — Clerk → X Ads
- Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the twclid click identifier.
- Consumer products where one user is one customer do not have this distinction.
- 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.
Clerk → X Ads · what we deliver
What gets built — Clerk → X Ads
Identifier capture into Clerk
Store the identifier on the user and attribute at the organisation, using the first user's source with the others recorded as supporting.
Event source: your billing system, keyed on the organisation
Send paid conversions per organisation, deduplicated across its users.
Dispatch to X Ads
The X Conversions API, posted server-side with the click identifier and hashed customer data.
Reversals where they exist
Cancellations reverse against the organisation.
Written guarantee
95%+ tracking accuracy
Measured against Your billing system, joined to the Clerk organisation rather than the user.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Clerk → X Ads questions, answered
X opens links in its in-app browser, Google often refuses OAuth there, and the user finishes in a different browser without the twclid. Offer email sign-up and store twclid on the sign-up before any redirect.
No. Count organizations created or first payments; per-user counts inflate small X campaigns.
Almost always because the twclid click identifier never reached the Clerk user and organisation. Several people from one company sign up separately, each carrying a different acquisition source. Measure coverage before debugging the dispatch.
X appends twclid to the landing URL and the pixel stores it. It behaves like other click identifiers, with the usual caveat that a large share of X traffic arrives through the in-app browser, where storage is partitioned and short-lived.
Your billing system, keyed on the organisation. Send paid conversions per organisation, deduplicated across its users.
Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.
More on Clerk → X Ads
- Clerk → Google AdsConnecting Clerk to Google Ads
- Clerk → Microsoft AdsConnecting Clerk to Microsoft Ads
- Clerk → Apple Search AdsConnecting Clerk to Apple Search Ads
RELATED GUIDES
Where Clerk → X Ads fits in the rest of your tracking
- X Ads · B2BX Ads conversion tracking for B2B companies
- X Ads · SaaSX Ads conversion tracking for SaaS companies
- X Ads × SubscriptionsHow to reconcile X Ads against your billing system
- X Ads · Signup → activationHow to track signup to product activation for X Ads
- Firebase Auth → X AdsConnecting Firebase Authentication to X Ads
- Clerk → RedditConnecting Clerk to Reddit
- B2BConversion tracking for B2B, from first touch to closed-won
- Okta → X AdsConnecting Okta to X Ads
Free · 30 min
Get Clerk and X Ads joined properly
Free30 minutesNo obligation
