Usage of this module is recommended if you are licensed for Tealium AudienceStream and you want to use the visitor profile to enhance the user experience in your mobile application. If you are not licensed for AudienceStream, usage of this module is not recommended as no visitor profile is returned.
Code to execute once the updated visitor profile is returned
The following example logs the visitor’s audiences and badges to the console:
Tealium dispatch with the event/view name and data layer
TealiumEvent("button_click", new Map([["button_name", "Submit"]]))
To track screen views, pass an instance of TealiumView(viewName, data) to the track() method. TealiumView comprises a view name, which appears in the tracking call as tealium_event, and an optional data dictionary.
let tealView = new TealiumView("VIEW_NAME", new Map([["key", "value"]]));
To track non-view events, pass an instance of TealiumEvent(eventName, data) to the track() method. TealiumEvent comprises an event name, which appears in the tracking call as tealium_event, and an optional data dictionary.
The following is an example:
let tealEvent = new TealiumEvent("EVENT_NAME", new Map([["key", "value"]]));
Gets the current visitor ID.
let visitorId = Tealium.visitorId;
An interface that defines what type of dispatch is tracked, along with the name or title of the event and the data layer.