0.0.7 • Published 20 days ago
@sai_tarun/pb_connect v0.0.7
PingBase Connect
Embed PingBase Connect into your Platform
Quick Start Guide
import PingBase from '@pingbase/connect';
PingBase("initOrg", 'ORG_TOKEN');
PingBase("initUser", 'email', 'firstName', 'lastName', 'trialType')
Methods and their uses
initOrg
: Initializes the organization for connection. Params: -orgKey: string
: A unique token given at the time of organization onboarding. -options: object
(Optional): Additional options to customize. -autoConnect: boolean = true
(Optional): Specifies whether to connect the user directly when theinitUser
command is called. If set to false, you need to connect the user explicitly usingPingBase("connect")
.initUser
: Initializes the user for connection. This should be called upon user login. Params: -email: string
: Email of the user -firstName: string
: First Name of the user -lastName: string
: Last Name of the user -trialType: string | 'other'
: Trial type of the user. If the user is a PAID user, sendtrialType
asother
. Otherwise, send the name of the trial likeFree Trial
,Freemium
, etc. -customMetadata: object
(Optional): Any other data of the end user. -role: string
(Optional): Role of the user in their company. -company
(Optional): Company of the user.connect
: Connects the user to PingBase. This is used only whenautoConnect
is set tofalse
.disconnect
: Disconnects the user from PingBase. Can be used to hide the widget upon logout.