Tag Management requires a little effort up front, but the returns are worth it. The main bit of work is adding a clean data layer into your web page or app. But what if you can’t? You’ve developed a large set of static content pages and updating each individual page is next to impossible. Or you need to get a data layer into your content but have no one to assist. (Has your entire web development team just decided to use their unlimited vacation days?) Tealium provides a way to make possible what was previously impossible.
The Hosted Data Layer (HDL) feature provided with Tealium iQ was originally called Data Layer Enrichment (DLE). Recently, the Tealium visitor service that provides visitor-specific Data Layer Enrichment was updated to be called “DLE.” Although they both are similar in that they will effectively bring data from an external source (CDN or service) to the data layer on the page. The main difference is that while DLE retrieves visitor-specific data, the HDL is designed to retrieve data about anything except a visitor.
Web Page Usage
The Tealium iQ Extension is called “Hosted Data Layer.” The typical use case on a web page would be to configure this extension with a variable that contains the “MD5” string of the current URL. That means it will lookup/retrieve all the additional data for this URL in one request. This allows for easy ‘deployment’ of Tealium iQ on a site with many static web pages and not a lot of developer resources to update each and every web page with a data layer. Best practice is to only request the minimum number of files per page to reduce HTTP requests and increase the likelihood of tracking with your tag vendors. The more data files to retrieve, the more delays are added to tracking calls that want to fire with the data.
Single Page Apps Usage
While the HDL feature was originally designed for the use case of a website with many static and difficult-to-modify pages, this feature can also be leveraged on Single Page Apps. For this scenario, we recommend that you do not use the Tealium iQ Extension. Instead, create a wrapper function to retrieve the data form HDL service before calling utag tracking functions (utag.view or utag.link.) This allows for your app developer to decide what is required and what is optional data. Required data should “block” (retrieve data and call callback) before executing utag.link or utag.view. Optional data can be asynchronously requested.
For example, if you have currency conversion data, you might want to retrieve that data in order to fire a purchase event with the adjusted amount at the time of the transaction. However, you may also want to pull data around general stock market shifts. This data is interesting, but not required. You would like to send the recent stock trend data to your analytics provider, but it will be OK to send that information on the 2nd or 3rd tracking event in your app.
Choosing to retrieve some data asynchronously allows for increased tracking (firing pixels sooner) and increased information (additional data is eventually retrieved, but user experience takes precedence.)
Tealium’s best practice is to place the data your tag vendors need in your data layer in the page. During your implementation process, the Deployment Engineering team will ensure you have the best data layer in the business. This provides the most powerful, intuitive, and performant solution. However, the Hosted Data Layer feature provides a framework for those cases where this is either technically not possible or just not practical. Many enterprise clients have complex implementations or internal processes.
We’re looking forward to some additional applications of HDL with added support for JSON files hosting. This allows for CORS support out of the box.
We’d love to hear about how you’re using this feature!