Expand my Community achievements bar.

SOLVED

Show recommendation based on Category affinity

Avatar

Level 2

Hi, I am new to Target.  I am trying to show recommendation based on category affinity. I have used user based recommendation algorithm with the filter key as user.categoryAffinities inside the criteria. But the recommendation is not populating. I tried to find the document on category affinity but in every document it tells about experience targeting and not the recommendation activity. 

Could any one can help me to cater the recommendation on the above mentioned scenario. 

 

Thanks in advance. 

Deepak Kumar

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello Deepak,

 

The Recommendations Algorithms that will work with Category affinities (assuming they are populated correctly) are:

  • Popularity-Based - Most Viewed by Category - Favorite Category
  • Popularity-Based - Top Sellers by Category - Favorite Category

Or you can also decide to choose between different other Recommendations Algorithms and use the Inclusion Rules section to  dynamically filter with the category affinity array.

 

To do so, you need to:

  • Go on the Inclusion Rules section
  • Select Add Filtering Rule
  • Choose Profile Attribute Matching
  • In Choose an entity attribute, select any catalog attribute you want to dynamically match (if you have setup your catalog with proper Adobe's guidelines, you'll select category)
  • Next, select the proper Evaluator
  • Finally, on Choose a profile attribute, you'll select user.categoryAffinities

The recommendation engine is ultra powerful when you start playing with the inclusion rules, so my suggestion is that you do thorough testing and I'm sure you'll find the right combinaison to achieve your actual and future goals.

View solution in original post

10 Replies

Avatar

Level 3

I agree this is an underdocumented part of Target. Can someone from Adobe please guide on how to populate user.categoryAffinities ?

Avatar

Employee Advisor

Hey @Deepak_Kumar1 @KeithDavo 

To leverage category affinity, you'll need to pass user.categoryId paramter on each category page.

For example, if you load mens category page, user.categoryId param will hold men value.

Now, when target finds this param on page it scores each category basis no. Of times user visits different categories.

Basis score target will create category affinity array of top 5 categories. You can access that array using user.categoryaffinities

 

Similarly you can use it in recs as well

Hope this helps.

Please feel free to respond with queries of you have any.

Following document might help you understand CA in more better way

 

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/category-affinity.ht...

 

Thanks

 

 

Avatar

Level 2

Thanks Gaureshk for your reply.

I am already passing the user.categoryId paramter on each category page. Also I can see the category affinities values in delivery network call (screen shot attached).  But I am not sure how can show the recommendation based on this. I don't see appropriate algorithm under criteria to set the recommendation of categories present inside the category affinities array. 

 

 

FYI. - Also the link you have shared is tells about the audience and that will be used in the experience target (XT) activities only. I have created XT based on the category affinities audience and it worked.  

 

Avatar

Correct answer by
Employee

Hello Deepak,

 

The Recommendations Algorithms that will work with Category affinities (assuming they are populated correctly) are:

  • Popularity-Based - Most Viewed by Category - Favorite Category
  • Popularity-Based - Top Sellers by Category - Favorite Category

Or you can also decide to choose between different other Recommendations Algorithms and use the Inclusion Rules section to  dynamically filter with the category affinity array.

 

To do so, you need to:

  • Go on the Inclusion Rules section
  • Select Add Filtering Rule
  • Choose Profile Attribute Matching
  • In Choose an entity attribute, select any catalog attribute you want to dynamically match (if you have setup your catalog with proper Adobe's guidelines, you'll select category)
  • Next, select the proper Evaluator
  • Finally, on Choose a profile attribute, you'll select user.categoryAffinities

The recommendation engine is ultra powerful when you start playing with the inclusion rules, so my suggestion is that you do thorough testing and I'm sure you'll find the right combinaison to achieve your actual and future goals.

Avatar

Level 2

Thanks Eric for helping me out. But still I am not getting the correct result. I see sync issue when I set the inclusion rule as Category is contained in the list the value/text stored in user.categoryAffinities.

Deepak_Kumar1_0-1675302334123.png

 

It will be great if you could help me with the appropriate evaluator. I have tried many different evaluator (list contains an item in, contain substring) but no luck so far. 

Thanks 

 

Avatar

Employee

Hello

When you say "sync issues", what are you referring to?  Where do you see that sync is not working?

Could you share the Target call you created to populate that category array and an example of that array populated?

Thanks

Do you think its okay? Most viewed based on user favourite category?

Michael_Soprano_0-1725296381862.png

 

Avatar

Level 1

Hi Deepak_Kumar,

 

I am facing the same issue as above. were you able to find the resolution to this. I can also see user.categoryAffinities in network call and XT experiences are working fine for me. However I am not able to see the same result in the Recommendation Activity

Hello,

For troubleshooting purposes, 3 things to try

 

1. Using the contains substring instead of contained in the list

 

2. Using either one of the following (not using inclusion rules)

  • Popularity-Based - Most Viewed by Category - Favorite Category
  • Popularity-Based - Top Sellers by Category - Favorite Category

And see if it works

 

3. Then you can try creating a profile script that returns only the first element in the Cat Aff array and use this in another type of criteria with a profile matching attribute with evaluator being "contains substring" or "equals"