Dear All,
Having two questions from Launch and I hope you can help out.
1. How to use Plugins in Launch?
Actually Adobe is managing the library for us. We have used Data Elements to retrieve Props and eVars.
Once of my eVar uses s.getvalonce plugin to extract the value earlier.
How can I replicate the same in Launch?
I know that i need to include Plugins in Custom Code. Does this mean that i cannot set Data Element which will set the value using s.getvalonce?
2. How to retrieve Adobe Analytics Version?
I wanna retrieve Adobe Analytics Version and capture it in Prop. Since Adobe is managing the library for us, how can i retrieve the value automatically and place it in a Prop.
Kindly help.
Thank You
Arun
Solved! Go to Solution.
Views
Replies
Total Likes
Arun,
Presently, plugIn functions can easily be added in the Custom Code section of the Adobe Analytics extension.
This also includes the setup of s.usePlugins and the s.doPlugins function assignment.
Just as in DTM, the AppMeasurement "s" object is kept in an enclosure and by default is not exposed at window scope.
Unlike in DTM, `_satellite.getToolsByType('sc')[0].getS().version` will not work. To be honest, the use of this was never ordained by Adobe and they've been warning us for a couple years not to rely on it working in Launch.
So.... Here's my suggestion to you. In the same AA custom code where plugins and doPlugins is set up, add this line of code:
`localStorage.setItem("AppMeasurementVersion", s.version);`
Since "s" _is_ in scope here, and since this code is run at the time the AA library is being initialized (super early), it will give you good results.
Then create a data element using localStorage as a source. I named mine, `AppMeasurementVersion`.
And finally, here's the proof:
You can now use this data element anywhere that you want to record the AppMeasurement version.
P.S. If all you wanted to do is set this version on an eVar on every beacon, you _could_ just do it in your s.doPlugins function as such:
`s.eVar20=s.version`
Arun,
Presently, plugIn functions can easily be added in the Custom Code section of the Adobe Analytics extension.
This also includes the setup of s.usePlugins and the s.doPlugins function assignment.
Just as in DTM, the AppMeasurement "s" object is kept in an enclosure and by default is not exposed at window scope.
Unlike in DTM, `_satellite.getToolsByType('sc')[0].getS().version` will not work. To be honest, the use of this was never ordained by Adobe and they've been warning us for a couple years not to rely on it working in Launch.
So.... Here's my suggestion to you. In the same AA custom code where plugins and doPlugins is set up, add this line of code:
`localStorage.setItem("AppMeasurementVersion", s.version);`
Since "s" _is_ in scope here, and since this code is run at the time the AA library is being initialized (super early), it will give you good results.
Then create a data element using localStorage as a source. I named mine, `AppMeasurementVersion`.
And finally, here's the proof:
You can now use this data element anywhere that you want to record the AppMeasurement version.
P.S. If all you wanted to do is set this version on an eVar on every beacon, you _could_ just do it in your s.doPlugins function as such:
`s.eVar20=s.version`
Dear Stewart,
Thank you so much for a crystal clear reply.
Will try to implement the same and get back to you if there are gaps.
Thank You
Arun
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies