apisearch-interactions

0.1.0 • Public • Published

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.

Package Sidebar

Install

npm i apisearch-interactions

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

46.2 kB

Total Files

20

Last publish

Collaborators

  • alexhoma