Hi Team,
I have created a data element using _satellite.setVar("linkText","clickText") in the custom code of the rule.
Then I am using percent (%) syntax reference this in AEP web SDK update variable type as shown below in eVar50
When I check the value in network call I am seeing it as %linkText%
Can you please guide how we can get the actual value of this data element if I need to update it in the UI.
As per the document https://experienceleague.adobe.com/en/docs/experience-platform/tags/client-side/satellite-object we should be able to reference _satellite.getVar() in percent(%) syntax under UI.
Solved! Go to Solution.
Views
Replies
Total Likes
I've tested your theory but it seems to be working fine at my end.
my set up:
I am getting the value in the omnibug call.
I used adobe analytics extension currently facing some issues with web sdk after the new updates with update variable action type.
@ankitagarwal05 if you're not getting the %link text% value there might be chance the rule is getting fired earlier before value is being set to data element trying delaying the rule action.
Also are you setting the data element using the custom code in the same rule in which you are trying to access it "web sdk link click test" - mentioned in the screenshot?
HI @ankitagarwal05 ,
Update: removed my false assumption to avoid confusion
For your concrete example, if you are talking about a link that was clicked which properties you want to access, have a look at Jim Gordon's Adobe Launch Cheat Sheet
I think this section should answer your question
Cheers
P.S. as a side note, looking at your data.__adobe XDM data.
May I ask why you are not using the "Adobe Analytics ExperienceEvent Full Extension" field group to automatically map all of your analytics data without the need for processing rules in Adobe Analytics? If you are using the old school "eVar50" and "events", you could save some setup time.
Thank you for your response, wondering why Adobe has mentioned in the documentation that we can utilize percent (%) syntax to reference variables for many form fields in your tag implementation, reducing the need to call _satellite.getVar().
With the data object there is no need to use Schema/field group while migrating to AEP Web SDK and these eVars and events are automatically mapped in Data object.
Data object variable mapping to Adobe Analytics - https://experienceleague.adobe.com/en/docs/analytics/implementation/aep-edge/data-var-mapping
So yeah, my suggestion is avoid setVar and rather have a dedicated Data Element for it, potentially with custom code if needed.
have you checked the direct access to link properties like innerText etc. that I've mentioned?
Views
Replies
Total Likes
yeah, that works fine, Thank you!
Whaaat, haven't seen the data.__adobe.analytics mapping at all before! This must be new, thanks for clarifying!!
Views
Replies
Total Likes
I've tested your theory but it seems to be working fine at my end.
my set up:
I am getting the value in the omnibug call.
I used adobe analytics extension currently facing some issues with web sdk after the new updates with update variable action type.
@ankitagarwal05 if you're not getting the %link text% value there might be chance the rule is getting fired earlier before value is being set to data element trying delaying the rule action.
Also are you setting the data element using the custom code in the same rule in which you are trying to access it "web sdk link click test" - mentioned in the screenshot?
Yes, I am setting up the data element using the custom code in the same rule and then using it to update eVar in Web SDK update variable UI.
I did do the console.log of the Data element but it is coming after sendEvent/interact call fired.
Views
Replies
Total Likes
Have you tried delaying the update variable and send event action?
Views
Replies
Total Likes
Yes, it worked after applying the delay. Earlier this was disabled on my property settings.
Is it the best practice to apply delay or rule components in sequence?
I appreciate your help here.
Views
Replies
Total Likes
setVar should be synchronous, so I don't see why the custom code should not finish before calling the update variable.
You could try to wrap your custom code with the setVar in a Promise and see whether this makes a difference.
return new Promise ((resolve,reject) => {
_satellite.setVar("linkText","clickText");
resolve();
});
See also https://www.datanalyst.info/web_analytics/adobe-launch/launch-async-sequential/
But again, I do not think this should be an asynchronous function that is finished executing later than the update variable call.
I believe setVar function itself is synchronous however the custom code action defined in the rule is talking more to set the data element meanwhile the next actions are executing and conflicting with it as rule sequencing was not enabled for the property.
Maybe Adobe should rethink their UI a little. If in @ankitagarwal05 's example without sequencing, the actions are separated with "THEN"
whereas with sequencing enabled, it say "WAIT, THEN", both cases sound very similar and may lead to false assumptions.
Maybe in this case, setVar is actually executed in time then, if "update variable" and "send event" are both asynchrously called, the update of the variable likely just has not taken place.
Key takeaway: "run rules in sequence" is your friend not only in this case. Can lead to timing issues in the bigger picture though.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies