Tealium cookies
This article explains how cookies from the Universal Tag (utag.js) work and how to work with your own cookies within Tealium iQ Tag Management.
How it works
The Tealium Universal Tag (utag.js
) creates and maintains several first-party cookies.
The utag.js
script creates and maintains a single cookie called utag_main
. Within that cookie are several built-in values that keep track of the visitor session. These variables can be easily added to your data layer using the Tealium Built-In Data Bundle. The expiration time of the utag_main
cookie is set to one year.
Built-in cookies
The built-in cookie variables are:
Cookie Variable | Description |
---|---|
ses_id |
The Unix/Epoch timestamp of the session start, in milliseconds. |
_st |
The Unix/Epoch timestamp of the session timeout, in milliseconds - updated on new events. |
v_id |
A unique, partially random identifier. |
_ss |
A Boolean that indicates if the page viewed is the first in a session. A value of 1 means yes and 0 means no. |
_pn |
The number of pages viewed during the current session. |
_sn |
The number of sessions for this visitor. |
You can add custom values to the utag_main
cookie by creating a new variable of type First Party Cookie with the prefix utag_main_
for example: utag_main_mycookie
. This keeps cookies associated with your Tealium installation separated from the global cookie namespace, which helps to avoid name collisions reduces the overall number of cookies used for your site.

Cookies from extensions
The Persist Data Value, Split Segmentation, and Privacy Manager extensions create and leverage cookies when used.
Persist Data Value (cookie)
The Persist Data Value extension allows you to create a cookie in which you can persist the value of a variable. To persist the value for a variable, you can create a new cookie or use an existing cookie. You may persist the value for a variable in the utag_main cookie by prefixing utag_main_
to the name of the cookie variable, for example: utag_main_mycookievar
.
Split Segmentation
The purpose of the Split Segmentation extension is to divide visitors into segments you specify. The extension stores the segment data in the cookie variable you create.
If this extension is scoped to Preloader, you must use a cookie other than utag_main
.
Privacy Manager
The Privacy Manager extension uses a cookie named OPTOUTMULTI
to save the privacy settings for a visitor for the next time they visit your site. The settings you select in Privacy Manager are saved as parameters in the cookie.
Cookies from Consent Manager
The Consent Manager uses a cookie named CONSENTMGR
to save the consent settings of a visitor.
Learn more about consent management.
To change the name of the CONSENTMGR
cookie, first verify that you are using version 2.0.1 or higher of the cmGeneral template, then use a Javascript Code extension scoped to All Tags - Before Load Rules with the following code:
utag.gdpr.cookieNS = 'NEW_COOKIE_NAME';
To change the retention period of the consent cookie, use the configuration override setting for utag.js
.
Cookies from Web Companion
Web Companion uses a cookie to remember which publish environment (Prod, QA, Dev, or Custom) you were viewing when you last visited your site. Viewing the default publish environment for your site does not set a cookie.
The last viewed publish environment is saved in the following cookie, where {account}
and {profile}
are replaced with your account and profile:
utag_env_{account}_{profile}
If you clear your browser’s cookies, Web Companion does not remember which publish environment you were viewing, requiring you to re-select the environment to view.
This page was last updated: February 21, 2023