Testing and Debugging are significant activities and it is required to capture the information in Analytics variable that in case it is required at sme point of time.
Following are the value one should capture in AA variable:
To capture the URL you can use the following line of JS code
location.protocol + ‘//’ + location.host + location.pathname;
AppMeasurement code version:
If the TMS is Adobe Launch or DTM you can use the below line of code.
If visitorID.js is implemented by other method then use the following JS to capture the value of mid into Adobe Analytics Variable:
var VI= s_c_il.version;
For all concatenated detail:
To segregate you can use following code :
Check legal/country/company policy before capturing this into AA variable.
There are 2 options to do this.
- Put the value of IP in Data Layer and then populate that into AA variable
- Use processing rule and populate the value into AA variable
Hope this helps to pick the testing and debugging parameter.
To test on how this works do to Adobe Launch TMS and add Adobe Analytics Extension. Under custom code add the following line of code, build the version and see the result under browser console:
// Extract Adobe Analytics core attributes for user session
var visitorAPI = s_c_il.version;
var visitorId = _satellite.getVisitorId().getMarketingCloudVisitorID();
var s_Code = s.version;
console.log(“visitorId: ” + visitorId);
console.log(“visitorAPI: ” + visitorAPI);
console.log(“s_Code: ” + s_Code);