New to Tealium - Set dataLayer var to existing cookie value

Gold Contributor
Gold Contributor

Hello, we're new to Tealium and struggling to get some fundimental understanding of how to achieve certain things in the platform.

 

In this usercase, we have a first-party cookie of "User" to which we'd like to map to our dataLayer. I'm assuming in this situation, we'd select  First-Party Cookie? Is this correct? Or, does this process actually "write" a "new" cookie? 

 

If establishing the First-Party Cookie item in the dataLayer is correct, do we name this item "anything" we'd like or does it's name need to aling with the actual cookie name? I assume if the latter than this is how we pull in the cookie value? Is this correct?

 

If not, I would have to guess we need to establish an extension to get the cookie value? 

 

I understand these may seem like pretty fundimental questions but I've struggled to find any basic information that completely explains how this works. 

 

Any feedback would be welcome.

4 REPLIES 4

New to Tealium - Set dataLayer var to existing cookie value

Moderator
Moderator

Hi,

 

Welcome to TLC!

 

You have asked some very good questions!

 

The "First Party Cookie" option in the data layer tab will allow you to reference first party cookies in mappings within TiQ. For the first party cookie option, this variable must be exactly on how the cookie is set on your site. For example, "User" as a first party cookie on your site, should be called "User" in the DataLayer tab.

 

This will create a reference to the cookie in your utag.data object (utag.data['cp.User']), which you can then use in extensions, mappings, load rules and more.

Ask me anything Tealium!

New to Tealium - Set dataLayer var to existing cookie value

Gold Contributor
Gold Contributor
Thank you. This is information that should probably be included in the documentation.

New to Tealium - Set dataLayer var to existing cookie value

Gold Contributor
Gold Contributor
One last question, should I be using the Set Data extension to overwrite/update this cookie's value or the Persist Data extension? Or would both work?

New to Tealium - Set dataLayer var to existing cookie value

Tealium Expert
Tealium Expert

Hello @MRubens ,

Set Data extension will not help you to update the cookie value, it will only update the Datalayer(DL) object value. If you want to update the cookie as well then you need to use the Persist Data extension, this will update both the DL variable and the cookie.


Hope this helps

Thanks

Public