Twitter / X Ads Conversion Tracking
Sesamy integrates with the X Ads Conversions API to send server-side purchase events for ad attribution and campaign optimisation.
Built-in integration
This is a built-in integration. See Integration Concepts for shared concepts like event types and error handling.
Overview
The X Ads Conversions API lets you report conversion events directly from a server, bypassing browser limitations such as ad blockers and cookie restrictions. Sesamy sends a conversion event to X every time a purchase is completed, giving you accurate data for campaign measurement and optimisation.
Getting Started
Prerequisites
- An active X Ads account
- A pixel created in your X Ads dashboard
- A conversion event configured in Events Manager
Setup Process
- Create a pixel in your X Ads Events Manager if you do not already have one.
- Create a conversion event in Events Manager and select the Purchase event type.
- Copy your Pixel ID and Event ID from the event configuration screen.
- Provide both IDs to Sesamy Support. Your account manager will configure the integration for you.
Configuration Reference
The following values are needed for the integration:
| Field | Type | Description |
|---|---|---|
pixelId | string | Your X Ads Pixel ID |
eventId | string | The Event ID from your conversion event configuration |
Events and Data
Purchase Event
Sesamy sends a conversion event to the X Ads Conversions API when a checkout.1#confirm event occurs. This is the only event type handled by this integration.
Data Sent
| Field | Type | Description |
|---|---|---|
conversion_id | string | The checkout ID, used as a unique conversion identifier |
conversion_time | string | ISO 8601 timestamp of the purchase |
value | number | Transaction value |
currency | string | Currency code (e.g., "SEK", "EUR") |
number_items | number | Count of items in the purchase |
event_id | string | Your configured Event ID, used for deduplication |
contents | array | Product details (see below) |
Contents Array
Each entry in the contents array includes:
| Field | Type | Description |
|---|---|---|
content_id | string | Product SKU |
content_name | string | Product title |
content_type | string | Purchase option title (e.g., "Monthly", "Annual") |
User Identifiers
Sesamy sends hashed user identifiers alongside the conversion data so that X can match conversions to ad impressions.
| Field | Description |
|---|---|
| SHA-256 hashed email address | |
| Phone number | SHA-256 hashed phone number |
| IP address | Buyer's IP address |
| User agent | Buyer's browser user agent string |
Privacy
Email and phone number are hashed with SHA-256 before transmission. They are never sent to X in plain text.
Event Deduplication
The event_id from your configuration is included in every conversion event sent to X. X uses this value together with the conversion_id (checkout ID) and conversion_time to deduplicate events, preventing the same purchase from being counted more than once.
If you are also running browser-side X pixel tracking, the server-side events sent by Sesamy will be automatically deduplicated by X as long as the same event_id is used.
Verifying Your Integration
After Sesamy has configured the integration:
- Make a test purchase on your platform.
- Open Events Manager in your X Ads dashboard.
- Navigate to the conversion event you created during setup.
- Check for incoming conversion events. Events typically appear within a few minutes.
- Verify that the conversion value, currency, and product details are correct.
Troubleshooting
If events are not appearing in Events Manager:
- Verify your credentials -- confirm the Pixel ID and Event ID provided to Sesamy are correct and match the values in your X Ads dashboard.
- Check the event status -- ensure the conversion event in Events Manager is active and not paused.
- Wait a few minutes -- there can be a short delay before events appear in the dashboard.
- Contact Sesamy Support -- if events still do not appear after a test purchase, reach out to your account manager for assistance.
Next Steps
- Integration Concepts -- shared concepts, event types, and error handling
- Google Analytics 4 -- server-side GA4 purchase tracking
- Facebook / Meta Ads -- META Conversion API integration
- Kilkaya -- server-side tracking pixel for analytics
- Handling Webhooks -- build your own webhook endpoint to receive raw events