@attraqt/xo-js
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@attraqt/xo-js

Installation and Usage

npm install --save @attraqt/xo-js
import * as xo from '@attraqt/xo-js';

xo.init({
  activity: {
    trackerKey: 'YOUR_TRACKER_KEY',
    region: 'WEBSITE_REGION' // optional, set to EU by default
  },
  search: {
    token: 'SEARCH_API_TOKEN'
  }
});

xo.activity.send({
  action: 'view',
  target: {
    product: 'YOUR_PRODUCT_ID'
  }
});

xo.search.query('T-Shirt', {
  offset: 10,
  limit: 30,
  filter: 'price < 50'
});

xo.search.suggest('T-Shirt', {
  filter: 'price < 50',
  groupBy: {
    attribute: 'kind',
    count: 10,
    values: ['product', 'shops', 'ads']
  }
});

xo.search.autocomplete('T-Shirt', {
  numberOfSuggestions: 5
});

Modules

Readme

Keywords

none

Package Sidebar

Install

npm i @attraqt/xo-js

Weekly Downloads

817

Version

2.0.0

License

MIT

Unpacked Size

4.23 kB

Total Files

6

Last publish

Collaborators

  • attraqt-admin