apisearch-interactions
Version:
Interactions logger for apisearch Machine Learning.
1 lines • 1.09 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports._asi=t():e._asi=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";e.exports=function(){return{push:function(e){var t=document.body.lastChild,n=document.createElement("img"),o={user:{id:e[2]},item_uuid:{id:e[3],type:e[4]},weight:e[5]};n.src="http://localhost:8999/v1/interact?app_id="+e[0]+"&token="+e[1]+"&interaction="+JSON.stringify(o),n.height=1,n.width=1,n.style.display="none",t.parentNode.insertBefore(n,t)}}}()}])});