Integrations
Node.js

Pickle for Node.js

Node.js package for Pickle analytics.

Install

npm i @souranalytics/node

Setup

import { Pickle } from '@souranalytics/node'
 
const pickle = new Pickle(options)

Options

OptionTypeDescriptionRequiredDefault
options.apiKeystringProject API keyYes-
options.urlstringOverride Pickle API endpointNohttps://pickle.sh
options.anonymousIdstringOverride anonymous user idNocuid2

Usage

identify

pickle.identify(user: UserProps, data?: UserProps): Promise<void>
OptionTypeDescriptionRequired
user.idstringUser idYes
user.namestringUser nameNo
user.emailstringUser emailNo
dataobjectUser propertiesNo

event

pickle.event(name: string, data?: EventProps): Promise<void>
OptionTypeDescriptionRequired
namestringEvent nameYes
dataobjectEvent propertiesNo

view

pickle.view(name: string, data?: ViewProps): Promise<void>
OptionTypeDescriptionRequired
namestringView nameYes
dataobjectView propertiesNo