Floating Initial Messages
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:
Configuration Parameters
- showFloatingInitialMessages (boolean) - When set to
true
, initial messages will appear in a floating window. Default isfalse
. - 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:
Best Practices
-
Timing
- Use an appropriate delay to ensure the page has loaded
- Consider user experience when setting the delay time
-
Message Content
- Keep floating messages concise and attention-grabbing
- Use clear calls-to-action in your messages
-
User Experience
- Don’t overwhelm users with too many floating messages
- Ensure messages are dismissible
Troubleshooting
If floating initial messages aren’t appearing:
-
Check Configuration
- Verify that
showFloatingInitialMessages
is set totrue
- Ensure the configuration is set before the Chatbase script loads
- Verify that
-
Timing Issues
- If messages appear too early or late, adjust the
floatingInitialMessagesDelay
- Make sure the page has fully loaded before messages should appear
- If messages appear too early or late, adjust the
-
Console Errors
- Check your browser’s console for any error messages
- Verify that the Chatbase script has loaded correctly