The Persist Data Value extension is used to set a value into a persistent cookie. Choose the cookie name and persistence duration.
See the full list of available extensions.
In this article:
The Persist Data Value extension sets first-party cookies using custom text values or values from the data layer. Set the cookie to either the default Tealium cookie
utag_main, an existing first-party cookie, or a new one. Each cookie you set must also be created as a data layer variable.
The expiration of the cookie is based on the user's session or a specified duration of time in hours or days. The cookie is either set once, updated on every page view, or set based on conditions that you define.
Once the extension is added, the following configuration options are available:
To store a value in the Tealium cookie, name the cookie variable in the format
<name> is the name of your cookie. Learn more about Tealium cookies.
This example demonstrates how to persist the visitor's location to a cookie. The location is retrieved from an existing data layer variable named
city_state_zip. This variable might only be available on one page, but the value is needed on all pages throughout the site, so the Persist Data Value extension is used to save it to a cookie that will last for the life of the session.
To create the location cookie: