The X (Twitter) Conversions API allows you to send conversion events directly from your server to X, bypassing the browser entirely. This is particularly useful for purchase events that may not fire correctly in the browser due to ad blockers, iOS privacy restrictions, or checkout page access limitations.
When to Use X Conversions API
The X Conversions API is most valuable when:
- A significant portion of your audience uses ad blockers that block the X Pixel
- You are losing purchase events due to Shopify checkout limitations with browser scripts
- You want to send offline conversions (phone orders, in-store purchases) to X Ads
- You want to improve X’s ability to match events to X users through hashed customer data
How X Conversions API Works
Instead of the JavaScript pixel firing in a user’s browser, your server sends an HTTP POST request to X’s Conversions API endpoint when a conversion occurs. The request includes the event type (Purchase), the conversion value, and user identification data for matching.
X uses the user data to match the conversion back to an X user who saw your ad within the attribution window. The key matching data X uses:
- Email address (SHA256 hashed)
- Phone number (SHA256 hashed)
- X Click ID (twclid) — captured from the URL parameter when a user clicks your X ad
Setting Up X Conversions API
Step 1: Get Your Access Token
In X Ads Manager, go to Tools → Events Manager → select your pixel → Set up Conversions API. Generate an access token from your X developer account. This token authenticates your API requests.
Step 2: Configure Your Conversion Event
Identify the conversion event you want to send via CAPI. For ecommerce, the primary event is Purchase. The X Conversions API uses the same event names as the browser pixel.
Step 3: Build Your API Integration
When a purchase is completed, send an HTTP POST request to:
https://ads-api.x.com/12/measurement/conversions/PIXEL_ID
With a JSON payload containing:
- conversions array with: conversion_time, event_type (Purchase), value_currency, value_amount
- identifiers array with: hashed_email and/or twclid
Step 4: Enable Deduplication
If you run both the browser pixel and CAPI simultaneously (which is recommended), set up deduplication using a unique event_id. Send the same event_id from both the browser pixel call and the CAPI call for the same purchase. X will deduplicate and count only one conversion.
X CAPI via Third-Party Integrations
If direct API integration is beyond your current technical capacity, some third-party tools offer X Conversions API integration:
- Server-Side GTM: route purchase events through a server-side GTM container that includes an X CAPI tag
- Zapier/Make: trigger CAPI calls from Shopify order webhooks (limited to simpler implementations)
What to Expect After Enabling X CAPI
After enabling the X Conversions API alongside your browser pixel, you should see an increase in matched conversions in X Ads Manager. X will show events coming from both “Pixel” and “Conversions API” sources. The total deduped conversion count may be higher than what the pixel alone was reporting.
This is not additional purchases — it is X now seeing conversions it was previously missing due to browser limitations.
Set Up Your X Conversions API
X Conversions API is more technical than the standard pixel but significantly improves conversion attribution quality for ecommerce stores with audiences that include heavy ad-blocker users.
Book your free Shopify tracking audit here and we will assess whether X CAPI is worth setting up for your specific audience and traffic volume.