Overview

Chatbase allows you to display floating messages that appear above the chat widget icon when users first visit your website. These messages create an eye-catching and engaging way to welcome visitors and encourage them to interact with your chatbot.

Note: Floating initial messages are shown only once per session. If a user refreshes the page or navigates to another page during the same session, the messages won’t appear again to avoid creating an intrusive experience.

Note: These settings will override any initial message configurations made in your Chatbase dashboard.


Configuration

You can configure floating initial messages by adding the chatbaseConfig object before the Chatbase script:

window.chatbaseConfig = {
  showFloatingInitialMessages: true,  // Controls whether initial messages appear in a floating window
  floatingInitialMessagesDelay: 2     // Delay in seconds before showing floating initial messages
}

Configuration Parameters

  • showFloatingInitialMessages (boolean) - When set to true, initial messages will appear in a floating window. Default is false.
  • floatingInitialMessagesDelay (number) - The delay in seconds before showing floating initial messages. Default is 2.

Example Implementation

Here’s a complete example showing how to combine floating initial messages with custom messages:

// Configure floating initial messages
window.chatbaseConfig = {
  showFloatingInitialMessages: true,
  floatingInitialMessagesDelay: 2
};

Best Practices

  1. Timing

    • Use an appropriate delay to ensure the page has loaded
    • Consider user experience when setting the delay time
  2. Message Content

    • Keep floating messages concise and attention-grabbing
    • Use clear calls-to-action in your messages
  3. User Experience

    • Don’t overwhelm users with too many floating messages
    • Ensure messages are dismissible

Troubleshooting

If floating initial messages aren’t appearing:

  1. Check Configuration

    • Verify that showFloatingInitialMessages is set to true
    • Ensure the configuration is set before the Chatbase script loads
  2. Timing Issues

    • If messages appear too early or late, adjust the floatingInitialMessagesDelay
    • Make sure the page has fully loaded before messages should appear
  3. Console Errors

    • Check your browser’s console for any error messages
    • Verify that the Chatbase script has loaded correctly