exponea

0.1.1 • Public • Published

exponea NPM version CircleCI

Exponea node.js bindings

Installation

npm install exponea

Tests

npm test

Documentation

REST API DOC

Usage

Set EXPONEA_TOKEN environment variable to your project_id. You can publish multiple bulk commands to exponea using publish function:

const exponea = require('exponea')
 
// Identifying customers (Add/update customer/lead)
exponea.publish([{
  name: exponea.enums.CUSTOMERS,
  customerId: '2342-wedasd-234aws-asd45d',  // customer/lead Id
  data: {                                   // custom user/lead data
    name: 'Alan paul',
    email: 'alan@gmail.com',
    phone: '0092838842222'
    // ...
    // ...
  }
}])
 
// Tracking customer events
exponea.publish([{
  name: exponea.enums.EVENTS,
  customerId: '2342-wedasd-234aws-asd45d',  // customer/lead Id
  type: 'event'                             // custom event type
  data: {                                   // custom data
    item: 'Iphone'
    price: 15,
    number of items: 3
    // ...
    // ...
  }
}])

Command name can be either exponea.enums.CUSTOMERS or exponea.enums.EVENTS. In case of EVENTS type is necessary.

Readme

Keywords

Package Sidebar

Install

npm i exponea

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

11.3 kB

Total Files

9

Last publish

Collaborators

  • niklabh