Data Element Works only with return Statement

Avatar

Avatar

Gianluca

Avatar

Gianluca

Gianluca

11-02-2021

Hi all,

in Adobe Launch I have defined a data element that should be set with a javascript variable on source page of the website.

When I call on browser console _satellite.getVar('MY VAR') it returns null, even if the javascript variable is defined and populated.

After several tests it seems that I can retrieve my data element value only defining it as a custom code type with a return statement like this:

 

if(MY JAVASCRIPT VARIABLE)

 return MY JAVASCRIPT VARIABLE;

else

return ""

May someone help me understand why?

 

Thank you 

View Entire Topic

Avatar

Avatar

Andrey_Osadchuk

MVP

Avatar

Andrey_Osadchuk

MVP

Andrey_Osadchuk
MVP

14-02-2021

Yes, this is how it's designed. What was your expectation?