Pass Cookie Value in Tealium Variable

Bronze Contributor
Bronze Contributor

Hi Team,

I am new to tealium. I have to do one activity i.e need to pass LILO cookie value( non-tealium cookie, first party) into variable(prop 27) user_hashedID. Here mapping is already done in global page load rule. So, how I can populate that cookie value in variable i.e through extension or creating new variable.

For now user_hashID is empty and I have to pass cookie value whien we find hashID is empty.


Pass Cookie Value in Tealium Variable

Tealium Employee

All first-party cookies are read by the utag.js script and added to the data layer using the "cp." prefix. If your cookie is set before Tealium executes, you should see it show in the data layer as "cp.LILO". You'll still need to add it as a UDO variable in Tealium IQ to be able to use it in mappings. You can go to the data layer tab, click on the blue "Add Variable" button, then enter "LILO" in the variable name box. Please ensure the type is set to "First Party Cookie". Once you have added the variable in the data layer tab, you can use it in your Adobe tag to map to "prop27".

You can have multiple variables mapped to the same prop, however, know that mappings are set from top to bottom, so if you have two, the bottom value is what will be used.

If you want to use the cookie as a fallback, you can use a Set Data Values extension to set "user_hashedID" to the cookie value if the variable "user_hashedID" is not defined. You would then map "user_hashedID" to "prop27" in the Adobe tag.

I hope this helps.

Jen Kaye
Senior Customer Success Engineer | Tealium, Inc.