What's the best approach to map SiteCatalyst vars that reference a Dynamic Variable?

Gold Contributor
Gold Contributor
For example, we want to set/map eVar23="D=User-Agent"; and prop23="D=DNT"; (Do Not Track HTTP Header request variable). Thanks
4 REPLIES 4

What's the best approach to map SiteCatalyst vars that reference a Dynamic Variable?

Employee Emeritus
Hey John, You are right. You can use these exact lines directly in the doPlugins function. Simply paste these lines into the doPlugins function, which should be contained in a JavaScript Code extension scoped to the SiteCatalyst tag: s.eVar23="D=User-Agent"; s.prop23="D=DNT"; Then SiteCatalyst on will take care of assigning these values on the server side. That is all that is needed with this method. The other method would be to create a variable and map that variable to the tag itself. This can be done either by defining a variable in the data layer or creating one using a Set Data Values extension. Hope this helps.

What's the best approach to map SiteCatalyst vars that reference a Dynamic Variable?

Gold Contributor
Gold Contributor

Jared Thanks. I think we missed this step - it's a long story from last fall. Our s_code template seems to have no plugin section currently. From: https://community.tealiumiq.com/t5/Tags/Adobe-Analytics-SiteCatalyst-Tag/ta-p/664 "With every SiteCatalyst client an s_code.js is provided. Granted it will not always be named s_code. The client will need to provide this to us. "

What's the best approach to map SiteCatalyst vars that reference a Dynamic Variable?

Employee Emeritus
Hey John, You're right. You're implementation is a little different... This is what I would do, and what I should have suggested in the first place anyway. We don't want to be working with SC specific code in the doPlugins if we can avoid it. Create two new data sources: "sc_user_agent" and "sc_do_not_track" Create a Set Data Values Extension that is set up like: Set: sc_user_agent To: Text -> D=User-Agent Set: sc_do_not_track To: Text -> D=DNT Then map "sc_user_agent" to eVar23 and sc_do_not_track to prop24. This will se the strings in those variables and SC will take care of the rest on the server side. That should be it!

What's the best approach to map SiteCatalyst vars that reference a Dynamic Variable?

Gold Contributor
Gold Contributor
Thanks - this is working now.
Public