Get user- & shop-bias

This feature needs to be enabled by Hello Retail, contact support.

It is possible to get the user- & shop-bias using the following JavaScript SDK method: get_bias. The user-bias contains the preferred brand & hierarchies (categories) for the specific user, where as the shop bias are the most popular brands & hierarchies (categories) through out the webshop. This method can be used to create a personalized categories on the frontpage which updates based upon the users preferences.

Get Bias
Response
Get Bias

The get_bias method should be wrapped in the event binder to ensure the method is available when called. You can read more about event binding here.

_awev=(window._awev|{{]);_awev.push(["bind", "crawl_completed", function(){
ADDWISH_PARTNER_NS.api.tracking.get_bias(function(result){
console.log(result); // The result contains the shop & user bias
});
}]);
Response

The response has two object types, shop and user. The shop bias contains the favorite brands and hierarchies (categories) throughout the webshop. The user contains the user-specific preferences. If implementing a personalized category box for a user, then use the shop-based bias as a fallback, if the user object is null (if we don't recognize the user).

{
"shop": {
"hierarchyLevel3": [
{
"value": "video$hdmi$hdmi$",
"weight": 18
},
{
"value": "computer$usb$usb$",
"weight": 12
},
{
"value": "portable apparaten$mobiele telefoon/tablet$laden$",
"weight": 11
},
{
"value": "portable apparaten$mobiele telefoon/tablet$audio/video$",
"weight": 10
},
{
"value": "computer$usb$usb-c$",
"weight": 10
},
{
"value": "portable apparaten$mobiele telefoon/tablet$data$",
"weight": 10
},
{
"value": "apple® compatibel$macbook pro® retina$usb$",
"weight": 8
},
{
"value": "apple® compatibel$macbook® retina$usb$",
"weight": 8
},
{
"value": "beugels$tv \\u0026 monitor$muurbeugel$",
"weight": 7
},
{
"value": "apple® compatibel$macbook pro®$usb$",
"weight": 7
}
],
"hierarchyLevel1": [
{
"value": "computer$",
"weight": 25
},
{
"value": "portable apparaten$",
"weight": 14
},
{
"value": "video$",
"weight": 14
},
{
"value": "stroom$",
"weight": 10
},
{
"value": "audio$",
"weight": 9
},
{
"value": "apple® compatibel$",
"weight": 8
},
{
"value": "beugels$",
"weight": 7
},
{
"value": "gaming$",
"weight": 6
},
{
"value": "hdmi$",
"weight": 4
},
{
"value": "usb-c$",
"weight": 3
}
],
"brand": [
{
"value": "Dolphix",
"weight": 22
},
{
"value": "Coretek",
"weight": 16
},
{
"value": "Nedis",
"weight": 11
},
{
"value": "Transmedia",
"weight": 9
},
{
"value": "My Wall",
"weight": 8
},
{
"value": "DeLOCK",
"weight": 8
},
{
"value": "OTB",
"weight": 7
},
{
"value": "Goobay",
"weight": 7
},
{
"value": "S-Impuls",
"weight": 6
},
{
"value": "VHBW",
"weight": 5
}
],
"hierarchyLevel2": [
{
"value": "portable apparaten$mobiele telefoon/tablet$",
"weight": 19
},
{
"value": "computer$usb$",
"weight": 19
},
{
"value": "video$hdmi$",
"weight": 12
},
{
"value": "beugels$tv \\u0026 monitor$",
"weight": 9
},
{
"value": "apple® compatibel$macbook pro® retina$",
"weight": 8
},
{
"value": "apple® compatibel$macbook pro®$",
"weight": 8
},
{
"value": "apple® compatibel$macbook air®$",
"weight": 7
},
{
"value": "apple® compatibel$macbook® retina$",
"weight": 7
},
{
"value": "stroom$laders en voedingen$",
"weight": 6
},
{
"value": "computer$netwerk$",
"weight": 6
}
]
},
"user": {
"hierarchy": [
{
"value": "audio$digitaal audio/spdif$coaxiaal audio rca$",
"weight": 33
},
{
"value": "audio$digitaal audio/spdif$toslink$",
"weight": 33
},
{
"value": "audio$tulp$",
"weight": 33
}
],
"brand": [
{
"value": "Coretek",
"weight": 100
},
{
"value": "Nike",
"weight": 70
}
]
}
}