Set referer in cookie and read from utag.js

Gold Contributor
Gold Contributor
Hi, On our site, the entry (gateway) module does a redirect and removes the referrer in certain cases. Since we want the referrer to send to SiteCatalyst, as a workaround, we are planning to write the referrer into a cookie early in our processing pipeline, so it is available later. Just wanted to confirm that I can read from the cookie and set the relevant SiteCatalyst parameter in Tealium utag.js. What is the best way to do this? Thanks, Sriram
3 REPLIES 3

Set referer in cookie and read from utag.js

Employee Emeritus
Hey Sriram, As long as the cookie is a first party cookie you'll be able to accomplish this. All you need to do is add a Data Source with the name of the cookie you'll be setting. Make sure the Data Source Type is set to "Cookie Parameter." Then you'll map this cookie value to the SiteCatalyst tag as "referrer." This will set the referrer variable in the SiteCatalyst tag to the value of that cookie whenever it is defined. That's it! Hope that helps.

Set referer in cookie and read from utag.js

Gold Contributor
Gold Contributor
Hi Jared, Was just looking into this solution, but where to map to the referrer in the SC tag? Because it's not part of the standard destinations. Thanks.

Set referer in cookie and read from utag.js

Employee Emeritus
Marcel, You're right. The referrer is not an option in the Mapping Toolbox. You will need to manually type in "referrer" after selecting the data source from the drop down. Open the mapping section of the SC tag Select the Data Source from the drop down Click "Select Destination" Click "Apply" in the Mapping Toolbox Type "referrer" in the txt field next to the new data source mapping Hope that helps
Public