In the past, my team and I have used the `_satellite.buildInfo` object for the AppMeasurement library to identify which property and deployment have enabled specific types of data collection.
We want to deploy something similar for our Mobile App, which uses the Adobe Mobile SDK + Adobe Launch Mobile Property.
Is there a way to surface the build data in the Data Element to capture that in an evar or prop?
Thank in Advance
Solved! Go to Solution.
Views
Replies
Total Likes
You may utilize the ACPCore class of the Adobe Launch Mobile SDK to get the current Launch configuration, which includes the build data, and then set it as a data element to capture it in an evar or prop.
Here's an example implementation in Javascript:
// Get the Launch configuration
var launchConfig = ACPCore.getExtensionConfig();
// Create a data element to capture the Launch build info
var launchBuildInfo = {
"class": "com.adobe.mobile.Lifecycle",
"method": "getLaunchBuildInformation"
};
// Set the data element value to the Launch build info
var launchBuildData = launchBuildInfo.method.call(launchBuildInfo.class);
_satellite.setVar("Launch Build Info", launchBuildData);
// Set the Launch build info as an eVar or prop
_satellite.track("Launch Build Info View", {
"eVar1": launchBuildData,
"prop1": launchBuildData
});
To get the Launch build data in this example, we use the com.adobe.mobile.Lifecycle class's getLaunchBuildInformation function. We then save it as a data element with the key "Launch Build Info" and use it in a tracking call as the value of an eVar and a prop.
Please keep in mind that depending on your individual implementation and data requirements, you may need to adjust the data element and tracking call configuration.
Hi @iragbag ,
Are you trying to find out the Build of the App or the Build of the Launch Library?
Your question for _satellite.buildInfo equivalent will be the App Launch version, I'm not sure. However, I noticed in the post-processed calls there's an parameter: "codeVer" could you check and test if publishing a new library will update this field?
Views
Replies
Total Likes
Thanks for the response @franzli - Unfortunately that's not the case. CodVer corresponds to Analytics SDK + Platform + Analytics SDK + Mobile SDK
For example:
Mobile SDK v3.01.02
Analytics SDK v1.01.25
IOS
^ configuration will lead to CodeVer = IOSN010125030102
You can confirm that by reviewing the `Request Overview`
You may utilize the ACPCore class of the Adobe Launch Mobile SDK to get the current Launch configuration, which includes the build data, and then set it as a data element to capture it in an evar or prop.
Here's an example implementation in Javascript:
// Get the Launch configuration
var launchConfig = ACPCore.getExtensionConfig();
// Create a data element to capture the Launch build info
var launchBuildInfo = {
"class": "com.adobe.mobile.Lifecycle",
"method": "getLaunchBuildInformation"
};
// Set the data element value to the Launch build info
var launchBuildData = launchBuildInfo.method.call(launchBuildInfo.class);
_satellite.setVar("Launch Build Info", launchBuildData);
// Set the Launch build info as an eVar or prop
_satellite.track("Launch Build Info View", {
"eVar1": launchBuildData,
"prop1": launchBuildData
});
To get the Launch build data in this example, we use the com.adobe.mobile.Lifecycle class's getLaunchBuildInformation function. We then save it as a data element with the key "Launch Build Info" and use it in a tracking call as the value of an eVar and a prop.
Please keep in mind that depending on your individual implementation and data requirements, you may need to adjust the data element and tracking call configuration.
Views
Likes
Replies