Using _satellite.getVar() value in variable editor of AEP Web SDK Update variable Type | Community
Skip to main content
Level 3
May 27, 2024
Solved

Using _satellite.getVar() value in variable editor of AEP Web SDK Update variable Type

  • May 27, 2024
  • 1 reply
  • 3570 views

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.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankit_Chaudhary

Hi @bjoern__koth 

 

I've tested your theory but it seems to be working fine at my end.

my set up:

  • a rule to set a data element at page top event using setVar method in custom code.

     

  • another rule at dom ready using set variable UI to fetch the value of data element set in the previous call using setVar.

     

     

  • 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?

1 reply

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 27, 2024

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.

 

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/field-groups/event/analytics-full-extension

Cheers from Switzerland!
Level 3
May 27, 2024

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 

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 27, 2024

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?

Cheers from Switzerland!