Hi everyone, right now I'm migrating my old implementations with data element XDM object. I'm working on inserting the list var and I'm currently having some implementation and data collection problems.
First step I have a list var that contains 11 items. I set the data element containing the reference array inside the xdm object.
Second step I then loaded the xdm object data element into the rule action by selecting Adobe Experience Platform Web SDK - Send event. I have specific conditions for listvar tracking and I would need to insert a custom javascript code that finalizes the tracking.
Can anyone tell me if there is a way to insert a custom code inside the Adobe Experience Platform Web SDK - Send event or if we need to use some other type of action in addition?
Solved! Go to Solution.
Views
Replies
Total Likes
Hello,
I think the better to do what you want is to use conditions on a rule to update your XDM.
More info in this Jim Gordon's video
https://www.youtube.com/watch?v=PdV8c2lmd-0
Best regards
Hello,
I think the better to do what you want is to use conditions on a rule to update your XDM.
More info in this Jim Gordon's video
https://www.youtube.com/watch?v=PdV8c2lmd-0
Best regards
@cosneg The best way to handle list var in Web SDK is to create a data element that ingest list values from your data layer (let's say array), parse and transform into the format that Web SDK expects.
if (yourList && yourList.length > 0) {
return yourList.map(item => ({ value: item }));
}
Above data element will transform your array such as ["item1", "item2", "item3"] to
[ { "value": "item1" }, { "value": "item2"}, { "value": "item3"} ]
Now just map your above data element to your web sdk list var. Refer the attached screenshot:
Views
Replies
Total Likes
Hi @cosneg - May be you can use the Data option as shown in screenshot and merge the other object (Merged Object Data Element) with XDM object before sending data.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies