I've recently been working on a new implementation of Analytics/Target via the AEP Web SDK, and am in the process of configuring some new activities. In the past, I've used profile scripts as an easy way to handle complex audience parameters that need some sort of calculation or persistence, but I don't see anything in the documentation that addresses how to reference XDM data in the profile script editor. Is this even an option with the Web SDK, and if so how would I reference the XDM data when building a script?
Solved! Go to Solution.
Cross posting an answer from @mosesmaxen in a recent AT Community Q&A Coffee Break:
@wgharper - I love this question! XDM data can be leveraged within a profile script following a similar syntax seen below. It is very similar to referencing a Target mbox parameter within the script. In fact, if you start typing mbox.param into the profile script UI, you should see a drop down list of all mbox params including XDM fields to select from.
mbox.param('productListItems.SKU')
Cross posting an answer from @mosesmaxen in a recent AT Community Q&A Coffee Break:
@wgharper - I love this question! XDM data can be leveraged within a profile script following a similar syntax seen below. It is very similar to referencing a Target mbox parameter within the script. In fact, if you start typing mbox.param into the profile script UI, you should see a drop down list of all mbox params including XDM fields to select from.
mbox.param('productListItems.SKU')
Thanks so much for cross-promoting, posting, and closing out your original question @wgharper !
Views
Replies
Total Likes
Hi @wgharper @mosesmaxen I triggered profile param through a monitoring campaign using below code :
alloy("sendEvent", {
data: {
__adobe: {
target: {
"profile.productViewed": "pageName",
}
}
}
});
however, "productViewed" profile parameter is not visible under Visitor Profile section to create the audience.
I created the profile script also but that is also not working. Any leads on how to access the profile paramters in AEP Web SDK method?
@ambikaTewari_ATCI - It may take some time for the parameter to populate in the UI. I would try checking once more just in case. I would also confirm that there are no errors when the request is being made and try removing the comma after the profile parameter value in case that is causing an issue.
Thank you @mosesmaxen for the reply.
Actually it is more than 48 hours and I'm not able to find productViewed (in our case profile parameter name is vehicleSeen) under Visitor Profile Section.
I removed the comma after the parameter but still no luck.
the parameter is also triggering well in the network tab :
Views
Likes
Replies
Views
Like
Replies