Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

eVar populating with Undefined value

Avatar

Level 6

Hi ,

We have scenario where Datalayer page attributes values is populating as expected on page load , but with the server call eVar is showing as undefined. We followed the standard practice of capturing the value in data element and passing it to eVar. 

 

Note:  This works perfectly fine when we use _satellite.getVar in the console.  What could be the issue here?

 

Thanks,

 

Pradeep

1 Accepted Solution

Avatar

Correct answer by
Level 8

Hi, @pradeep_07 

My first guess would be that it's a timing issue. Have you been able to confirm that the data layer key is populated before the analytics call fires? You might try changing the timing of the page load call/rule to a later option (Page Bottom? Window Loaded?).

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

Hi, @pradeep_07 

My first guess would be that it's a timing issue. Have you been able to confirm that the data layer key is populated before the analytics call fires? You might try changing the timing of the page load call/rule to a later option (Page Bottom? Window Loaded?).

Avatar

Level 6

Hi @pradeep_07,

This seems to be a timing issue. The eVar value is not present when the Launch rule fires but when the page load is complete probably eVar is firing at that time. Due to this _satellite.getVar s giving you the value in the console window. So, I will suggest you to please try changing the load order of your library at Page Bottom or on Windows Loaded.

Hopefully, that will resolve the issue.

Regards,

Abhinav