Add and configure the Tealium Collect tag

This article describes how to configure the Tealium Collect tag to enable Data Layer Enchrichment.

For detailed instructions see the Tealium Collect Tag Setup Guide.

WhiteUI_DataLayerEnrichment_TealiumCollectTagConfiguration.png

Data enrichment frequency

To set up your Tealium Collect tag to enable Data Layer Enrichment, you must determine how often to update your data layer with attribute information. Here are the options:

  • None * Default. * Data layer enrichment does not occur.

  • Infrequent * Data layer enrichment occurs once per visit (session). * The retrieved customer data is stored in local storage for use on subsequent tracking calls during the session.

  • Frequent * Recommended. * Data layer enrichment occurs on every tracking call, which allows for customer data that changes during the session to be reflected in real-time in the UDO.

    This option causes an additional HTTP request per page.

Selecting a load rule

We recommend leaving the default Load on All Pages load rule selected for the Tealium Collect tag. To make your data layer as rich and robust as possible, you need to populate it with the most relevant data as soon as you can.

Using AudienceStream attributes in Tealium iQ

AudienceStream attributes are treated as imported variables in Tealium iQ. This means you cannot edit or delete them from Tealium iQ. If you want to delete or modify an AudienceStream attribute, you must do so from your AudienceStream profile. Moreover, you cannot import attributes to a profile library, only to a regular profile.

WhiteUI_DataLayerEnrichment_EditAudienceStreamVariables.png

Which AudienceStream attribute types are imported?

Not all data types are imported into your iQ account. The following data types are imported and made available in iQ:

  • Badges
  • Numbers
  • Strings
  • Booleans
  • Dates

Building load rules

You can use the attributes to create your load rules. The following two rule operators are available to accommodate the use of badges in load rules.

  • is badge assigned
    True if the badge attribute is assigned to the visitor.
  • is badge not assigned
    False if the badge attribute is not assigned to the visitor.

Deleting an attribute from AudienceStream automatically removes it from the data layer screen in iQ as well. However, load rules that use a deleted attribute do not automatically remove it from their logic. You must manually update load rules that still reference deleted AudienceStream attributes.

Callback function

The data layer enrichment request provides a callback mechanism so that you can execute code based on the response of the data layer enrichment request. The callback method is named window.tealium_enrichment().

To use the callback function, create a JavaScript Code extension scoped to Pre Loader with the following code example:

window.tealium_enrichment = function(data) {
    console.log("Data Layer Enrichment Callback");
    // Your code here...
};

Was this page helpful?

This page was last updated: January 7, 2023