Hello!
I'm looking for some guidance on creating audiences using the user.endpoint.lastViewedEntity attribute in Adobe Target.
I want to create two separate audience segments:
Visitors with Data:
Visitors without Data:
My Question: How can I create these two audience segments based on the user.endpoint.lastViewedEntity attribute?
Any help would be greatly appreciated!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Did a bit more digging - you can actually access user.endpoint.lastViewedEntity (including all historical last viewed entities) via profile script. So a simple example would be:
var lastViewedEntity= user.get('endpoint.lastViewedEntity')+"";
if(lastViewedEntity != 'null'){
return lastViewedEntity;
}
Views
Replies
Total Likes
That user.endpoint.lastViewedEntity parameter isn't available "out of the box" in the audience creation workflow. However, you can access it quite easily via a Profile Script.
If it's only the single most recent entity, your profile script could just be something like
var lastViewed = mbox.param("entity.id");
if (lastViewed) {
return lastViewed
}
And then if your profile script is named "returnLastViewed", for example, your Audience definition would then be
If you want to look beyond just the very last entity viewed, you could develop the profile script further e.g., each time the entity.id param exists, append the ID to a comma-separated string.
Views
Replies
Total Likes
I don't need only the last entity or the entities captured from now into the future; I need all historical last viewed entities as they are in user.endpoint.lastViewedEntity.
Based on your reply, I'm assuming it's not possible?
Thank you!
Views
Replies
Total Likes
Did a bit more digging - you can actually access user.endpoint.lastViewedEntity (including all historical last viewed entities) via profile script. So a simple example would be:
var lastViewedEntity= user.get('endpoint.lastViewedEntity')+"";
if(lastViewedEntity != 'null'){
return lastViewedEntity;
}
Views
Replies
Total Likes
Amazing. I'll test it out.
Thank you
Views
Replies
Total Likes