MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / appendClickTo

Function appendClickTo

client/js-client/src/rlClient.js:259–280  ·  view source on GitHub ↗
(items, options)

Source from the content-addressed store, hash-verified

257 }
258
259 function appendClickTo(items, options) {
260 var delim = params.rlabs_delim,
261 rectag = options[params.rectag_name],
262 use_pos = options[params.use_pos_name],
263 pos = 0;
264 underscore.each(items, function (item) {
265 var id = item.id,
266 uuid = item.attributesName.recommendationUuid;
267 if (uuid) {
268 id += id.match(new RegExp("\\" + params.query_delimiter)) ? "&" : delim;
269 id += params.track_par + "=" + uuid;
270 if (rectag) {
271 id += "%20rt$" + rectag;
272 }
273 if (use_pos) {
274 pos += 1;
275 id += "%20p$" + pos;
276 }
277 }
278 item.id = id;
279 });
280 }
281
282 function recommendationsStatic(callback, options, dimension) {
283 var o = options || {},

Callers 3

recommendationsStaticFunction · 0.85
recommendationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected