Data Management
Learn how to manage persistent and volatile data.
Usage
Some variables are required on every event. To prevent having to manually add required variable data to every event, you have the option to store data as either volatile or persistent. Once data is stored, it will be appended to every event, including lifecycle events.
Learn more about Data Management.
Persistent Data
The setPersistentData()
method adds persistent data, as shown in the following example:
Tealium.setPersistentData({
"KEY1": "VALUE1",
"KEY2": ["STRING1", "STRING2", "STRING3"]});
The getPersistentData()
method gets persistent data, as shown in the following example:
Tealium.getPersistentData("KEY1");
The removePersistentData()
method removes persistent data, as shown in the following example:
Tealium.removePersistentData(["KEY1", "KEY2"]);
Volatile Data
The setVolatileData()
method adds volatile data, as shown in the following example:
Tealium.setVolatileData({
"KEY1": "VALUE1",
"KEY2": ["STRING1", "STRING2", "STRING3"]
});
The getVolatileData()
method gets persistent data, as shown in the following example:
Tealium.getVolatileData("KEY1");
The removeVolatileData()
method removes persistent data, as shown in the following example:
Tealium.removeVolatileData(["KEY1", "KEY2"]);
This page was last updated: January 7, 2023