The s object exposed by the Analytics extension is not a global object. You can reference it as 's' from within custom code in Launch, but once it's packaged up and delivered to the page you won't be able to find it (in the browser console for example).
Hi thebenrobb -
I think I didn't explain myself very well...let me try again
In order for our survey provider to set s.contextData variables and fire off an s.tl() call when a survey event occurs, I was told to read this article and follow its guidance: How to get a global “s” object in DTM | Digital Data Tactics
One of my short-term goals it to utilize the "manage the library for me" feature of the Adobe Analytics extension (vs "let me provide custom library code") so the site can easily stay on the most recent version. In order to achieve my goal, there would need to be a way that either the Launch extension can handle this situation or maybe something could be added to the Adobe Analytics extension configuration area that would allow me to enter this type of information and not have to touch the code (which requires me to use the "let me provide custom library code").
Thanks so much -
Sorry, I think I'm going to have to leave this one for Aaronius9er9er9er to handle. Actually, on second thought, it's the Analytics team (the extension devs) that need to answer that one. I'll see what I can find out.
1 person found this helpful
Hey SarahEOwen, I heard back sooner than expected. There is a feature request logged to have an option in the extension configuration to globalize the ' s' object.
Until that happens, there are two options to try.
1) At the bottom of the extension configuration view for the Analytics extension, there is a custom code box. If you put
window.s = s;
in that custom code box, that will give you an s object on the page that you should be able to use in the way you'd like it.
2) You could also try getting the 's' object from
which is an array (I think) where the Analytic instances are stored.