TealiumVolatileData
Provides methods for accessing volatile data.
Class: TealiumVolatileData
The following summarizes the commonly used methods of the iOS (Swift) TealiumVolatileData
class.
Method | Description |
---|---|
add() |
Add data to all dispatches for the remainder of an active session |
deleteAllData() |
Deletes all data in the volatile data store |
deleteData() |
Deletes data for a specific set of known keys from the volatile data store |
getData() |
Returns all volatile data previously set with the add() method |
resetSessionId() |
Reset the session ID for current session |
setSessionId() |
Override the existing session ID for current session |
add()
Add data to all dispatches for the remainder of an active session.
tealium?.volatileData()?.add(data)
Parameter | Type | Description | Example |
---|---|---|---|
data |
[String: Any] |
Dictionary of data to add as key-value pairs | data: ["session_id":"1234567890232"] |
deleteAllData()
Deletes all data in the volatile data store.
tealium?.volatileData()?.deleteAllData()
deleteData()
Deletes data for a specific set of known keys from the volatile data store.
tealium?.volatileData()?.deleteData(forKeys)
Parameter | Type | Description | Example |
---|---|---|---|
forKeys |
[String] |
Array of keys to remove from the internal volatile data store | forKeys: ["a", "b"] |
getData()
Returns all volatile data previously set with the add()
method.
let data = tealium?.volatileData()?.getData()
Returns | Return Type |
---|---|
Volatile data as key-value pairs | [String:Any] |
resetSessionId()
Reset the session ID for current session.
tealium?.volatileData()?.resetSessionId()
setSessionId()
Override the existing session ID for current session.
tealium?.volatileData()?.setSessionId(sessionId)
Parameters | Type | Description | Example |
---|---|---|---|
sessionId |
String |
Override the session ID for the current session | "123456123456009" |
This page was last updated: January 7, 2023