@attraqt/xo-js

## Installation and Usage

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@attraqt/xo-js
1.6.04 months ago2 years agoMinified + gzip package size for @attraqt/xo-js in KB

Readme

@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']
  }
});

Modules