A lightweight chat widget that can be easily integrated into any website using our CDN.
Add the following script tag to your HTML page to integrate the Dakia chat widget:
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#343434"
data-secondary-color="#00ff00"
></script>- Add the script tag to your HTML
<head>or before the closing</body>tag:
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<!-- Your website content -->
<!-- Dakia Chat Widget -->
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#343434"
data-secondary-color="#00ff00"
></script>
</body>
</html>- Replace
"your-client-id"with your actual client ID provided by Dakia.
The widget can be configured using data attributes on the script tag:
data-client-id: Your unique client identifier (required)
You can customize the widget colors by adding color data attributes:
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#343434"
data-secondary-color="#00ff00"
></script>| Attribute | Default | Description |
|---|---|---|
data-client-id |
required | Your unique client identifier |
data-primary-color |
"#007bff" |
Primary color for the widget (hex color) |
data-secondary-color |
"#6c757d" |
Secondary color for the widget (hex color) |
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#343434"
data-secondary-color="#00ff00"
></script><script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#ff6b6b"
data-secondary-color="#4ecdc4"
></script><script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="200"
data-primary-color="#343434"
data-secondary-color="#00ff00"
></script><script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/widget.iife.js"
data-client-id="prod-client-id"
data-primary-color="#007bff"
data-secondary-color="#6c757d"
></script>- CDN Provider: jsDelivr
- Base URL:
https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn/ - Main File:
widget.iife.js - Cache: Files are cached by jsDelivr for optimal performance
For production environments, you may want to pin to a specific version:
<!-- Pin to a specific commit -->
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn@{commit-hash}/widget.iife.js"
data-client-id="your-client-id"
></script>
<!-- Pin to a specific tag/release -->
<script
src="https://cdn.jsdelivr.net/gh/NerdFlow/dakia-chat-widget-cdn@v1.0.0/widget.iife.js"
data-client-id="your-client-id"
></script>The Dakia chat widget supports all modern browsers:
- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+
- File Size: Optimized for minimal bundle size
- Loading: Asynchronous loading to prevent blocking page render
- Caching: Leverages browser and CDN caching for fast subsequent loads
- Check that your
data-client-idis correct - Ensure the script tag is properly formatted
- Check browser console for any JavaScript errors
- Verify your domain is authorized for the client ID
- Script blocked: Check if ad blockers or content security policies are blocking the script
- CORS errors: Ensure your domain is whitelisted for the client ID
- Multiple widgets: Only one widget instance per page is supported
- All communications are encrypted using HTTPS
- The widget respects your website's Content Security Policy (CSP)
- No sensitive data is stored in browser localStorage
Note: Replace "your-client-id" with the actual client ID provided by Dakia support.