Can we get launch library versions and store it in any variables for tracking purpose
Solved! Go to Solution.
Views
Replies
Total Likes
We are using the following in house. This is the code from private extension so turbine can be replaced to _satellite and getObjectProperty is a helper to fetch specific property from an object so you can replace by your custom code to travel to specific property path and check it exists before. Hope this helps. We use this for debugging purposes or figuring out which container to update etc...
try { var output = ''; var aamVersion = (typeof s !== "undefined" && s.AudienceManagement && s.AudienceManagement._il.length > 0 && s.AudienceManagement._il[0].version) ? s.AudienceManagement._il[0].version : ''; var adobeAnalyticsTrackingServer = (typeof s !== "undefined" && document.location.protocol == 'https:') ? s.trackingServerSecure : s.trackingServer; var environment = { "production": "prod", "development": "dev", "staging": "stag" } var attributes = { gdlV: getValue(event, CONSTANTS.DL_VERSION), env: environment[turbine.environment.stage], prop: _satellite.property.name, build: turbine.buildInfo.buildDate, turbV: turbine.buildInfo.turbineVersion, aa: getObjectProperty(window, 's.version'), at: getObjectProperty(window, 'mboxVersion') || getObjectProperty(window, 'adobe.target.VERSION'), vis: getObjectProperty(window, 'Visitor.version'), aam: aamVersion, aaTs: adobeAnalyticsTrackingServer } for (var key in attributes) { output += attributes[key] ? key + '=' + attributes[key] + '|' : ''; } return output; } catch (e) { turbine.logger.error('Failed to load tagVersioning -- ', e); }
Views
Replies
Total Likes
@Pranithakat I am sure , you can definitely do that.
_satellite object is the reference to Adobe Launch library and the various functions you can perform with it.
_satellite.buildInfo
_satellite.environment
you can get these values and capture them into varibales in reporting.
You can read more about _satellite functions here
Hope this helps
Views
Replies
Total Likes
Yeah I did try those options where we are only able to get build date & turbine details but not the current library version number. can we consider turbine version in that case ?
Views
Replies
Total Likes
Turbine version isn't equivalent to Launch library version. I believe you are looking forward to values like JS-2.22.0-LBWB, correct?
Views
Replies
Total Likes
_satellite.buildInfo.turbineVersion will give the turbine version. Let us know your requirement and we can help.
Views
Replies
Total Likes
Yes, I am looking for launch library version number similar to JS-2.22.0-LBWB as I didn't find any option which would return that value.
Views
Replies
Total Likes
A custom JS data element can be built to pull in values from _satellite.buildInfo and/or _satellite.property. You won't be able to get the library name, but _satellite.buildInfo.buildDate at least updates with each new build. And, since it's custom, you can include any other details you might want (environment, AppMesurement version, ECID version, etc).
Views
Replies
Total Likes
While the replies are correct, please… don't use code when it's not needed. The Core extension exposes most of these values for you as data elements, so you can get them there very easily.
Views
Replies
Total Likes
We are using the following in house. This is the code from private extension so turbine can be replaced to _satellite and getObjectProperty is a helper to fetch specific property from an object so you can replace by your custom code to travel to specific property path and check it exists before. Hope this helps. We use this for debugging purposes or figuring out which container to update etc...
try { var output = ''; var aamVersion = (typeof s !== "undefined" && s.AudienceManagement && s.AudienceManagement._il.length > 0 && s.AudienceManagement._il[0].version) ? s.AudienceManagement._il[0].version : ''; var adobeAnalyticsTrackingServer = (typeof s !== "undefined" && document.location.protocol == 'https:') ? s.trackingServerSecure : s.trackingServer; var environment = { "production": "prod", "development": "dev", "staging": "stag" } var attributes = { gdlV: getValue(event, CONSTANTS.DL_VERSION), env: environment[turbine.environment.stage], prop: _satellite.property.name, build: turbine.buildInfo.buildDate, turbV: turbine.buildInfo.turbineVersion, aa: getObjectProperty(window, 's.version'), at: getObjectProperty(window, 'mboxVersion') || getObjectProperty(window, 'adobe.target.VERSION'), vis: getObjectProperty(window, 'Visitor.version'), aam: aamVersion, aaTs: adobeAnalyticsTrackingServer } for (var key in attributes) { output += attributes[key] ? key + '=' + attributes[key] + '|' : ''; } return output; } catch (e) { turbine.logger.error('Failed to load tagVersioning -- ', e); }
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies