Need help with implementation? Contact your Strada team for guidance. Your development team is responsible
for the final integration.
Script Tag
For all website pages where you want your chat widget to appear, paste the following code within the<head></head>
tags. Replace <YOUR-ORGANIZATION-ID>
and <YOUR-AGENT-ID>
with your organization and agent IDs.
You can find your Organization ID and Agent ID in the Strada dashboard.
That’s it!
You should now see a small chat button on the bottom right corner of your website. Click the button to open the chat widget.The Strada Web SDK also supports a rich set of actions and settings that you can use to customize the
behavior of your widget. For example, you might want to delay the launch of your widget until a certain
event, pass user metadata, or authenticate users. The Web SDK reference
covers all of these options and more.
Delay Widget Loading
To defer widget initialization until a specific event occurs, enable lazy mode by setting thelazy
property to true
:
window.stradaChat.start()
. Any setting normally configured in window.stradaSettings
can be passed here:
Pass User Data
UsemetaFields
to pass information about a user to Strada for attribution and analytics purposes. This data is not accessible to the AI agent during conversations.
Meta field keys should not include whitespace, emojis, or special characters.
Pass Agent Variables
UseagentVariables
to inject information into your agent’s chat conversations. Unlike metaFields
, these variables are accessible to the AI agent and can be used to customize agent behavior, provide context, or personalize the conversation experience.
User Authentication
Implement secure user verification by providing agetUserToken
function that returns a JWT token. This establishes an authenticated identity for each chat session.
The
getUserToken
function should return a Promise that resolves to a JWT token string, or null
if
authentication should be skipped.Hide the Floating Button
The widget displays a floating button by default. To manage chat visibility through your own UI elements instead, sethideButton
to true
: