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
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.
1
_awev=(window._awev||[]);_awev.push(["bind", "crawl_completed", function(){
2
ADDWISH_PARTNER_NS.api.tracking.get_bias(function(result){
3
console.log(result); // The result contains the shop & user bias
4
});
5
}]);
Copied!
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).
1
{
2
"shop": {
3
"hierarchyLevel3": [
4
{
5
"value": "video$hdmi$hdmiquot;,
6
"weight": 18
7
},
8
{
9
"value": "computer$usb$usbquot;,
10
"weight": 12
11
},
12
{
13
"value": "portable apparaten$mobiele telefoon/tablet$ladenquot;,
14
"weight": 11
15
},
16
{
17
"value": "portable apparaten$mobiele telefoon/tablet$audio/videoquot;,
18
"weight": 10
19
},
20
{
21
"value": "computer$usb$usb-cquot;,
22
"weight": 10
23
},
24
{
25
"value": "portable apparaten$mobiele telefoon/tablet$dataquot;,
26
"weight": 10
27
},
28
{
29
"value": "apple® compatibel$macbook pro® retina$usbquot;,
30
"weight": 8
31
},
32
{
33
"value": "apple® compatibel$macbook® retina$usbquot;,
34
"weight": 8
35
},
36
{
37
"value": "beugels$tv \\u0026 monitor$muurbeugelquot;,
38
"weight": 7
39
},
40
{
41
"value": "apple® compatibel$macbook pro®$usbquot;,
42
"weight": 7
43
}
44
],
45
"hierarchyLevel1": [
46
{
47
"value": "computerquot;,
48
"weight": 25
49
},
50
{
51
"value": "portable apparatenquot;,
52
"weight": 14
53
},
54
{
55
"value": "videoquot;,
56
"weight": 14
57
},
58
{
59
"value": "stroomquot;,
60
"weight": 10
61
},
62
{
63
"value": "audioquot;,
64
"weight": 9
65
},
66
{
67
"value": "apple® compatibelquot;,
68
"weight": 8
69
},
70
{
71
"value": "beugelsquot;,
72
"weight": 7
73
},
74
{
75
"value": "gamingquot;,
76
"weight": 6
77
},
78
{
79
"value": "hdmiquot;,
80
"weight": 4
81
},
82
{
83
"value": "usb-cquot;,
84
"weight": 3
85
}
86
],
87
"brand": [
88
{
89
"value": "Dolphix",
90
"weight": 22
91
},
92
{
93
"value": "Coretek",
94
"weight": 16
95
},
96
{
97
"value": "Nedis",
98
"weight": 11
99
},
100
{
101
"value": "Transmedia",
102
"weight": 9
103
},
104
{
105
"value": "My Wall",
106
"weight": 8
107
},
108
{
109
"value": "DeLOCK",
110
"weight": 8
111
},
112
{
113
"value": "OTB",
114
"weight": 7
115
},
116
{
117
"value": "Goobay",
118
"weight": 7
119
},
120
{
121
"value": "S-Impuls",
122
"weight": 6
123
},
124
{
125
"value": "VHBW",
126
"weight": 5
127
}
128
],
129
"hierarchyLevel2": [
130
{
131
"value": "portable apparaten$mobiele telefoon/tabletquot;,
132
"weight": 19
133
},
134
{
135
"value": "computer$usbquot;,
136
"weight": 19
137
},
138
{
139
"value": "video$hdmiquot;,
140
"weight": 12
141
},
142
{
143
"value": "beugels$tv \\u0026 monitorquot;,
144
"weight": 9
145
},
146
{
147
"value": "apple® compatibel$macbook pro® retinaquot;,
148
"weight": 8
149
},
150
{
151
"value": "apple® compatibel$macbook pro®quot;,
152
"weight": 8
153
},
154
{
155
"value": "apple® compatibel$macbook air®quot;,
156
"weight": 7
157
},
158
{
159
"value": "apple® compatibel$macbook® retinaquot;,
160
"weight": 7
161
},
162
{
163
"value": "stroom$laders en voedingenquot;,
164
"weight": 6
165
},
166
{
167
"value": "computer$netwerkquot;,
168
"weight": 6
169
}
170
]
171
},
172
"user": {
173
"hierarchy": [
174
{
175
"value": "audio$digitaal audio/spdif$coaxiaal audio rcaquot;,
176
"weight": 33
177
},
178
{
179
"value": "audio$digitaal audio/spdif$toslinkquot;,
180
"weight": 33
181
},
182
{
183
"value": "audio$tulpquot;,
184
"weight": 33
185
}
186
],
187
"brand": [
188
{
189
"value": "Coretek",
190
"weight": 100
191
},
192
{
193
"value": "Nike",
194
"weight": 70
195
}
196
]
197
}
198
}
Copied!
Last modified 9mo ago
Copy link