Common Data Layer Properties
Data Layer properties for common setups.
Following you will find a collection of important Data Layer properties. These should be seen as a framework that can be adjusted to the needs of each individual site.

Base Data Layer Properties

Base Data Layer Properties are recommended for all TagCommander implementations. They are the minimum amount of properties to allow a straightforward handling of common Tags.
Property
Description
Example
env_template
Page type identifier—most important property that allow users to play out Tags only on relevant pages.
"homepage", "product_detail", "funnel_confirmation"
env_work
Environment identifier
"prod", "stage", "dev"
env_country
Site country code (ISO_3166-1_alpha-2)
"DE", "EN", "FR"
env_language
Site language code (ISO 639-1)
"DE", "EN", "FR"
page_name
Name of the page.
"Our new phone!"
page_cat1_name
Page top category name
"smartphones"
page_cat2_name
Page category name
"apple"
page_cat3_name
Page sub category name
"iphones"
page_cat1_id
Page top category id
"1234"
page_cat2_id
Page category id
"2345"
page_cat3_id
Page sub category id
"3456"
page_search_keywords
Search keywords on search or product finder pages
"new iphone"
page_search_filters
Array of search filters on search or product finder pages
["price", "rating"]

User Data Layer Properties

User ids and properties are important for advertising and personalisation services.
Property
Description
Example
user_id
User ID
"12345"
user_email_hash
Hashed user email
"kGghdg62173fh1123ff667128g"
user_newcustomer
New customer flag
true for new customer, false for known customer

Data Layer Properties for Ecommerce Sites

It is recommended to extend the base Data Layer properties with following variables for ecommerce sites. These enable users to successfully track product and order information:
Property
Description
Example
env_currency
Currency code (ISO code 4217)
"EUR"
product_array
An array of product objects that holds products information of currently viewed products on a page—product list pages usually hold several products (e.g. top 5 products of the page), product detail pages only one product
Described in section Data Layer Product Array
basket_id
Unique basket ID
"B12345"
basket_products
An array of product objects that holds product information of current products in the basket
Described in section Data Layer Product Array
order_id
Unique order ID
"O12345"
order_amount
Total value of the order, without tax and without shipping fee
123.45
order_amount_ati
Total value of the order, all tax included and without shipping fee
234.56
order_amount_ati_with_sf
Total value of the order, all tax included and with shipping fee.
345.67
order_discount
Total discount of the order without tax
12.34
order_discount_ati
Total discount of the order with tax
23.45
order_discount_code
Order discount or voucher code
"AB16887CDV883"
order_products
An array of product objects that holds product information of all ordered products on the product confirmation page
Described in section Data Layer Product Array

Product Arrays

TagCommander recommends to structure lists of products (product_array, basket_products and order_products) via an array of JavaScript product objects:
1
tc_vars.product_array = [
2
{
3
product_id: "1234",
4
product_name: "my product",
5
( ... )
6
},
7
{
8
product_id: "2345",
9
product_name: "my other product",
10
( ... )
11
},
12
( ... )
13
]
Copied!
Following you will find a list of recommended properties of each product entry:
Property
Description
Example
product_id
Product ID—usually internal ID
"12345"
product_id_variation
Product ID variation—usually SKU
"2345"
product_name
Product name
"My product"
product_name_variation
Product name variation
"My other product name"
product_unitprice
Product unit price without tax
12.34
product_unitprice_ati
Product unit price with tax
23.45
product_discount
Discount amount without tax
1.23
product_discount_ati
Discount amount with tax
2.34
product_cat1_name
Product top category name
"smartphones"
product_cat2_name
Product category name
"apple"
product_cat3_name
Product sub category name
"iphone"
product_cat1_id
Product top category id
"1234"
product_cat2_id
Product category id
"2345"
product_cat3_id
Product sub category id
"3456"
product_qty
Product quantity
5

Data Layer Variables for Publishers

Coming soon ...
Last modified 2yr ago