Widget Installation
Learn how to add the Fyncall chat widget to your website.
Prerequisites
Before installing the widget, you need:
- A Fyncall account with an active subscription
- Your Widget ID (found in Settings → Widget → Installation)
- Access to edit your website's HTML
Basic Installation
Add this script tag before the closing </body> tag on every page where you want the widget to appear:
<script async src="https://cdn.fyncall.com/widget/loader.js"
data-fyncall-widget="fw_your_widget_id"></script>
Replace fw_your_widget_id with your actual Widget ID from the dashboard.
Installation Methods
Script Tag (Recommended)
The simplest method - works with any website:
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<!-- Your website content -->
<!-- Fyncall Widget - Add before </body> -->
<script async src="https://cdn.fyncall.com/widget/loader.js"
data-fyncall-widget="fw_your_widget_id"></script>
</body>
</html>
Google Tag Manager
- Go to your GTM container
- Click Tags → New
- Choose Custom HTML tag
- Paste the script code
- Set trigger to All Pages
- Publish your container
WordPress
Using a Plugin:
- Install a plugin like "Insert Headers and Footers"
- Add the script to the Footer section
- Save changes
Using Theme Files:
- Go to Appearance → Theme Editor
- Edit
footer.php - Add the script before
</body>
Shopify
- Go to Online Store → Themes
- Click Actions → Edit code
- Find
theme.liquidin the Layout folder - Add the script before
</body> - Save
Or use our Shopify App for automatic installation with cart integration.
React / Next.js
// components/FyncallWidget.jsx
'use client';
import { useEffect } from 'react';
export default function FyncallWidget() {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://cdn.fyncall.com/widget/loader.js';
script.async = true;
script.setAttribute('data-fyncall-widget', 'fw_your_widget_id');
document.body.appendChild(script);
return () => {
document.body.removeChild(script);
};
}, []);
return null;
}
// In your layout or page:
// <FyncallWidget />
Vue.js
<!-- FyncallWidget.vue -->
<script setup>
import { onMounted, onUnmounted } from 'vue';
let script = null;
onMounted(() => {
script = document.createElement('script');
script.src = 'https://cdn.fyncall.com/widget/loader.js';
script.async = true;
script.setAttribute('data-fyncall-widget', 'fw_your_widget_id');
document.body.appendChild(script);
});
onUnmounted(() => {
if (script) {
document.body.removeChild(script);
}
});
</script>
Configuration Options
You can configure the widget using data attributes:
<script async src="https://cdn.fyncall.com/widget/loader.js"
data-fyncall-widget="fw_your_widget_id"
data-version="v2.1.0"></script>
| Attribute | Description |
|---|---|
data-fyncall-widget | Required. Your Widget ID |
data-version | Pin to a specific version (e.g., v2.1.0) |
data-base-url | Custom API URL (for development) |
data-cdn-url | Custom CDN URL (for development) |
Legacy Installation
If you have an older API key format, you can still use it:
<script async src="https://cdn.fyncall.com/widget/loader.js"
data-fyncall-key="sk_your_api_key"></script>
We recommend migrating to the new Widget ID format for improved security.
Verifying Installation
After adding the widget:
- Refresh your website
- Look for the chat launcher button (usually bottom-right)
- Click the launcher to open the chat
- Send a test message
- Check your Fyncall Inbox to see the conversation
Troubleshooting
Widget not appearing
- Check the console - Open browser DevTools (F12) and look for errors
- Verify the Widget ID - Ensure it matches your dashboard exactly
- Check domain settings - The widget only loads on allowed domains
- Clear cache - Try a hard refresh (Ctrl+Shift+R)
CORS errors
If you see CORS errors in the console:
- Verify your domain is added to the allowed list in Settings → Widget → Domains
- Make sure you're using HTTPS in production
Multiple widgets
Only one widget instance can be active per page. If you have multiple script tags, remove the duplicates.
Next Steps
- Appearance - Customize colors and branding
- Behavior - Configure auto-open and sounds
- JavaScript API - Control the widget programmatically