A wrapper for Vero's public api using Typescript.
A newly updated one did not exist, so I made one.
MIT
npm install vero-ts
import Vero from 'vero-ts';
const vero = new Vero('<YOUR_AUTH_TOKEN>');
// -- Track a user
const userId:string = 'someId';
const userEmail:string = '[email protected]'
const dataAboutTheUser:object = {
someProperty: 'someValue',
anotherProperty: 123
}
await vero.Users.track(userId, userEmail, dataAboutTheUser);
// --
// -- Call an event
// (Assume the above user info still applies)
const eventName = '<EVENT-NAME>';
const eventData = {
eventProperty: 'value',
eventObjectProperty: {
objectProperty: 'something'
},
anotherProperty: 123
};
await vero.Events.track(userId, userEmail, eventName, eventData);