AppMeasurement Version dynamically assigning into prop



For AppMeasurement managing the library I think it's a good idea to send the version within a prop to know when the versions change in the event there's some reporting anomalies. 


I discovered setting a data element to the value of the s.version only works if the beacon is sent after DOM ready.


However, if setting the prop manually within custom code, in the AA ext(enable after settings..) or page top rule this appears to work as expected.




I'm unsure if this is due to a race condition or if this is the nature of how Launch checks data element when using the javascript variable.

This also works nicely for getting the RSID dynamically too by using s.account.


Accepted Solutions (1)

Accepted Solutions (1)



This isn't related to race conditions but rather scope.


The s variable is limited by scope and only available in the "Custom Code"


You can always expose the "s" variable by creating your own variable. One way to do this is by the Adobe Extension:




Then you can reference aLaunch_s.version outside of the Custom Code.

Answers (0)