Web Chat
Embed chat in your website to allow users to ask for help where they need it
Setting Up Web Chat
Step 1: Complete Email Setup
Step 2: Enable & Install Chat Widget
<script src="https://cdn.clearfeed.app/chat-widget.js"></script>const crypto = require('crypto'); // Use your Client Secret obtained from ClearFeed Setup Instructions const clientSecret = "your_client_secret_here"; // Get the email of the currently logged-in user on your website const userEmail = currentUser.email; // Replace 'currentUser.email' with how you access the user's email // Generate the HMAC hash const userHash = crypto.createHmac('sha256', clientSecret) .update(userEmail) .digest('hex');<script> window.ClearFeed("init", { client_id: "your-client-id-here", // Replace with your Client ID // Pass user details for signed-in users; omit this 'user' object for anonymous visitors. user: userIsLoggedIn ? { // Replace 'userIsLoggedIn' with your logic to check login status name: currentUser.name, // Replace with the user's name email: currentUser.email, // Replace with the user's email hash: userHash // Use the server-generated HMAC hash from Step 4 } : undefined // Pass 'undefined' or simply omit the 'user' property for anonymous users }); </script>
How User Identity Appears in ClearFeed
User Identity Updates and Limitations
Understanding User Identification
Customizing the Web Chat Widget Appearance and Behavior
Configuration Options
Option
Type
Description
Configure Reply Expectations
Option
Message Shown to Customers

Web Chat Collection
FAQs
Last updated
