@futuralabs/customerio_event
v1.0.4
Published
send event to customer.io
Downloads
1
Readme
customerio-events
Integrating customer.io events
Installation
$ npm i @futuralabs/customerio_event
or using yarn
$ yarn add @futuralabs/customerio_event
Configuration
You must have the CUSTOMER_IO_URL
, CUSTOMER_IO_USERNAME
, CUSTOMER_IO_PASSWORD
environment variables setted to send successfully an event to the workspace.
If CUSTOMER_IO_URL
is not given, the production URL is taken by default. Be careful with this default value.
If CUSTOMER_IO_USERNAME
(the auth token) is not provided, an error there will be thrown
If CUSTOMER_IO_PASSWORD
(the auth token) is not provided, an error there will be thrown
Usage
Basic usage
const {tracking} = require('@futuralabs/customerio_event')
// Event properties must describe the event data with custom fields
// distinct_id is mandatory for any event
const eventProperties = {
distinct_id: 'your id'
}
tracking({
eventName: 'your event name',
eventProperties: {
'distinct_id'...
},
})