0.1.0 • Published 6 years ago
apisearch-interactions v0.1.0
Apisearch Interactions (asi)
This library is part of the Apisearch project.
The _asi
(Apisearch interactions) is a javascript library to track any
user interaction that you consider as important action to train the
Apisearch brain. This will be useful to give a more useful and interesting results
on your customer's searches.
Installation
npm && yarn
npm i apisearch-interactions --save
// or
yarn add apisearch-interactions
html \<script> You can either download the library and use a relative path to your assets folder, or use a CDN like jsDelivr.
<script src="https://cdn.jsdelivr.net/npm/apisearch-ui/dist/apisearch-ui.min.js"></script>
Usage
You can capture any DOM event and trigger the interaction.
<button onClick="_asi.push(['app_id', 'token', 'user_id', 'item_id', 'item_type', 10 ])">
Click me!
</button>
The last parameter
10
refers to the interaction weight. The bigger the number, the greater the importance of the interaction.
0.1.0
6 years ago