


Jon_Tehero
Employee
Jon_Tehero
Employee
22-07-2020
@Amelia_Waliany wrote:HI @Jon_Tehero, great insights here! This question was posted by Target Community member @MA1985_CG :
Hi, My requirement is to show each experience only for 3 times. Once user seen 1st experience as per the order show 2nd experience and so on.
I understand that we can use below script for frequency but this would work based on mbox name but looking option at the experience level Any thoughts?
mbox_location1 - experiencename_1
mbox_location1 - experiencename_2
var frequency = user.get('frequency') || 0; if (mbox.name == 'mbox_location1') { return frequency + 1; }
we are recording experience name value in Adobe Analytics but as per my understanding we can't use data layer value in profile script.
After a user has qualified for an experience, Target automatically updates the user's profile to indicate the experience they've been shown. On the subsequent request, you can evaluate whether or not that visitor has a particular value in their profile. This is done by using the "dynamic tokens" capability.
Note: "campaign" represents "activity" and "recipe" is the same as "experience." So you could use
${campaign.recipe.id}
to set a counter on that specific experience id in the activity. You can also use the same syntax during activity setup to insert these values into your offer to quickly see the offerId or similar information.
Rami_Hammad
Employee
Rami_Hammad
Employee
22-07-2020
@jtehero, this question was posted in the community by @Saif:
I am trying to set up a recommendations activity where I need to target the users who have visited pages belonging to certain sub-categories.
I have applied this inclusion rule but it doesn't work:
"user.lastViewedTenSubCategories" is a profile attribute which contains sub categories separated by comma.
Is it expecting the list in a specific format?
Jon_Tehero
Employee
Jon_Tehero
Employee
22-07-2020
@Rami_Hammad wrote:@jtehero, this question was posted in the community by @Saif:
I am trying to set up a recommendations activity where I need to target the users who have visited pages belonging to certain sub-categories.
I have applied this inclusion rule but it doesn't work:
"user.lastViewedTenSubCategories" is a profile attribute which contains sub categories separated by comma.
Is it expecting the list in a specific format?
@Saif, the data types do need to match between the user.attribute and the entity.attribute. Check out this article for some details and nuances on data types and how they are considered in custom entity.attributes. Other than that, on the surface everything seems like your setup should work. If your data types do in fact match and you are still not getting results, please submit a client care ticket so we can take a closer look. Thank you so much for your question!
FGHPhilJ
FGHPhilJ
23-07-2020
Thanks Amelia, I missed the timings of this, thanks for posting on my behalf.
Saif
Saif
23-07-2020
Thank you for the quick response.
I modified the profile attribute as shown in the article.
Now,
user.lastViewedTenSubCategories = ["abc","xyz"]
As per the inclusion rule, it should display all the items that belong to sub-category "abc" or "xyz" but it only displays items that belong to sub-category "abc" which is the sub category of the item I am using as my recommendation key.
Looking at the trace output, I can see the following inside "inclusionrules":
{ "attribute" : "subCategory1", "operation" : "isContainedInList", "sourceAttribute" : { "name" : "user.lastViewedTenSubCategories", "type" : "PROFILE", "excludeAllWhenEmpty" : true }, "values" : [ ] }
In the above output, it shows an empty array in "values".
What am I doing wrong?