Identifying Logged-In Users in Livechat Widget

Authenticate livechat widget users via an email from your website or system. This links their full conversation history and data to their profile, making it accessible across devices. You can also enrich their profile with custom data, providing your agents with helpful context during conversations.

It's highly recommended to also enforce identity verification to prevent user impersonation by bad actors.

How It Works

You can include user email and other information about them by including a snippet before loading livechat widget. This snippet defines a window.BeChatSettings object containing the user's details. The chat widget then automatically reads this information when it loads.

This process eliminates the need for users to fill out a pre-chat form and for agents to ask for basic details like name and email.

Implementation Guide

To get started, you'll need to add the following JavaScript code to your website.

Code Snippet

window.BeChatSettings = {
   user: {
    name: 'John Appleseed',
    email: 'john.appleseed@email.com',
    language: 'en',
    subscriptionPlan: 'Premium',
    company: 'Pixel Perfect Designs'
  }
}

<script src="https://your-site.com/livechat-loader.js"></script>

This snippet must be placed before the main chat loader script (livechat-loader.js).

Breakdown of the user Object

You'll need to dynamically populate the values for user object with the actual information of the currently logged-in user. This is typically done using a server-side language (like PHP, Python, or Node.js) to insert the user details into the JavaScript before the page is sent to the browser.

Benefits of Identifying Users