Back

This article provides a high-level overview of the order of operations for AudienceStream and describes how AudienceStream components work together and how AudienceStream works with iQ Tag Management (TiQ).

In this article:

Table of Contents Placeholder

How it Works

To help explain how all the bits and pieces work together within AudienceStream (AS), and even between Tealium iQ (TiQ) and AS, this post will discuss the order of operations for events at a high level.

For additional information about the order of operations for the utag.js file, see Order of Operations.

Page Load Events

AudienceStream relies on a well-built data layer. This section describes the order of operations and what happens behind the scenes for a Page Load event.

Order of Operations on Page Load

  1. A visitor's browser loads your site and the utag_data object is declared within the site's source code.
  2. The utag.js script loads and triggers the TiQ library.
  3. The TiQ library builds the data layer, including the Universal Data Object (UDO), cookies, metadata, DOM elements, and JavaScript variables.
  4. The utag.js file executes your third-party vendor tags.
  5. The last tag to fire is the Tealium Collect tag, which sends the data layer to AudienceStream.

Order of Operations for AudienceStream

AudienceStream receives the data layer and initiates the following:

  1. AudienceStream evaluates rules to determine which attributes to enrich.
  2. AudienceStream enriches the appropriate attributes.
  3. Visitor profiles join or leave audiences as appropriate.
  4. The movement of visitor profiles into or out of your audiences triggers your actions.

Post Page Load Visitor Events

Any visitor-generated event that triggers a utag.link() or utag.view() call registers in AudienceStream. These types of events typically occur after the page loads. A variety of configurations are available for executing tags.

For additional information, see Tealium for JavaScript (utag.js).

In the following example, a basic configuration is assumed for a sample call for an Add to Cart button click:

utag.view({event:"click", action:"add to cart", product_id="id123"});

In the example, the data declared within utag.link() is the new data layer. Since this event was triggered by a utag.link() call, the order of operations differs as follows:

  1. The utag.link() call triggers and declares a new data layer.
  2. The TiQ library is re-initiated.
  3. The utag.js file executes the vendor tags.
  4. The last tag to execute is the Tealium Collect tag, which sends the data layer to AudienceStream.
  5. Once AudienceStream receives the new data, operations proceed as described in the previous section.

End-of-Session Events

AudienceStream is unique in TiQ in that it has the ability to determine the end of a session. In the following example, a common Cart Abandoner badge is evaluated at the end of a session, meaning "WHEN" "VISIT ENDED".

WhiteUI_AudienceStream_Cart Abandoner_WHEN Visit Ended.jpg

The order of events that occur when the session ends are as follows:

  1. Any attribute enrichment that is configured "WHEN" "VISIT ENDED" will evaluate the rule applied, such as the Cart Abandoned rule in the example.
  2. Visitor profiles join or leave audiences as appropriate.
  3. AudienceStream triggers actions based on the movement of the visitor profiles.

Verifying with the Trace Tool

Initializing a Trace displays the events occurring in real time. The latest events display at the top. Read the trace report from the bottom up to view the chronological order.

WhiteUI_AudienceStream_Understanding AudienceStream Order of Operations_Trace Tool_Feed.jpg

Trace Glossary

  • Visitor Event Received
    A page load, visitor, or end-of-session event occurred.
  • Enriched Visitor Profile
    AudienceStream evaluated rules and enriched attributes.
  • Audience Joined/Left
    A visitor profile joined or left an audience.
  • Action Triggered/Processed
    AudienceStream triggered an action based on the movement of a visitor profile