Socket
Socket
Sign inDemoInstall

@wecre8websites/sendinblue-tracker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wecre8websites/sendinblue-tracker

SendInBlue REST Event API


Version published
Weekly downloads
57
decreased by-6.56%
Maintainers
1
Weekly downloads
 
Created
Source

SendInBlue REST Tracker

No dependency REST implementation for SendinBlue's Tracker API

Installation

For Node.js

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"; //Replace with your SIB API key
var sib = new sibTracker(apiKey);

/**
 * Identify
 *
 * Returns on a successful request
 * Returns false on a bad request
 */

var email = "email@domain.com"; // Required
var properties = [
  // Optional
  ("key": "value"),
  // ...
];

sib.identify(email, properties).then(console.log).catch(console.error);

/**
 * trackEvent
 *
 * Returns on a successful request
 * Returns false on a bad request
 */

var email = "email@domain.com"; // Required
var event = "some_event"; // Required
var properties = [
  // Optional
  ("key": "value"),
  // ...
];

sib.trackEvent(email, event, properties).then(console.log).catch(console.error);

/**
 * trackLink
 *
 * Returns on a successful request
 * Returns false on a bad request
 */

var email = "email@domain.com"; // Required
var link = "some_link_identifier"; // Required
var properties = [
  // Optional
  ("key": "value"),
  // ...
];

sib.trackLink(email, link, properties).then(console.log).catch(console.error);

/**
 * trackPage
 *
 * Returns on a successful request
 * Returns false on a bad request
 */

var email = "email@domain.com"; // Required
var page = "https://domain.com/page"; // Required
var properties = [
  // Optional
  ("key": "value"),
  // ...
];

sib.trackLink(email, page, properties).then(console.log).catch(console.error);

Keywords

FAQs

Package last updated on 05 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc