0.0.7 • Published 2 years 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 theinitUsercommand 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, sendtrialTypeasother. 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 whenautoConnectis set tofalse.disconnect: Disconnects the user from PingBase. Can be used to hide the widget upon logout.