Setting/mapping variables from AppMeasurement "s" object

Gold Contributor
Gold Contributor

Hi Developers.  I am trying to capture the Adobe (SiteCatalyst) AppMeasurement version (s.version) value so that I can map it and pass it in a prop with my Adobe Tracking calls.  To do this, I set up a UDO variable and an extension, and I've run into trouble setting the value at the correct time/tag scope.  If I scope my extension to "All Pages" or "DOM Ready", the "s" object doesn't exist yet, so I get "undefined" as the value.  If I scope it to the "SiteCatalyst AppMeasurement for JavaScript" tag, it executes after the variable/prop is mapped, so it's to late at that point.  Any suggestions on how to execute the extension just before the "SiteCatalyst AppMeasurement for JavaScript" tag maps it's variables? 

Thanks!

Kevin Bridges
2 REPLIES 2

Setting/mapping variables from AppMeasurement "s" object

Tealium Expert
Tealium Expert

Hi @kbridges, I've not done this exact thing, but it seems to me that if you make this processing part of DoPlugins, you'll be able to solve your timing issue.   Search here on this forum for samples.  I believe that the gist of it is to set up your work in a function within an extension, then call that function from the DoPlugins section of the Adobe AppMeasurement library tag.

Good Luck - let us know how it goes...

 

Tealium Expert

Setting/mapping variables from AppMeasurement "s" object

Gold Contributor
Gold Contributor
Just to close the loop on this, we ended up going with a custom JS extension and mapping it to the "SiteCatalyst AppMeasurement for JavaScript" tag, but we also manually set the s.prop and updated s.linkTrackVars within the extension. I guess the tag based variable mapping happens before extensions scoped to the "SiteCatalyst AppMeasurement for JavaScript" tag execute, so the mapping was happening before the variable was valued. I hate having to manually set an s.prop within an extension, but it works. Thanks for your help.
Kevin Bridges
Public