Description of your new file.
init()
boot()
shutdown()
setUserProperties()
init()
boot()
userId
– required (string): unique ID for the current useruserProperties
– optional: user-level data (name, plan, etc.)instanceAttributes
– optional: product config, API URLs, and auth headersshutdown()
setUserProperties()
Method | Purpose | When to Use |
---|---|---|
init() | Initialize the SDK (NPM only) | On page load |
boot() | Show the agent to the current user | After user login |
shutdown() | Hide the agent | On user logout or session end |
setUserProperties() | Update user data for the current session | When user attributes change in real time |