Hi everyone!
Haven't used Launch... or Tags... or Platform Data Collection in a while, and just wondered when you set up an Adobe Analytics rule, should you add a condition to make sure the 's' variable is available?
I'm using the Adobe Analytics extension, and in the past didn't perform this check as I thought it was something baked into using the Adobe Analytics extension.
Many thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
The answer is ... it depends. Inside of Adobe launch, if you are creating rules or custom conditions - The s variable will be scoped in and available to use. So no need to declare it, Adobe Launch + the Analytics extension takes care of that for you.
If you want to use the "s" variable elsewhere, there is an option in the Launch extension to enable the s variable to be globally accessible. This comes in handle when you have a generic helper method (such as a plugin) that assumes the s variable (is global) instead of allowing the s variable to be passed as a variable(preferred)
Views
Replies
Total Likes
first check Jquery plugin is running before the adobe launch & cross-validate that the launch script is inserted in the head tag section
Update the setting in the adobe analytics plugin and as well publish the configurations.
After you can use
s.charSet = "UTF-8";
s.trackDownloadLinks = true;
s.trackExternalLinks = true;
s.trackInlineStats = true;
s.---- values in all the trackings.
Refer:
Views
Replies
Total Likes
The answer is ... it depends. Inside of Adobe launch, if you are creating rules or custom conditions - The s variable will be scoped in and available to use. So no need to declare it, Adobe Launch + the Analytics extension takes care of that for you.
If you want to use the "s" variable elsewhere, there is an option in the Launch extension to enable the s variable to be globally accessible. This comes in handle when you have a generic helper method (such as a plugin) that assumes the s variable (is global) instead of allowing the s variable to be passed as a variable(preferred)
Views
Replies
Total Likes
Thanks Tim!
We have window.s set as a global variable in the Adobe Analytics extension.
So basically, when Launch initialises the Adobe Analytics extension, it sets window.s up, and then any subsequent rules won't need to worry about checking for it?
Views
Replies
Total Likes
Correct - When set, I believe you can safely assume the variable exists. So it could be referenced anytime (after initialization) without the dreaded
Uncaught TypeError: Cannot read properties of undefined
Views
Replies
Total Likes
Brill. Thanks Tim. Much appreciated.
Views
Replies
Total Likes