Identity Resolution
Learn about identity resolution.
How it Works
The Tealium Swift library generates a randomized and unique persistent visitor ID the first time it is launched with the getVisitorId()
method. This value is included in each tracked event as the attribute tealium_visitor_id
. This value is the primary visitor ID used in Tealium AudienceStream. You can include secondary visitor ID attributes as needed by adding them to the persistent data storage.
If you are using AudienceStream, this will become the main first-party visitor ID that’s associated with this visitor. You may provide additional known visitor IDs as needed, by sending them as variables in your tracking calls.
Learn more about configuring visitor IDs in AudienceStream.
class TealiumHelper {
var tealium: Tealium?
// ...
// Retrieve Tealium's first party visitor ID, if needed
func getVisitorId() -> String? {
return self.tealium?.visitorId
}
// adds a known visitor ID (such as an email address) to the persistent data store
func setKnownVisitorId(_ id: String) {
self.tealium?.persistentData()?.addPersistentData(["customer_id": id])
}
}
This page was last updated: March 11, 2024