Getting the Embed Code
Embed Code
</body> tag on every page where you want the chatbot.
How It Works
- The script loads asynchronously (
defer) — it won’t slow down your page - It fetches the widget configuration from FIFE.BOT’s API (with retry + exponential backoff)
- A Shadow DOM container is created — the widget’s CSS is fully isolated from your site
- A floating chat bubble (64x64px) appears in the bottom-right corner
- Clicking the bubble opens the chat window
Widget Behavior
| Feature | Desktop | Mobile |
|---|---|---|
| Chat window size | 480 × 720px | Full screen |
| Position | Bottom-right corner | Bottom-right (bubble), full screen (window) |
| Safe area padding | No | Yes (for notches) |
| Close behavior | Minimizes to bubble | Slides down |
Proactive Messages
Show a message bubble next to the chat icon before the visitor opens it — to encourage engagement.| Setting | Description |
|---|---|
| Message text | What the bubble says (max 200 characters) |
| Delay | Seconds before it appears (1–15 seconds slider) |
Visual Effects
The widget includes subtle animations:- Glow pulse on the chat bubble
- Slide-up animation when opening
- Fade-up animation for new messages
Shadow DOM Isolation
The widget uses Shadow DOM to isolate its styles from your website. This means:- Your site’s CSS won’t affect the widget
- The widget’s CSS won’t leak into your site
- No class name conflicts
- Works on any website regardless of CSS framework
Troubleshooting
| Issue | Solution |
|---|---|
| Widget doesn’t appear | Check that data-agent-id is correct and the widget is enabled in Publish settings |
| Widget appears but chat fails | Check your browser’s console for errors. Verify the chatbot has knowledge base content. |
| Styling conflicts | The Shadow DOM should prevent this. If issues persist, check for !important rules targeting iframe elements. |
| Widget loads slowly | The script uses defer and loads config asynchronously. If your site has many scripts, the widget may take a few seconds. |
| Proactive message not showing | Check that it’s configured in Publish → Embed Widget with a message and delay set. |