Setting s object variables in Tealium

290 Views Asked by At

Relatively basic question but I can't find an answer. I've emailed Tealium as well, but thought I'd ask the masses here.

I want to explicitly set something within the s object, in this case s.referrer. When I set it in an extension, it doesn't take. Referrer isn't one of the things I can map directly to, so that's not an option.

I thought I could simply call out an s object assignment statement since I did it once before with s.linkTrackVars and it looked like it worked based on results in the reporting, but now, I decided to go check and the Tealium Web Companion claims there's nothing set there either.

How do I call out, in plain JS, setting something in the s object in Tealium?

1

There are 1 best solutions below

0
On

This is possibly because since you're running your s-code within a Tealium SiteCatalyst tag, and it's not globally setting s on the window to anything anymore, by default.

If you want to change a particular value, do the following:

  • Create a new data layer value within the Tealium UI that'll be used to store your value (and generally aid in the graphical mapping)
  • In your extension, scoped to the tag, set the the value of that data layer value (b.[variable_name])
  • Create a new mapping within the SiteCatalyst tag and select the SiteCatalyst value to want to map to (referrer in your case). On the other side of the mapping, specify that data layer value you made a couple of steps ago