Skip to content

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

  1. An active X Ads account
  2. A pixel created in your X Ads dashboard
  3. A conversion event configured in Events Manager

Setup Process

  1. Create a pixel in your X Ads Events Manager if you do not already have one.
  2. Create a conversion event in Events Manager and select the Purchase event type.
  3. Copy your Pixel ID and Event ID from the event configuration screen.
  4. 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:

FieldTypeDescription
pixelIdstringYour X Ads Pixel ID
eventIdstringThe 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

FieldTypeDescription
conversion_idstringThe checkout ID, used as a unique conversion identifier
conversion_timestringISO 8601 timestamp of the purchase
valuenumberTransaction value
currencystringCurrency code (e.g., "SEK", "EUR")
number_itemsnumberCount of items in the purchase
event_idstringYour configured Event ID, used for deduplication
contentsarrayProduct details (see below)

Contents Array

Each entry in the contents array includes:

FieldTypeDescription
content_idstringProduct SKU
content_namestringProduct title
content_typestringPurchase 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.

FieldDescription
EmailSHA-256 hashed email address
Phone numberSHA-256 hashed phone number
IP addressBuyer's IP address
User agentBuyer'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:

  1. Make a test purchase on your platform.
  2. Open Events Manager in your X Ads dashboard.
  3. Navigate to the conversion event you created during setup.
  4. Check for incoming conversion events. Events typically appear within a few minutes.
  5. 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

Released under the MIT License.