Xandr Universal Pixel Tag Setup Guide
This article describes how to set up the Xandr Universal Pixel tag in your Tealium iQ Tag Management account.
Tag tips
- You may enter multiple Pixel IDs in a comma-separated list.
- Purchase tracking occurs automatically when an order ID is populated. To disable automatic Purchase tracking, toggle the
automatic_purchase_tracking
destination via mappings. - PageView tracking occurs automatically. To disable automatic PageView tracking, toggle the
automatic_pageview_tracking
destination via mappings. - By default the PageView event executes without additional data. If you want to pass data with the PageView event, you must map the desired variables in the Event-specific Parameters tab of the mapping toolbox.
- Supports these E-Commerce extension parameters:
- Order ID (
_corder
) - List of Product IDs (
_cprod
) - List of Product Names (
_cprodname
) - List of Product Categories (
_ccat
)
- Order ID (
Tag configuration
Navigate to the Tag Marketplace to add a new tag. Read the Tag Overview article for general instructions on how to add a tag.
When adding the tag, configure the following settings:
- Pixel ID
- Enter your Xandr Universal Pixel ID.
- You may enter multiple IDs in a comma-separated list.
- Ad Storage Consent: Set the default consent for Ad Storage. Dynamically update this value by mapping the
ad_storage
parameter in the Data Mappings section. - Automatically read from Tealium Consent Cookie: If set to true, consent is set based on the Tealium Consent Manager.
Consent mode
There are two options to implement consent mode for this tag:
- Use Tealium Consent Management and automatically read the Tealium Consent cookie.
- Add a JavaScript Code extension to map consent choices and category mappings from your consent management platform (CMP) to this tag.
As visitors make their consent choices, the tag will choose the appropriate approach for first and third-party cookies:
- Granted: Both first-party and third-party cookies can be read and written.
- Denied: First-party cookies are neither read nor written, and third-party cookies are read-only for fraud and spam purposes, not for advertising.
Tealium Consent Management
To implement consent mode for this tag using Tealium Consent Management, set Automatically read from Tealium Consent Cookie to true
in the tag configuration.
JavaScript Code extension
To map end-user consent choices to Xandr consent mode settings, use the JavaScript Code extension. Configure the extension as follows:
- Set Scope to After Load Rules (default)
- Set Occurrence to Run Always
- Enter the JavaScript code for your CMP. You can customize the following code template for your CMP by replacing
CUSTOM_LOGIC
with the logic for your vendor.
b.consent_decision = (tealiumConsentRegister && tealiumConsentRegister.currentDecision) || [];
b.xandr_ad_storage_consent = CUSTOM_LOGIC ? 'granted' : 'denied';
For example, the following code is for OneTrust.
// After Load Rules - Run Always
b.consent_decision = (tealiumConsentRegister && tealiumConsentRegister.currentDecision) || [];
b.xandr_ad_storage_consent = b.consent_decision.indexOf('C0004') !== -1 ? 'granted' : 'denied';
If you use these exact variable names, no additional mapping is required. The latest version of the tag uses these variables by default. Overwrite these variables by mapping the ad_storage
parameter to attributes for your specific case.
Data mappings
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see Data Mappings.
The available categories are:
Tag Configurations
Variable | Description |
---|---|
Universal Pixel ID (pixel_id) | [String] |
Toggle Automatic PageView Tracking (auto_pageview_tracking) | [Boolean,String] |
Toggle Automatic Purchase Tracking (auto_purchase_tracking) | [Boolean,String] |
Base URL (base_url) | [String] |
E-Commerce
Variable | Description |
---|---|
List of Item Categories (item_type) (Overrides _ccat) | [Array] |
List of Item IDs (item_id) (Overrides _cprod) | [Array] |
List of Item Names (item_name) (Overrides _cprodname) | [Array] |
Events
Variable | Description |
---|---|
AddPaymentInfo | AddPaymentInfo |
AddToCart | AddToCart |
InitiateCheckout | InitiateCheckout |
ItemView | ItemView |
LandingPage | LandingPage |
Lead | Lead |
PageView | PageView |
Purchase | Purchase |
Custom | Custom |
Event-specific Parameters
Variable | Description |
---|---|
Item Type (item_type) | item_type |
Item ID (item_id) | item_id |
Item Name (item_name) | item_name |
Custom Parameter | Custom_Parameter |
AddPaymentInfo | AddPaymentInfo |
AddToCart | AddToCart |
InitiateCheckout | InitiateCheckout |
ItemView | ItemView |
LandingPage | LandingPage |
Lead | Lead |
Purchase | Purchase |
Custom Event | Custom_Event |
This page was last updated: November 9, 2020