Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@candulabs/eventing

Package Overview
Dependencies
Maintainers
4
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@candulabs/eventing

Candu eventing library

  • 0.8.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
85
decreased by-78.26%
Maintainers
4
Weekly downloads
 
Created
Source

@candulabs/eventing

Best in-app learning experience.

Installation

Node.js

TODO update readme if up to date info Install it using node or yarn npm install @candulabs/eventing or with yarn if you prefer yarn add @candulabs/eventing

Usage

The SDK is made of three functions:

  • Init
  • Identify
  • Track

Init is used to create a singleton object of the client. We discourage re-initializing the client every time, as it risks creating less efficient memory management and race conditions. After initializing the client, you’ll be able to use the identify and track functions.

Initiation

To get started, just run create a new client

const client = Candu.init('<MY_API_KEY>')

Because the SDK is a singleton, you’ll need to store a reference to the client object that you have created.

Identify

Identify is used to record the identity of a client. The Identify call is fundamental to receive the videos that a customer should get, as well as updating his information. You should do an identify call everytime you load a page since this call will download and refresh the result list.

client.identify(userId[, traits ])

userId is the user identifier that you want to track. This identifier will be stored in order to be used again for the track calls. traits is an object containing all the user properties you want to record about the user.

Tracking an event

Tracking events is easy.

candu.track(eventName [, properties])

The function track takes the following parameters:

Parameter nameDescription
eventName The name of the event you want to track.
properties Any additional properties you want to track.

FAQs

Package last updated on 14 Sep 2021

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