Skip to main content

X (Twitter) Conversions API

Server Source code Package Beta

Server-side event delivery to X's (Twitter's) Conversions API for enhanced ad attribution and privacy-compliant conversion tracking.

Where this fits

X Conversions API is a server destination in the walkerOS flow:

Sends conversion events server-side to X's Conversions API, bypassing browser limitations for improved data quality. Deduplicates with the browser-side X Pixel via `conversion_id`.

Installation

Loading...
Loading...

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
pixelId*stringX Pixel ID used in the Conversions API endpoint URL
eventId*stringDefault pre-registered conversion event ID
consumerKey*stringOAuth 1.0a API Key (Consumer Key) for X Ads API
consumerSecret*stringOAuth 1.0a API Key Secret (Consumer Secret)
accessToken*stringOAuth 1.0a User Access Token
accessTokenSecret*stringOAuth 1.0a User Access Token Secret
apiVersionstringX Ads API version number
doNotHashArray<string>Array of user data fields that should not be hashed
urlstringCustom base URL for the X Conversions API endpoint
user_dataRecord<string, string>Mapping configuration for user identifiers
* Required fields

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
eventIdstringOverride the default conversion event ID for this event
valuestring | numberConversion monetary value (sent to X as a string)
currencystringISO 4217 currency code
number_itemsintegerNumber of items in the conversion
descriptionstringFree-text description of the conversion

Examples

lead

Event
Out

purchase

Event
Mapping
Out

purchase with twclid

Event
Mapping
Out

User identification

The destination builds an identifiers array. Each identifier is a separate single-key object in the payload. At least one primary identifier is required. Events without one are silently skipped.

Primary identifiers:

  • hashed_email: resolved from event.user.email or a user_data.email mapping. The email is normalized (trimmed, lowercased) and SHA-256 hashed before sending. Set doNotHash: ['email'] if you are pre-hashing upstream.
  • hashed_phone_number: resolved from event.user.phone or a user_data.phone mapping. SHA-256 hashed. Use doNotHash: ['phone'] to skip.
  • twclid: X click ID (pass-through, not hashed). Typically forwarded from the browser session:
Loading...

Secondary identifiers (optional): ip_address, user_agent, pass-through.

Per-event overrides

The default eventId from settings applies to all events. Override it per event via mapping to route different events to different pre-registered conversion events:

Loading...

Browser deduplication

When running both the browser-side X Pixel and this server destination, the walkerOS event id is sent as conversion_id on both sides. X deduplicates conversions that share the same conversion_id and conversion event, so only one conversion is counted.

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)