Connecting HubSpot to X Ads
HubSpot knows which leads turned into money, weeks after the ad platforms have stopped paying attention. 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 HubSpot contact and deal 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
HubSpot leads to X Ads: twclid from in-app browser to contact
X traffic lands in the in-app browser, so read twclid from the URL on the first page view and push it into a hidden HubSpot form field that session, confirming it reaches the contact property. Send a qualified-lead stage server-side to the X Conversions API with twclid, hashed email and a unique conversion ID such as deal ID plus stage.
X traffic lands mostly in the in-app browser, where storage is partitioned and short-lived. A HubSpot form that relies on a cookie written on an earlier visit will often find nothing, and a visitor who returns later in Safari to fill the form arrives as someone new. Read twclid from the URL on the first page view, push it into a hidden form field the same session, and check it landed on the contact property rather than only on the submission.
Because HubSpot's ads tool does not connect X as far as we know, this is a custom server-side send to the X Conversions API; confirm the current list in your portal. Fire from a workflow or webhook when the contact or deal reaches the stage you chose, with the stored twclid, hashed email and a conversion ID that never repeats, such as the deal or contact ID plus the stage name.
Timing decides which stage. X optimization only learns from conversions inside its attribution window, and B2B deals sourced from X often take longer than that. Send a qualified-lead stage the sales team actually sets, not form submissions, and check that stage is applied consistently. On X, cheap engagement-driven form fills are the most likely outcome of optimizing toward submissions.
HubSpot → X Ads · what breaks
Why this join usually fails — HubSpot → X Ads
- 01
The twclid click identifier never reaches HubSpot
The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.
- 02
The deal closes long after the click
B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.
- 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.
HubSpot → X Ads · the fix
What working looks like — HubSpot → X Ads
The twclid click identifier on every deal
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
HubSpot → X Ads · architecture
How HubSpot and X Ads actually connect
- 1
HubSpot holds the truth
The deal carries the amount, the stage, the close date and the associated contact. That contact is where the original click identifier must live, because the deal is created much later by a salesperson who has no idea an ad was involved.
- 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 HubSpot contact and deal.
- 4
The event source decides reliability
Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
- 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.
HubSpot → X Ads · normal or broken
Working vs. broken, side by side — HubSpot → X Ads
Normal, not a fault
The twclid click identifier present on the deal
Sent from a HubSpot workflow or webhook on deal stage change
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
The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.
Sent from the browser
B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.
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
HubSpot → X Ads · diagnose
Diagnostic order — HubSpot → X Ads
- 01
Count deals carrying the twclid click identifier
- 02
Follow one real conversion end to end
- 03
Open a Closed Won deal and follow it back to its contact
Does that contact carry the identifier property, populated? Then check the date gap between the contact's creation and the deal's close — that gap decides whether this integration is possible at all.
- 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.
HubSpot → X Ads · prove
How it gets proven — HubSpot → X Ads
Source of truth
HubSpot's Deals report, filtered to Closed Won for the same window, by close date.
- The twclid click identifier confirmed present on a live deal.
- Conversions reconciled per order against imported figures, with deduplication verified on a live test.
- The click-to-close time distribution measured, so you know what share of deals close inside the destination's window.
HubSpot → X Ads · free audit
What we check in the free audit
- Count deals carrying the twclid click identifier
- Follow one real conversion end to end
- Open a Closed Won deal and follow it back to its contact
- Compare engagement rate against conversion rate by campaign
- Read the match rate, not the success message
Checked against
HubSpot's Deals report, filtered to Closed Won for the same window, by close date.
Free30 minutesNo obligation
HubSpot → X Ads · when not to buy
When you don't need this — HubSpot → X Ads
- Measure identifier coverage yourself first — pull your last hundred deals and count how many carry the twclid click identifier.
- If your median deal closes well past the destination's upload window, the honest answer is a different measurement strategy, not this integration. We will tell you that on the call rather than sell you a build that cannot work.
- 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.
HubSpot → X Ads · what we deliver
What gets built — HubSpot → X Ads
Identifier capture into HubSpot
Create a custom contact property, populate a hidden form field from the persisted first-party cookie, and confirm the property lands on the contact rather than only on the form submission.
Event source: a HubSpot workflow or webhook on deal stage change
Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
Dispatch to X Ads
The X Conversions API, posted server-side with the click identifier and hashed customer data.
Reversals where they exist
A deal reopened or moved out of Closed Won can be retracted where the destination supports it, though most teams accept the small error here rather than wire it.
Written guarantee
95%+ tracking accuracy
Measured against HubSpot's Deals report, filtered to Closed Won for the same window, by close date.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
HubSpot → X Ads questions, answered
Capture twclid into a contact property via a hidden field, then send from your server to X's Conversions API when the contact reaches a qualified stage. HubSpot does not appear to offer this natively.
Usually the value was never read from the URL in the X in-app browser session, or the embedded form never received it. Capture from the URL on landing and verify the contact property.
Almost always because the twclid click identifier never reached the HubSpot contact and deal. The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again. 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.
A HubSpot workflow or webhook on deal stage change. Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.
More on HubSpot → X Ads
- HubSpot → Google AdsConnecting HubSpot to Google Ads
- HubSpot → Microsoft AdsConnecting HubSpot to Microsoft Ads
- HubSpot → Apple Search AdsConnecting HubSpot to Apple Search Ads
Using HubSpot for bookings? How HubSpot bookings get tracked end to end
RELATED GUIDES
Where HubSpot → X Ads fits in the rest of your tracking
- X Ads · Home servicesX Ads conversion tracking for home service businesses
- X Ads · Law firmsX Ads conversion tracking for law firms
- X Ads × CRM DealsHow to reconcile X Ads against your CRM's closed-won deals
- X Ads · Demo request → opportunityHow to track demo request to opportunity for X Ads
- Salesforce → X AdsConnecting Salesforce to X Ads
- HubSpot → LinkedInConnecting HubSpot to LinkedIn Ads
- Law firmsConversion tracking for law firms, without sending case details anywhere
- Clio → X AdsConnecting Clio to X Ads
Free · 30 min
Get HubSpot and X Ads joined properly
Free30 minutesNo obligation
