Hello Guys,
I would like to use Tealium's data layer i.e. utag.data in adobe launch to create data elements and rules to be used with AEP Web SDK but when I am creating data elements and firing the server call on page load than those data elements are not able to fetch the values. It says Can not resolved value of undefined. In this case the undefined is utag.data.
Is it possible to use tealium's data layer in launch portal ? Please suggest !
Views
Replies
Total Likes
Hi @AmanGu8
this looks more like a timing issue.
Male sure your utag.data is defined and set before the Launch script is loaded.
From there on it should not be a problem to access the data in your data elements.
Basically
1. define and set utag.data
2. load utag.js (if you still user Tealium iQ in parallel with Launch)
3. load launch.js
(2 and 3 can be in any order)
When you say you want to trigger the call on page load, which launch event do you actually listen to?
Without seeing it, I would also guess that it's a timing issue. If you can see/read the Data Layer using your browser's console, it means it can be read by JS, but if the Data Layer isn't yet ready when your Launch rule fires, then you would get undefined. Try adjusting the timing of your rules...
Actually, I am loading launch.js via Adobe debugger extension. It is definitely a timing issue. Is there any possibility if we can load launch.js using debugger at last ?
Views
Replies
Total Likes
Unfortunately there is not. You may try to delay the execution of your Launch rule by firing it for example on Window load
Views
Replies
Total Likes
I tried that as well but no luck. Seems like launch.js is getting loaded before utag.data. Also, can u help me in knowing when data elements collects data when launch.js is loaded ?
I can custom code in Adobe rule but I am trying to use the AEP Web SDK and in web sdk custom code is possible via data elements only so wanted to know when exactly data elements collects the data.
Views
Replies
Total Likes
Hi @AmanGu8
another thing you can try is adding a Promise to a separate custom code action like seen below. Just for testing, add 5000 or so as timeout and see if this works.
Else I would just ask your developers to put your Launch Library on a dev/stage webpage for better testability. This way you won't have the limitations of injecting a library
As soon as that is figured out, your issue should be solved.
As for debugging, in the line before the resolve() you could try to log the value of one of your data elements in the console
console.log("My Data Element", _satellite.getVar("myDataElement"));
Views
Replies
Total Likes
Views
Like
Replies
Views
Like
Replies