X Pixel Device Mode Integration

Send events to X Pixel using RudderStack device mode.

After you have successfully instrumented X Pixel as a destination in RudderStack, follow this guide to correctly send your events to X Pixel in device mode.

Track

You can use the track call to record user actions along with any associated properties.

A sample track call is as shown:

rudderanalytics.track(
  "Purchase", {
    conversionId: 'transactionId',
    value: 35.0,
    currency: 'GBP'
  })

Supported mappings

The following table lists the mappings between RudderStack and X Pixel properties:

RudderStack propertyX Pixel propertyData TypeDescription
properties.value
properties.price
properties.revenue
valueInteger or FloatTotal value of the conversion event. For example, $ value of the transaction in case of a purchase, LTV value of a lead, etc.
properties.currencycurrencyStringISO 4217 currency code. For example, USD, JPY, EUR, GBP, etc.
properties.conversionId
conversion_id
conversion_idStringUnique identifier for the event that can be used for deduplication purposes.
properties.searchString
search_string
search_stringStringText that users search for on your website.
properties.descriptiondescriptionStringString description for additional information.
properties.twclidtwclidStringX click ID that you can include with any request. X Pixel automatically passes twclid from the URL or first-party cookie. You can use this parameter optionally to force attribution to a certain ad click.
properties.statusstatusStringStatus of user sign up or subscription. Allowed values are started or completed.
properties.contentscontentsArray of objectsArray of JSON objects representing products or content.

See below table for sub-parameters that you can include in the array.

The following table lists the mappings between properties.contents (from properties.products object) fields and X Pixel fields:

properties.contents fieldX Pixel fieldData typeDescription
typecontent_typeStringCategory of the purchased product. See Google product taxonomy) for the detailed list.
idcontent_idStringPass the SKU value for the product catalog users.

For all other users, pass the Global Trade Item Number (GTIN) value (if available). Otherwise, pass the SKU value.
namecontent_nameStringName of the product or service.
pricecontent_priceInteger or FloatPrice of the product or service.
quantitynum_itemsIntegerNumber of products purchased.
groupIdcontent_group_idStringID associated with a group of product variants.

Page

You can use the page call to record your website’s page views with any additional information about the viewed page. X Pixel automatically fetches all the page-related properties.

A sample page call is shown below:

rudderanalytics.page();

Questions? Contact us by email or on Slack