We were thinking about moving to "Manage the Library for me" with Launch. Will the global s object be accessible outside of Launch without customizing the code (hece not being able to go with the "Manage the Library for me")?
EDIT: Moved to the questions since this isn't really a bug - JB
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
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.
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.
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 -
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).