0.0.1 • Published 2 years ago

reco-js v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

reco-js

Frontend library for recommender systems.

Getting Started

CDN

Add a <div> tag with a custom class name (replace [POSTFIX] with custom class extension name) and a REST API that provides item recommendations.

<div class="rjs-slider-[POSTFIX]" data-url="https://reco-api.com"></div>

Add the following before your closing <body> tag add

<script src="tbd"></script>

Furthermore, additional attributes can be added to the div tag.

<div
  ...
  data-title="Top Recommendations"
  data-slidesToShow="3"
  data-varparam='{"item_id_seed": "#code"}'>
</div>

The basic data structure that needs to be provided by the custom REST API has to contain at least the following attributes:

{
    name: "My Fancy Product", 
    price: "12.99", 
    url: "https://my.shop.com/my-fancy-product", 
    image_url: "https://svgsilh.com/svg/1886001.svg"
}

Evidence Collection & Identification Methods

The library provides an evidence collection (user interaction with components). To enable collection set attribute e-url in script tag with target of collection API.

<script src="tbd" e-url="https://reco-api.com"></script>

To identify a user various identification techniques are enabled. An overview can be found here: https://www.scitepress.org/papers/2016/59656/59656.pdf (Bernardo, & Dulce, 2016).

Audio :speaker:

A Study of Feasibility and Diversity of Web Audio Fingerprints. Ref: Chalise, Shekhar, and Phani Vadrevu. "A Study of Feasibility and Diversity of Web Audio Fingerprints." arXiv preprint arXiv:2107.14201 (2021). Link: https://arxiv.org/pdf/2107.14201.pdf Summary. Authors compare different audio methods. Merged Signals - a combination of multiple signals fed into a channel merger - are reported to have the highest entropy. IMPLEMENTATION

Canvas :pencil2:

Pixel Perfect: Fingerprinting Canvas in HTML5 Ref: Mowery, Keaton, and Hovav Shacham. "Pixel perfect: Fingerprinting canvas in HTML5." Proceedings of W2SP (2012): 1-12. Link: https://hovav.net/ucsd/dist/canvas.pdf Summary: IMPLEMENTATION

Cookie :cookie:

IMPLEMENTATION Simply using a cookie reco-js-cookie-id to identify customers. The cookie is valid for 10 years if not removed by user (very likely).

GPU :camera:

DRAWNAPART: A Device Identification Technique based on Remote GPU Fingerprinting Ref: Laor, Tomer, et al. "DRAWNAPART: A Device Identification Technique based on Remote GPU Fingerprinting." arXiv preprint arXiv:2201.09956 (2022). Link: https://arxiv.org/pdf/2201.09956.pdf Summary: IMPLEMENTATION