Xandr

What Is Xandr?

Xandr is Microsoft’s advertising technology platform for audience segmentation, retargeting, and conversion measurement. Xandr Universal Pixel helps advertisers collect website and app activity for audience creation and campaign reporting. This starter kit sends supported commerce and funnel events to Xandr using Universal Pixel request parameters. The integration uses the Xandr sync to retrieve the Xandr user identifier needed for event matching.


Product Type: Advertising

Integration Type: Starter Kit & ID Sync

Event Source Type: Web and/or Mobile Browser

Event Scope: Full-Funnel Events


Capabilities

  • Sends Universal Pixel events to Xandr for audience and conversion workflows
  • Supports page, product, checkout, payment, and purchase events
  • Maps product identifiers, names, categories, currencies, and values where available
  • Uses Xandr synced identifiers for user matching
  • Supports consent-aware Xandr sync behavior for regulated regions

Considerations

  • The Xandr UID must be present and valid for events to be sent
  • Events without a resolved Xandr UID are filtered out before delivery
  • Microsoft requires consent signals for applicable users in the EEA, UK, and Switzerland
  • Missing consent signals may affect audience and conversion processing in regulated regions
  • Event parameter values should be kept short because Xandr enforces parameter length limits
  • URLs and referrers may exceed Xandr parameter limits and should be reviewed before launch
  • Product names are shortened to 100 characters for checkout and purchase events
  • In our testing, requests above ~20,000 characters in the URL began to fail. While this isn’t a formally documented limit, it may be a practical constraint to consider when using this integration.
  • All values must be URL-encoded and arrays pipe-delimited.
  • One request per event; batching not supported.
  • Complex lists, such as product lists, must be pipe-delimited.

Limitations

  • Each event parameter value has a maximum length of 100 characters
  • Events cannot be sent when the Xandr UID is missing or set to 0
  • The integration does not support batching multiple events into a single request

Identity Sync

  • Sync Available: Yes

  • Required for Starter Kit: Yes

  • Prerequisites: N/A

  • Documentation: See Additional Xandr Sync Documentation

Sync Details

  • Retrieves the Xandr UID used for event matching
  • Stores the UID and formatted cookie value for server-side event delivery
  • Supports retry behavior when the sync attempt fails
  • Includes consent-aware behavior for supported privacy frameworks

Starter Kit Setup Guide

1. Deploy the Xandr Sync

  • To collect the sync values, you must implement a Xandr ID sync. Refer to the following documentation to complete the setup: Xandr – ID Sync Guide.

2. Gather Credentials

  • PIXEL_ID — Create or locate the Universal Pixel ID in Xandr.

3. Add a Xandr Integration

  • From the integration library, add a Xandr integration. Then, fill out the Connection Parameters:
Connection ParameterDescription
PIXEL_IDXandr Universal Pixel identifier used to route events.

4. Configure Event Mapping

  • MetaRouter provides all of the event mappings that Xandr integrations typically require. You may add custom events, parameters, or mappings in accordance with Xandr’s API documentation.

5. Deploy to Pipeline

  • In the Pipelines tab, add your Xandr integration.

  • Select the correct integration revision

  • Click Add Integration to finalize deployment.


Event Mappings

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output KeyDescriptionExpected Input
pi RequiredString: Xandr Universal Pixel ID.$$PIXEL_ID$$
scriptString: Indicates non-script pixel delivery.Enrichment – hardcoded value '0'
etInteger: Event timestamp in milliseconds.Expression – generate timestamp in milliseconds
uString: Page URL associated with the event.context.page.url
rString: Referrer URL associated with the event.context.page.referrer

Event Specific

Page

Output KeyDescriptionExpected Input
eString: Xandr page event name based on page path.Expression – return 'LandingPage' for /, otherwise 'PageView'

Product Viewed

Output KeyDescriptionExpected Input
eString: Xandr item view event name.Enrichment – hardcoded value 'ItemView'
iiString: Product identifier.properties.product_id
inString: Product name.properties.name
itpString: Product category.properties.category
cString: Uppercased currency code.properties.currency

Product Added

Output KeyDescriptionExpected Input
eString: Xandr add to cart event name.Enrichment – hardcoded value 'AddToCart'
iiString: Product identifier.properties.product_id
inString: Product name.properties.name
itpString: Product category.properties.category
cString: Currency code.properties.currency
vaString: Product value calculated from price and quantity.Expression – multiply properties.price by properties.quantity

Checkout Started

Output KeyDescriptionExpected Input
eString: Xandr checkout event name.Enrichment – hardcoded value 'InitiateCheckout'
iiString: Comma-separated product identifiers.Expression – join product_id values from properties.products
inString: Comma-separated product names shortened to 100 characters each.Expression – join shortened name values from properties.products
itpString: Comma-separated product categories.Expression – join category values from properties.products
vaString: Checkout value.properties.value
cString: Uppercased currency code.properties.currency

Payment Info Entered

Output KeyDescriptionExpected Input
eString: Xandr payment step event name.Enrichment – hardcoded value 'AddPaymentInfo'

Order Completed

Output KeyDescriptionExpected Input
eString: Xandr purchase event name.Enrichment – hardcoded value 'Purchase'
iiString: Comma-separated product identifiers.Expression – join product_id values from properties.products
inString: Comma-separated product names shortened to 100 characters each.Expression – join shortened name values from properties.products
itpString: Comma-separated product categories.Expression – join category values from properties.products
vaString: Purchase value.properties.total
cString: Uppercased currency code.properties.currency

Required & Recommended Identifiers

These identifiers must be mapped to Xandr in order for successful user matching to occur. Without these IDs, any events sent to Xandr may not be accurately reflected in reporting.

AttributeExampleSync Injector Required?
context.providers.xandr.uid Requiredabc-123Yes
context.providers.xandr.uid2 Requireduuid2=abc-123Yes
PIXEL_ID Requiredmy-pixel-idNo

Integration Validation

  • Trigger a test event through the Xandr integration.

  • In Xandr, review Universal Pixel activity for the associated pixel.

  • Confirm expected event activity is visible for the tested pixel.

  • Confirm the expected event parameters and values are present where available.

  • Validate that no consent, authentication, or request-size issues are preventing delivery.


Additional Xandr Documentation