Reply
Highlighted
Frequent Visitor
Posts: 15
Registered: ‎08-03-2017
Accepted Solution

Setting/mapping variables from AppMeasurement "s" object

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
Reply
0 Kudos
VIP
Posts: 195
Registered: ‎01-04-2016

Re: Setting/mapping variables from AppMeasurement "s" object

[ Edited ]

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...

 

Frequent Visitor
Posts: 15
Registered: ‎08-03-2017

Re: Setting/mapping variables from AppMeasurement "s" object

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
Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Setting/mapping variables from AppMeasurement "s" object

Thank you for coming back and letting us know @kbridges!

Great job @mitchellt!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos