Expand my Community achievements bar.

access application Javascript Variables in launch script

Avatar

Level 2

Is there a way to access application JS variables in launch script?

In our application, we store the data received in service calls into a Javascript variable, how do i access this variable in my Data elements in AEP data collection?, the documentation i looked at point to creating a data element of type "Javascript variable" but they are not pointing to any implementation as such. also, looking to see if this can be implemented without the data layer.

1 Reply

Avatar

Level 6

Hi @ASP_Corp 

JS variable type data element can only access a window level variable from your application generaly data layer are created for the sole purpose of storing additional user data which organizations wants to send to the analytics tools. You can check your data element on the console using _satellite.getVar("your data element Name") method, if it's returning undefined or null then the value is not available.