Installation
Install the SDK from npm:
Package page:
Import and create widget
Initialize
await widget.init({
apiKey: "YOUR_SOPHI_API_KEY",
container: "#sophi-widget-container",
userId,
userName,
environment: "production",
});
Note
If your project loads the SDK through GTM instead of npm, see GTM Integration.