- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
The hosted data layer extension is a component of the hosted data layer feature. The extension is used to configure which variables from the on-page data layer are used to fetch hosted data layer objects.
See the full list of available extensions.
In this article:
The values of the lookup variables become the names of the hosted data layer objects.
This section describes how the hosted data layer extension works as utag.js loads on a page:
utag_data
) for the specified lookup variables.Use the following steps to configure the extension:
The extension performs the lookup in a sequential order. In the following example configuration, "page_name" is looked up first, followed by the "product_sku" then "customer_zip".
Overwrite on Merge (default YES)
If a key exists both in the incoming and recipient data layers, the incoming key-value overwrites the existing instance by default.The lookup can fail for two (2) reasons: either the name of the hosted data layer object is defined incorrectly or it is not defined at all. Regardless of the reason, the extension receives an empty object and there is no enrichment.
Ensure that the value of the lookup variable in the on-page data layer matches the name of the hosted data layer object uploaded to the CDN. Use the hosted data layer API to verify that the expected hosted data layer objects are uploaded to the CDN.
The extension releases the halt on utag.js and it runs as usual. There is no lookup and the on-page data layer remains unchanged.
The following example shows how the data layer looks before and after merging:
Original Data Layer | Incoming Variables |
---|---|
{ "product_category" : "shoes" "product_sku" : "GEN-PRD-BLU" } |
{ "product_category" : "boots" "has_instore_pickup" : "1" } |
After Merging: Overwrite YES | After Merging: Overwrite NO |
---|---|
{ "product_category" : "boots" "product_sku" : "GEN-PRD-BLU" "has_instore_pickup" : "1" } |
{ "product_category" : "shoes" |
No. You must upload data layer objects to the CDN prior to using this extension.
No. The scope and the execution drop-down list is predefined to ensure that the extension can automatically run before all load rules and tags are processed.
Running this extension introduces a slight slow down in tag firing since the hosted data layer objects must be returned before the operation can complete.
No. The lookup variables must exist in the on-page data layer at the start of the extensions. They cannot be populated by a previous lookup variable (hosted data layer object).
No. The extension is designed to run once per page load.
No. Mobile installations (iOS/Android/etc.) do not support the hosted data layer extension.
The extension receives an empty object and utag.js automatically resumes. No merging occurs.
You must use version 4.43, or greater. The hosted data layer extension is optimized for the most recent version of utag.js.
Copyright All Rights Reserved © 2008-2021