The visitor identification API is used to identify visitors to your site that were authenticated using external authentication systems.
403
error response from the API.loadImmediately
to false
on the hsConversationsSettings
object on the window. If you do not do this, the chat widget may load before the identification information is passed through. See the Chat Widget SDK primer below for more information.
hsConversationsSettings
properties outside the isConversationsAPIReady
function.hsConversationsSettings
needs to be set prior to the call, otherwise you may experience a race condition that interferes with widget load.hsConversationsSettings
object on the window.
hsConversationsSettings
object on the window every time the page loads for an authenticated visitor. This context will not be carried across page loads automatically if these parameters are no longer set. Tokens are temporary and will expire after 12 hours. Tokens can be cached to avoid re-fetching the token on every page load, as long as they are refreshed at least every 12 hours.
messagesUtk
cookie. HubSpot will also skip any email capture questions since email address is already known. Because the messagesUtk
cookie and email capture do not apply to these chats, the associated settings in the chatflow will not show for visitors identified through the Visitor Identification API.window.HubSpotConversations
object. All available methods can be accessed via this object. The HubSpot script loader on your page will create this object for you, but it may not be available immediately. To defer accessing the API until it’s initialized, you may use the window.hsConversationsOnReady
helper. For example:
window.hsConversationsOnReady
array
This is an optional field you can define on the window object that enables you to specify code to be executed as soon as the widget becomes available. Once the API has been initialized, it will check for the existence of this array and execute its functions in series.
hsConversationsSettings
object
This object enables you to provide some configuration options to the widget before it initializes. In order to use the Visitor Identification feature, you must set the following fields:
Parameter | Type | Description | Default |
---|---|---|---|
loadImmediately | boolean | Whether the widget should implicitly load or wait until the widget.load method is called | true |
identificationToken | string | Used to integrate with the Visitor Identification API. This is the token provided by the token generation endpoint on the Visitor Identification API that is used as proof that this visitor has been identified. | "" |
identificationEmail | string | The email address of the visitor that you’ve identified as loading the widget. | "" |