X Ads (formerly Twitter Ads) Beta

Send your event data from RudderStack to X Ads.

X Ads (formerly Twitter Ads) is an advertising platform that lets you track and monitor ad campaigns, clicks, CTRs, etc. You can also implement efficient ad retargeting for your customers.

Find the open source transformation code for this destination in the GitHub repository.

Connection compatibility

Destination info
  • Status: Beta
  • Supported sources: Android, iOS , Web, Unity, AMP , Cloud, Warehouse, React Native , Flutter, Cordova, Shopify
  • Refer to it as TWITTER_ADS in the Integrations object.

Connection modes
SourceCloud modeDevice modeHybrid mode
AMPsupportednot supportednot supported
Androidsupportednot supportednot supported
Cloudsupportednot supportednot supported
Cordovasupportednot supportednot supported
Fluttersupportednot supportednot supported
iOSsupportednot supportednot supported
React Nativesupportednot supportednot supported
Shopifysupportednot supportednot supported
Unitysupportednot supportednot supported
Warehousesupportednot supportednot supported
Websupportednot supportednot supported
Supported message types
SourceIdentifyPageTrackScreenGroupAliasRecord
Cloud mode
Supported sourcesnot supportednot supportedsupportednot supportednot supportednot supportednot supported

Get started

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select X Ads.
  2. Assign a name to the destination and click Continue.

Account settings

  1. Click the Create Account button.
  2. Under Choose an account, click the Connect with X Ads button and give RudderStack the required permissions to access your account. Then, click Save.
  3. To verify or change your account, click the Edit Credentials button.
X Ads account settings

Connection settings

SettingDescription
Pixel IDEnter the Universal Website Tag (UWT) ID for your X Ads account.

See FAQ for more information on obtaining the Pixel ID.
Map RudderStack event name to X event IDThis setting lets you map your RudderStack Event Name to a specific Twitter Event ID.

See FAQ for more information on obtaining the Twitter Event ID.

Track

You can use the track call to capture user events and send them as conversion events for a single Universal Website Tag pixel ID.

The following snippet highlights a sample track call:

rudderanalytics.track("Product Purchased", {
  "quantity": "3",
  "currency": "USD",
  "value": 251,
  "email": "alex@example.com",
  "conversionId": "56342424234"
  "description": "Shoes",
  "contents": [{
      "id": "1",
      "price": "50.00",
      "quantity": 1
    },
    {
      "id": "2",
      "price": "100.55",
      "quantity": 2
    }
  ]
})

Supported mappings

The following table details the mappings between RudderStack and X Ads properties:

RudderStack propertyX Ads propertyData type
properties.eventIdevent_idString
properties.conversionTimeconversion_timeDatetime in ISO 8601 format.
properties.quantity
properties.numberItems
number_itemsString
properties.currencyprice_currencyString
properties.value
properties.price
properties.revenue
valueString
properties.conversionIdconversion_idString
properties.descriptiondescriptionString
properties.contentscontentsObject
properties.pixelIdNAString

Note that each event must contain at least one of the following identifier fields:

RudderStack propertyX Ads propertyData type
properties.emailidentifiers.hashed_emailString
properties.phoneidentifiers.hashed_phone_numberString
properties.twclididentifiers.twclidString
properties.ip_addressidentifiers.ip_addressString
properties.user_agentidentifiers.user_agentString
warning

Note that:

  • If you want to send the ip_address field in your events, you must also include at least one of the other identifier fields (email, phone, twclid, or user_agent).
  • If you want to send the user_agent field in your events, you must also include at least one of the other identifier fields (email, phone, twclid, or ip_address).

The following table lists the mappings between the properties.contents object fields and X Ads properties:

properties.contents fieldX Ads propertyData type
idcontent_idString
groupIdcontent_group_idString
namecontent_nameString
pricecontent_priceString
typecontent_typeString
quantitynum_itemsString

FAQ

Where can I find the X Ads Pixel ID and Event ID?

  1. Sign in to your X Ads account.
  2. Go to Tools > Event Manager.
  3. Set up your X pixel and add the associated events. For more information, see Conversion tracking for websites.
  4. You can find the pixel ID and event ID under your pixel name and created events.
X Ads pixel ID and event ID

Questions? Contact us by email or on Slack