This article provides the data layer definition for a retail e-commerce property.

Table of Contents Placeholder

 Data Layer Attributes

Variable Description Example Type
click_category During click tracking events, the category of the element clicked. eg. Header, Navigation, etc. "footer" String
click_label During click tracking events, the name of the element clicked. eg. Submit, Login, etc. "Submit" String
click_type During click tracking events, distinguish between different elements clicked, eg. 'link', 'button', 'field', 'image', etc. "button" String
content_author The name of the author of the content "John Smith" String
content_id The unique identifier of the page content "38121" String
content_publish_date The publish date of the page content, in format YYYY/MM/DD eg. '2015/02/09' "2015/02/09" String
content_title The title of the content on the page "Top 7 Outdoor Sleeping Bags" String
country_code The two-character country code of the site eg. us, uk, mx, ca, jp, etc. "us" String
customer_city The customer's city of residence "San Diego" String
customer_country The customer's country of residence "United States" String
customer_email The customer's email address "johnsmith@example.com" String
customer_first_name The first name of the customer "John" String
customer_id The unique customer identifier (if not customer_email) "8237572" String
customer_is_logged_in A flag to indicate if the current user is logged in eg. '1' or '0' "1" String
customer_last_name The last name of the customer "Smith" String
customer_postal_code The customer's postal code "92101" String
customer_state The customer's state/province of residence "CA" String
customer_type Distinguishes between registered users and guests eg. 'registered', 'guest' "guest" String
language_code The two-character language code of the site eg. us, es, fr, etc. "en" String
page_friendly_url The canonical URL of the page, might be different than the URL in the browser location bar "/travel/national_parks" String
page_name The user-friendly name of the page "Homepage" String
page_number For paginated content or galleries, the current page number in view eg. '2' "2" String
page_type The Tealium variable to identify the type of page or template eg. home, section, category, search, content, etc. "content" String
search_keyword The search text entered by the user eg. 'camping' "napa valley" String
search_results The number of search results returned eg. '42' "42" String
site_display_format The display format of the site in view eg. 'desktop', 'tablet', or 'mobile' "mobile" String
site_section The top-level section of your site eg. Travel, Sports, News, etc. "Travel" String
site_subsection1 The 1st level category of the page hierarchy "National Parks" String
site_subsection2 The 2nd level category of the page hierarchy "California" String
site_subsection3 The 3rd level category of the page hierarchy "Yosemite" String
site_subsection4 The 4th level category of the page hierarchy "'Camping" String
slide_title On a gallery page, the title of the current slide in view "#2 Yellowstone" String
social_network During social share events, the name of the social network used "facebook" String

 

Tracked Pages

Home Page

Identifier tealium_event="page_view"
Description The home page.
Sample URL http://www.example.com/
Sample Code
{
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/home",
    "page_name"              : "Homepage",
    "page_type"              : "home",
    "site_display_format"    : "desktop",
    "site_section"           : "Home",
"tealium_event" " "page_view"
}

Section Page

Identifier tealium_event="page_view"
Description A parent-category or top-level section page.
Sample URL http://www.example.com/top-level/
Sample Code
{
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/travel",
    "page_name"              : "Travel Home",
    "page_type"              : "section",
    "site_display_format"    : "desktop",
    "site_section"           : "Travel",
"tealium_event" : "page_view"
}

Category Page

Identifier tealium_event="category_view"
Description A category page, usually displaying a list of products.
Sample URL http://www.example.com/top-level/category/
Sample Code
{
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/travel/national_parks/yosemite_camping",
    "page_name"              : "Homepage",
    "page_number"            : "2",
    "page_type"              : "category",
    "site_display_format"    : "desktop",
    "site_section"           : "Travel",
    "site_subsection1"       : "National Parks",
    "site_subsection2"       : "California",
    "site_subsection3"       : "Yosemite",
    "site_subsection4"       : "Camping",
"tealium_event" : "category_view"
}

Content Page

Identifier tealium_event="content_view"
Description A content page.
Sample URL http://www.example.com/section/category/content.html
Sample Code
{
    "content_author"         : "Sue Smith",
    "content_id"             : "38121",
    "content_publish_date"   : "2015/02/09",
    "content_title"          : "Top 7 Outdoor Sleeping Bags",
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/travel/parks/ca/gear/bags.html",
    "page_name"              : "Camping Gear: Top Sleeping Bags",
    "page_type"              : "content",
    "site_display_format"    : "desktop",
    "site_section"           : "Travel",
    "site_subsection1"       : "National Parks",
    "site_subsection2"       : "California",
    "site_subsection3"       : "Yosemite",
    "site_subsection4"       : "Camping",
"tealium_event" : "content_view"
}

Gallery Page

Identifier tealium_event="content_view"
Description A page of content displayed as a gallery of slides.
Sample URL http://www.example.com/section/category/gallery.html
Sample Code
{
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/travel/national_parks",
    "page_name"              : "Top Parks Gallery",
    "page_number"            : "2",
    "page_type"              : "gallery",
    "site_display_format"    : "desktop",
    "site_section"           : "Travel",
    "site_subsection1"       : "National Parks",
    "slide_title"            : "#2 Yellowstone",
"tealium_event" : "content_view"
}

Search Page

Identifier tealium_event="search"
Description A search results page.
Sample URL http://www.example.com/search?query=term
Sample Code
{
    "country_code"           : "us",
    "customer_email"         : "johnsmith@example.com",
    "customer_first_name"    : "John",
    "customer_id"            : "8237572",
    "customer_is_logged_in" : "1",
    "customer_last_name"     : "Smith",
    "customer_type"          : "registered",
    "language_code"          : "en",
    "page_friendly_url"      : "/search/napa_valley/",
    "page_name"              : "Search results for: napa valley",
    "page_number"            : "1",
    "page_type"              : "search",
    "search_keyword"         : "napa valley",
    "search_results"         : "42",
    "site_display_format"    : "desktop",
    "site_section"           : "Travel",
"tealium_event" : "search"
}


Tracked Events

User Login

Identifier tealium_event="user_login"
Description Upon successful user login.
Sample Code
{
    "customer_city"         : "San Diego",
    "customer_country"      : "United States",
    "customer_email"        : "john.smith@example.com",
    "customer_first_name"   : "John",
    "customer_id"           : "8237572",
    "customer_last_name"    : "Smith",
    "customer_postal_code"  : "92101",
    "customer_state"        : "CA",
    "tealium_event"         : "user_login"
}

User Logout

Identifier tealium_event="user_logout"
Description Upon successful user logout.
Sample Code
{
    "customer_city"         : "San Diego",
    "customer_country"      : "United States",
    "customer_email"        : "john.smith@example.com",
    "customer_first_name"   : "John",
    "customer_id"           : "8237572",
    "customer_last_name"    : "Smith",
    "customer_postal_code"  : "92101",
    "customer_state"        : "CA",
    "tealium_event"         : "user_logout"
}

User Registration

Identifier tealium_event="user_register"
Description Upon successful user registration.
Sample Code
{
    "customer_city"         : "San Diego",
    "customer_country"      : "United States",
    "customer_email"        : "john.smith@example.com",
    "customer_first_name"   : "John",
    "customer_id"           : "8237572",
    "customer_last_name"    : "Smith",
    "customer_postal_code"  : "92101",
    "customer_state"        : "CA",
    "tealium_event"         : "user_register"
}

User Update

Identifier tealium_event="user_update"
Description Upon successful update of user profile information.
Sample Code
{
    "customer_city"         : "San Diego",
    "customer_country"      : "United States",
    "customer_email"        : "john.smith@example.com",
    "customer_first_name"   : "John",
    "customer_id"           : "8237572",
    "customer_last_name"    : "Smith",
    "customer_postal_code"  : "92101",
    "customer_state"        : "CA",
    "tealium_event"         : "user_update"
}

Email Signup

Identifier tealium_event="email_signup"
Description Upon successful signup for email newsletter.
Sample Code
{
    "customer_email"  : "john.smith@example.com",
    "tealium_event"   : "email_signup"
}

Custom Click

Identifier tealium_event="custom_click"
Description Tracking of specific click interactions with the page.
Sample Code
{
    "link_category"  : "Header",
    "link_name"      : "Login",
"tealium_event" : "custom_click" }

Social Share

Identifier tealium_event="social_share"
Description Tracking of social media sharing actions.
Sample Code
{
    "content_id"         : "38121",
    "page_friendly_url" : "/travel/national_parks",
    "page_name"          : "Travel: National Parks",
    "social_network"     : "facebook",
"tealium_event" : "social_share"
}