Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Category Affinity is Returning Two Category Affinities

colinr96046230
Level 2
Level 2

Hey All,

We have implemented Category Affinity on our site, and for some reason it is returning two "Category Affinities". We have seen two users sitting next to each other visiting the same pages tally different affinities. It seems to consistently tally one affinity, though it will change across browser sessions. All we are passing is the category, nothing else. Sample results are below:

CategoryAffinity[

  visitedEnvironments=[],

  categoryAffinities={

    0=[

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Australia,

        score=48.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Carribean,

        score=45.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Alaska,

        score=4.0

      ]

      ],

    7664=[

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Carribean,

        score=94.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Mexico,

        score=26.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=,

        score=13.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=Europe,

        score=12.0

      ],

      CategoryAffinity.CategoryAffinityValue[

        categoryId=South America,

        score=10.0

      ]

    ]

  }

]

Any advice you have would be greatly appreciated! Thank you!

--Colin

6 Replies
colinr96046230
Level 2
Level 2

We have used the global mbox (which is handling Category Affinity) across multiple brand sites. HOWEVER, we have verified that the value incrementing different Category Affinities happens on the same brand site.

ryanr701
Employee
Employee

Hi Colin,

This appears like the structure I'd expect when the visitor is hitting more than one Target host group (Target > settings > host groups). You'll have a category affinity array for each host group. Usually this would be a staging site versus a dev or production site. If you've mapped different domains/subdomains to be staging or dev hosts and then visited both versions of the domain with the same browser/session you'd see a couple of arrays showing up in the user.categoryAffinity object like you are showing. Is this your case?

colinr96046230
Level 2
Level 2

Thanks for the reply! This might be it - we have the DTM debugger, so it may be that one of us had our staging library turned on while the other didn't. I'll give that a look.

colinr96046230
Level 2
Level 2

Sadly that did not solve it - with a fresh profile in the Cloud Debugger, I hit a destination page with Stage turned off, which incremented '7664'. I then (with another fresh profile), hit the same page with Stage turned on. This also incremented '7664'. I then turned Stage back off, retrieved yet another fresh profile, and hit the same page, this time incrementing '0'.

I'm not sure what the heck could causing it at this point - I am now only getting '7664' (after the one time of getting '0').

ryanr701
Employee
Employee

Can you share a link? You can DM it to me if you prefer. Maybe I can spot what's going on that way.