Track
Learn about the methods for tracking user activity.
Track Views
The trackView()
method tracks screen views, as shown in the following example:
Map<String, Object> data = new HashMap<>(1);
data.put("KEY", "VALUE");
Tealium.getInstance("INSTANCE_NAME").trackView("EVENT_NAME", data);
The value passed as the first parameter will appear in the data layer as the variable tealium_event
.
Track Events
The trackEvent()
method tracks non-view events, as shown in the following example:
Map<String, Object> data = new HashMap<>(1);
data.put("KEY", "VALUE");
Tealium.getInstance("INSTANCE_NAME").trackEvent("EVENT_NAME", data);
This page was last updated: January 7, 2023