SendInBlue REST Tracker
No dependency REST implementation for SendinBlue's Tracker API
Installation
npm
The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs.
Then install it via:
npm install @wecre8websites/sendinblue-tracker --save
Usage
Please follow the installation instruction and execute the following JS code:
var sibTracker = require("@wecre8websites/sendinblue-tracker").sibTracker;
var apiKey = "YOUR-API-KEY";
var sib = new sibTracker(apiKey);
var email = "email@domain.com";
var properties = [
("key": "value"),
];
sib.identify(email, properties).then(console.log).catch(console.error);
var email = "email@domain.com";
var event = "some_event";
var properties = [
("key": "value"),
];
sib.trackEvent(email, event, properties).then(console.log).catch(console.error);
var email = "email@domain.com";
var link = "some_link_identifier";
var properties = [
("key": "value"),
];
sib.trackLink(email, link, properties).then(console.log).catch(console.error);
var email = "email@domain.com";
var page = "https://domain.com/page";
var properties = [
("key": "value"),
];
sib.trackLink(email, page, properties).then(console.log).catch(console.error);