Lab Companion
Lab Companion
University
Fundamentals of Tealium iQ
Contents
Getting Started with Tealium iQ………1
Username and Password………1
Lab Resources………1
Logging into Tealium iQ console………1
Summary Tab………2
Web Companion………3
Using Web Companion………4
Understanding the Data Layer………6
What is a Data Layer………6
How to Implement it………6
Defining Your Data Layer………6
Building Your Data Layer in Tealium iQ………8
Data Layer Tab………8
Adding a Single Data Source………8
Adding Data Sources in Bulk………9
Adding Common Data Sources………10
Adding Common E-Commerce Data Sources………11
Adding Data Sources via Web Companion………12
Code Center………13
Adding the Data Layer to Your Webpage………13
Saving a Profile Version………15
Tag Management Fundamentals………16
Use case 1: Google Universal Analytics (GUA) Tag………16
Adding Google Universal Analytics (GUA) Tag………16
Adding “Load on All Pages” Load Rule………17
Mapping a data source to GUA………18
Reviewing E-commerce Extension………20
Publishing Use Case 1………22
Use Case 2: Google Adwords Conversion Tag (GAC)………23
Adding a Cookie data type………23
Adding a Querystring Parameter data type………23
Adding Google Adwords Conversion Tag.………23
Creating a new Load Rule………25
Adding Persist Data Value Extension………25
Publishing Use Case 2………26
Advanced Load Rules………27
Loading Tags on Cart Page Only………27
Loading Tags on Conversion Pages only………28
Loading Tags with Time-Based Rules………29
Nested Load Rule………30
Load Rule Helper - Web Companion………31
jQuery onHandler (1.7 and above) Extension………33
Adding Event Tracking Data Sources………33
Using jQuery onHandler Extension for Navigation Tracking………33
Publishing jQuery onHandler Extension………35
Using jQuery onHandler for tracking Button Clicks………36
Content Modification Extension via Web Companion………37
Adding Content Modification Extension………37
Publishing a new version………39
Versions………40
Rollback to a previous version………41
Page 1
Lab Resources
To go through the lab exercises, you will need three resources:
• Lab Companion (PDF)
• The sample Universal Data Object (UDO) for your demo site
To download lab resources,
1. Navigate to your demo site at http://biz.tagthis.co/biz### (where ### is your unique training ID).
2. Click the button on the top-right corner of your demo site. This will open the README
page where you’ll find all the resources required to complete the lab exercises.
3. Under the Guides section, click on Tealium iQ Fundamentals Lab Guides to download this lab
guide.
4. Under the Templates section, click on Sample Universal Data Object CSV to download the .csv
UDO file.
Summary Tab
The Summary tab summarizes the Tag configurations in your profile. Upon logging into Tealium iQ
console, click the My iQ tab and select Summary.
Web Companion
Web Companion is a simple and versatile tool that allows you to inspect and modify the contents of
your website on the fly.
NOTE: You must install the Web Companion in your browser (see instructions below) before you can
launch it in your environment. However, we have embedded the very tool in your demo site for the
purpose of this lab. Simply click the button on the top-right corner to launch the
tool.
The Web Companion bookmarklet will appear in the bookmarks bar of your browser.
Tools Tab, with its assortment of tools like Extensions and Load Rules, gives you the capability to
target and manipulate an element on the webpage. Here’s a brief description of the tools:
How to Implement it
By coordinating with the stakeholders, such as your marketers, developers, and analytics personnel,
you determine what pieces of data you wish to capture on your site. These variables are listed in the
utag_data object. You place the utag_data object right above the utag.js file in your site’s code.
1. Build your Data Layer in your preferred spreadsheet program. Each data source entry must
contain four values: Source, Type, Description, and Alias. For example, a page name variable,
must be defined in this order: page_name,UDO Variable,Used to capture page name,Page Name
Note: The Description and Alias are optional but recommended.
2. When finished, save the spreadsheet file as a CSV (comma separated values) file. This formats
the data so you can easily add it to Tealium iQ later.
3. Open the CSV file in a text editor to verify if proper formatting was applied.
Let us now proceed to learn how to add data sources to this tab.
3. Select the Type from the drop-down list. The default selection is “UDO Variable”. Leave it as is.
4. Enter a suitable description for this data source. A good description is important later, when you’re
trying to quickly select the correct data source for mappings.
5. Enter an alias, such as “Page Name”, with which to display this data source in the Data Layer tab.
Without an alias, this data source will surface as “page_name”.
6. Click Apply. The data source is now added to the Data Layer tab.
1. Navigate to the Data Layer tab. Click the arrow of the button to drop-
down more options.
2. Click the Bulk Import from CSV button. This will open the Import Data Source text box.
3. Enter the CSV (comma-separated values) formatted data in the text field.
4. For this lab exercise, use the Sample Universal Data Object CSV that you downloaded earlier
from your demo site. Open the CSV file in your preferred text editor.
5. Copy and paste the formatted data in the Import Data Sources text-box.
Tealium University Understanding the Data Layer
Page 10
1. Navigate to the Data Layer tab. Click the arrow of the button to drop down
more options.
2. Click the Add Common Data Sources button. This will open a dialog box with the same label.
3. From the categories on the left of the dialog box, select the bundle that you want to import into
your Data Layer tab. For this exercise, select Base Data Sources under the Standard Bundles.
4. Click the button. Then navigate to the Data Layer tab to view the new data
sources.
NOTE: This bundle is designed to automatically add the E-commerce Extension to your profile
and set all the mappings. The importing action will not overwrite any existing data sources in your
Data Layer. If the E-Commerce Extension already exists, you will need to map the appropriate data
sources.
1. Follow Steps 1 and 2 from the previous exercise (see Adding Common Data Sources).
2. Under the Standard Bundles, click on E-Commerce Data Sources.
3. Click the button. This will import the E-Commerce data sources into your Data
Layer.
4. Navigate to the Data Layer tab and review the newly added data sources.
1. Navigate to the demo site at http://biz.tagthis.co/biz###/ (where ### is your unique training ID).
2. Click the button on the top-right corner to launch the Web Companion. By default,
this action will open the Overview tab.
NOTE: To launch the Web Companion in your environment, you will need to install the bookmarklet in
your browser.
3. Click the Data tab. Here you can see all the data points
that are available on the webpage, both the ones you are
currently capturing in Tealium iQ and the ones you are
not.
4. Click the JavaScript Variables bar to drop down various
data points contained in it.
5. Scroll down through the list of data points and click
the utag_data bar. The view will expand to display all
variables nested under utag_data.
Code Center
You have defined your Data Layer in Tealium iQ. Next, you need to combine it with Tealium’s
utag.js code and generate a script code. This is where Code Center comes in. Depending on
its configuration settings and the variables you added to the Data Layer tab, the Code Center
dynamically generates a block of script code that you can later add to your webpage’s code.
3. Select the environment that you will add your code to. This example has the “Prod” environment
selected.
4. Under the Tealium Script tab, you will notice the dynamically-generated script code. Mouse over
the code and click Select All button.
5. Copy the script code and paste it into your webpage’s code. Our best practices indicate that you
should place it after the opening <body> tag in your webpage’s HTML. Remember that the UDO
must go right above utag.js.
6. Take this opportunity to compare the code in the Code Center to the Data Layer you developed
in the CSV file. The code should contain everything from the CSV file that you plan to implement.
Make certain there are no discrepancies between the two.
1. Click the button. This action will open the Save/Publish pop-up menu.
2. Select the Save As button.
NOTE: A simple “Save” overwrites the current version to append the changes, making it impossible to
retrive previous settings or Tag configurations. On the other hand, “Save As” preserves a copy of the
current version and generates a new version to record the changes. The “Save As” feature provides
you with the opportunity to roll-back and retrive any of the older version.
3. Enter notes describing this save.This is a required field; you cannot save the version without
entering notes.
4. Select the Dev, QA, and Prod environments.
5. Click the Publish button at the lower corner of the console. This version is now published as a
new version.
6. Navigate to the Summary tab in the console and review the changes you made to the profile.
• Tag: Adding a Tag is the first order of business. Tealium supports hundreds of third-party vendor
Tags in a variety of categories, including analytics, email, advertising, and much more.
• Load Rule: A logical condition that determines when and where a Tag should load. It operates like
a logic statement; if certain conditions are met, then the Tag loads.
• Extension: Tools to manipulate data before it is sent to your third-party vendor Tags. An Extension
can be scoped to a specific tag or applied to all Tags in your profile.
3. There are two ways to look up a Tag in the Marketplace: enter the Tag name in the Search bar or
click the appropriate category on the left and locate your desired Tag from the listing.
4. Look up the Google Universal Analytics Tag using either methods and click the button.
This will add it to the Tags tab.
5. The Tag Creation Wizard opens to guide you through the Tag configuration process. The
configurations are provided by Google, but for this lab you will enter placeholder values.
a. Look at the title for the GUA Tag. Entering a descriptive title will make it easy to determine the
purpose of the Tag at a glance. For this exercise, you can leave the default title as is.
b. For the Tracking ID field, enter your Google Analytics account number, “UA-23498230”.
c. The Domain and Tracker Name will be auto-detected; you can leave them blank.
d. Leave the other configuration options as their defaults.
5. Click Apply. The mapping you set up will appear in the Data Mappings window.
Take a moment to review the Tag configurations you set up for GUA.
1. Navigate to the Extensions tab and click on the E-commerce Extension to expand its view. At this
point, all the mappings are automatically set.
2. Enter a suitable title in the Title field.
3. To map the Order and Product variables, click on the adjacent drop-down list and select the
appropriate data source.
NOTE: If you don’t wish to map a variable, set it to ‘Not Used’.
NOTE: Make certain that the “Prices are in” option is set to ‘Unit Price’.
You have successfully mapped the appropriate data sources to their E-Commerce equivalents.
Now any Tags (GUA in this case) that use the E-Commerce Extension will automatically receive
E-Commerce data without the need for additional mapping.
Note: The Description and Alias fields are optional but recommended.
2. Locate Google Adwords Conversion Tag and click the button. The Tag configuration
wizard will appear.
4. Click Next or click the Load Rules tab open the Load Rules creation wizard.
9. Click Finish in the Tag configuration wizard. The Google Adwords Conversions Tag is now added
to your profile and will only load when a visitor has come from a Google AdWords campaign and is
on the checkout page.
You have now set up the Persist Data Values Extension to store the value of the “utm_campaign”
querystring parameter whenever it detects it on a page.
By default, every profile starts with one load rule, called ‘All Pages’, which means the Tag loads on
all pages (that contain utag.js). Most tags load based on this load rule when they are first added to
Tealium iQ. To load a Tag under unique conditions, create a new load rule.
5. Click Apply.
6. Go to the Tags tab and apply this Rule to the Tag(s) of your choice.
7. Save/Publish the changes.
What happens next? The Rule will test the three conditions until atleast one holds ‘true’. For example,
the instant a visitor lands on the cart page, the ‘cart’ condition holds ‘true’ and your Tag(s) will load
only on that page. The remaining two conditions will not be evaluated. In the event none of the three
conditions are met, the Rule will fail to load the Tag(s).
Imagine you are running a 30-day spring campaign during which you’d like to load one or more Tags
when visitors apply the promo code “summer” towards their final order. The goal is for the Tag(s) to
load only when the campaign is active between May 1 to June 1, 2015.
Before getting started, add the ‘promo_code’ Source in your Data Layer so it easily available when
creating the Rule.
As soon as a visitor applies the ‘summer’ promo code, the Rule will proceed to check the browser’s
time zone. If the time zone falls within the date range you specified, the Rule is met and your Tag(s)
will load on the corresponding page. If the promo code is not “summer”, the Rule will fail and so will
the Tag.
1. Click the ‘Add Load Rule’ button to open the Load Rules Creation Wizard.
2. Enter ‘Conversion Pages with Order Information’ in the Title field.
3. Create the first AND condition where the ‘url(dom)’’contains’”cart” AND ‘product_sku’’is populated’
4. Select the OR condition button
5. Create the second AND condition where ‘url(dom)’’contains’”checkout” AND ‘order_id’’is defined’
AND ‘order_id’’does not equal (ignore case)’”0”
6. Click the Apply button and the new Load Rule is created.
17. Save/Publish
1. Navigate to the Extensions tab and add the jQuery onHandler (1.7 and above) Extension, located
under the Events tab in the marketplace. This will open the Extension’s configuration window.
2. Enter a title for the Extension, such as “Carousel Navigation”.
3. Next you will determine the attributes associated with the carousel button. Right-click on the
carousel button (either left or right) and select “Inspect Element”. This will open the Developer
Tools screen of your browser.
4. Under the Elements tab of the screen, notice that the class attribute of the carousel button is
“carousel-control”. Enter “.carousel-control” in the jQuery Selector field. Leave the Primary
Selector field blank.
5. For Trigger On, select “mousedown” as the triggering action.
6. For Tracking Event, select “link”, so you can treat the event as a link click.
7. Decide which event-tracking data you want to send to Google Universal Analytics. Now is the time
to select the data sources from the Event Tracking bundle you added earlier.
8. To set the event’s type/category,
a. Select the “event_type” data source from the Set drop-down.
b. Leave the To field set at ‘Text’. Enter “Navigation” in the adjacent text bar.
9. Click the plus button at the far right to add another Set expression.
10. For the event’s target/action,
a. Select the “event_target” data source.
b. Leave the To field set at ‘Text’. Enter “Carousel” in the adjacent text bar.
11. Click the plus button and add another Set expression for the event’s label/attribute.
a. From the Set drop-down, select the “event_attr1” data source.
b. Set the To field to ‘JS Code’.
c. Enter this expression in the adjacent text bar: jQuery(this).attr(“data-slide”);
What does the jQuery expression do? It sets the “event_attr1” value to that of the carousel button’s
“data-slide” attribute.
1. Navigate to the Extensions tab and click on the jQuery onHandler Extension to expand it.
10. Click on the Queue at the bottom of Web Companion tool. You will see that the Extension is
awaiting approval.
11. Click the Save button. This will prompt you to log into your Tealium iQ account.
12. Login to Tealium iQ with your username and password. Then click Save to Profile button.
NOTE: By default, an Extension added from Web Companion is disabled in the console. Click the
toggle button to activate it.
To review the Extension, navigate to the Extensions Tab in the console and click on the Content
Modification Extension.
Versions
The Versions tab provides a snapshot of version history of your profile. You can view a history of
published saves and unpublished saves together with currently deployed version. Take a moment to
review its layout:
a. Legend – The legend indicates what the different colored buttons mean. A grey button points to
an old version, and a blue button indicates current version.
b. Filters: Filter the view to display versions based date of creation, users, publish environments,
and date range.
c. Environment Lines: If a version is connected to a particular line, then it was published to that
environment. You are able to quickly tell if a version was ever customer-facing.
d. Versions list: All the versions are listed here. Each version is displayed on the same level as its
folder icon. The icon indicates the version that you are currently viewing.
NOTE: The console alerts you to this action by displaying the following message: “You are viewing an
old version. Switch to the latest version.”
4. Click the button on the top-right corner of the console. The Save/Publish dialog
box will appear.
5. Select the Save As button and choose an environment in which to republish: Dev, QA, or Prod.
You can choose any combination of the environments to publish.
6. In the Notes field, add notes about the changes made to the version.
7. Click the Publish button to publish the version.