For tags that are e-commerce enabled, this extension allows you to define a set of e-commerce variables and automatically map them to your tags.

In this article

Table of Contents Placeholder

How it Works

The E-Commerce extension allows you to map your e-commerce specific data layer variables once and make them available to any e-commerce enabled tag in Tealium iQ automatically.

  • The E-Commerce extension contains a standard data set used by many analytics, affiliate reconciliation, and revenue-based marketing tags, such as Google Universal Analytics, Adobe SiteCatalyst, and ChannelAdvisor.
  • The E-Commerce extension outputs your mappings as a special set of variables wiht names that are appended by _c to distinguish them from other variables.
  • What is special about these variables is that they automatically map to the corresponding destination variables of any tag that uses e-commerce data. You do not have to go through all of your tags and map the same variables over and over again.
  • If you want to override a particular mapping, you can do so through the Mappings toolbox in the tag Configuration wizard.

E-commerce_Ext_Overview.png

Installing the E-Commerce Extension

The Execution drop-down requires utag.js version 4.38 or higher. Older versions (4.37 and below) may impact execution, causing the extension to run twice.

Use the following steps to install the E-commerce extension.

  1. Navigate to the Extensions tab and click Add Extension.
    The E-Commerce extension is located under the Advanced tab in the extensions marketplace.
  2. Click + Add to add the extension.
    You can activate the E-Commerce extension once per profile. The extension is automatically scoped to All tags in order to make it available to any tag that is e-commerce enabled.
  3. Use the Execution drop-down list to choose when to run the extension.
    ExecutionDroplist.png

    The selections have the following effect on the extension:

      • Before Load Rules: Extension runs before load rules are evaluated.
      • After Load Rules (Default): Extension runs after load rules are evaluated.
      • After Tags: Extension runs after all tags have loaded. 

    The Execution drop-down requires utag.js version 4.38 or higher. Older versions (4.37 and below) may impact execution, causing the extension to run twice.

  4. Map your data layer variables to their corresponding e-commerce variables by selecting them from the drop-down list. You may leave the mappings blank for unused variables.
    The following example shows the mappings between data layer variables and e-commerce variables.
    E-Commerce Extension_Configuration Variables_Naming Best Practices.png
    Hovering over each variable entry displays a tool tip to help you choose the correct variable.

E-Commerce Extension Layout

The extension separates the E-commerce variables into two categories: order values and product values. The order values contain information about the order and customer. The product values contain information about the products in the order and are organized as lists.

Order Values

The left column lists order-specific variables.

In order for the E-commerce extension to operate properly you must map the Order ID variable.

 

Order Value Description Output variable
Order ID
  • Select the variable that contains the unique ID that identifies the customer's order.
  • In order for the E-Commerce Extension to work, you must have order ID mapped.
 _corder
Order Total Select the variable that contains the total revenue value of the order. _ctotal
Sub Total
  • Select the variable that contains the subtotal value of the order.
  • This is the order total less the shipping and tax amounts.
_csubtotal
Shipping Amount Select the variable that contains the shipping amount for the order. _cship
Tax Amount Select the variable that contains the tax amount of the order. _ctax
Store Select the variable that identifies the channel, site, or store in which the order occurs. _cstore
Currency Select the variable that identifies the currency which the revenue is in. _ccurrency
Promo Code Select the variable that contains the voucher, promotion, or coupon code. _cpromo
Cart or Order Type Select the variable that contains the cart, order, or customer type. _ctype
Customer ID Select the variable that contains the customer ID. _ccustid
Customer City Select the variable that identifies the customer's city, as identified by the customer's address. _ccity
Customer State Select the variable that identifies the customer's state or province, as identified by the customer's address. _cstate
Customer Zip Select the variable that identifies the customer's zip code, as identified by the customer's address. _czip
Customer Country
  • Select the variable that identifies the customer's country, as identified by the customer's address.
  • The output variable is _ccountry.
 _ccountry

The Calculate Order Total (_ctotal) radio button allows you to specify if the E-Commerce extension should compute the order total. For the majority of situations, the Order Total is calculated prior to data reaching the E-Commerce extension, so the default is set to No. If you want the E-Commerce extension to calculate the order total for you, select Yes

Product Values

The left-hand column lists order-specific variables.

The following parameters are formatted as lists.

Product Value Description Output variable
List of Product IDs Select the variable that contains the product ID. _cprod
List of Names Select the variable that contains the name of the product. _cprodname
List of SKUs  Select the variable that contains the product SKU. _csku
List of Brands Select the variable that contains the producs brand. _cbrand
List of Categories Select the variable that contains the product's primary category. _ccat
List of Categories 2 Select the variable that contains the product's secondary category. _ccat2
List of Quantities Select the variable that contains the quantity of each product that was ordered. _cquan
List of Prices Select the variable that contains the product price. _cprice
List of Discounts Select the variable that contains product discount amounts.  _cpdisc

The List Variable Type droplist identifies the format in which the lists of product values is sent. The selection can be

  • String, such as "product 1, product 2, product 3"
  • Array, such as ["product 1","product 2", "product 3"]

 By default the selection is set to array. 

To learn more about strings and arrays, see the Strings vs. Arrays article.

The Prices are in radio button identifies the format in which product prices will display to the E-Commerce extension. The selection can be one of the following:

  • Unit price which is the price of the item, regardless of the quantity. This is the default value and is the most common format.
  • Line price which is the price of the item multiplied by its quantity.

 If you select Line price, the E-Commerce extension will automatically convert it to Unit Price.

Overriding E-commerce Variables

When you set up the E-Commerce extension, the values you select in the extension are automatically sent to all tags that use E-commerce data. If you want to send the value of another variable instead of the E-Commerce extension's variable, you do so by mapping the value you want to send in the mapped variables section for a tag's configuration. The Mapping Toolbox will indicate which destinations override E-commerce mappings.

The following is an example of the Mapping Toolbox from the Google Universal Analytics tag:

MappingToolboxExample.png

Adding E-commerce Bundles

If you have not added the E-Commerce extension and are adding variable bundles, the following bundles will automatically add and configure the E-Commerce extension for youFor:

  • E-commerce Variables bundle
  • Demandware bundle
  • Hybris bundle
  • Magento bundle 

If you added and configured the E-Commerce extension before adding these bundles, adding a bundle will not overwrite or replace the existing E-commerce extension or its settings.