InsiteChat Widget Integration Guide
Ready to add InsiteChat to your website? Go to the Widget Generator to get your custom code.
Quick Start
Adding InsiteChat to your website is as simple as copying and pasting a single line of code. Our widget is lightweight, responsive, and customizable to match your website's look and feel.
Step 1: Configure Your Widget
Visit the Widget Generator page to customize the appearance of your widget and generate the installation code.
Step 2: Add the Script to Your Website
Copy the generated script tag and paste it into your website's HTML, just before the closing</body>
tag:
<script
src="https://InsiteChat/widget-loader.js"
data-domain="yourdomain.com"
data-position="right"
data-color="#4f46e5"
data-label="Chat with InsiteChat"
data-welcome="Hello! I'm InsiteChat. How can I help you today?">
</script>
Configuration Options
You can customize your widget using the following data attributes:
Attribute | Description | Default |
---|---|---|
data-domain | Your website domain | Current domain |
data-position | Widget position (right or left) | right |
data-color | Primary color for the widget | #4f46e5 |
data-label | Text shown on the chat button | Chat with us |
data-welcome | Initial message when chat is opened | Hello! How can I help you today? |
Installation in Different Platforms
WordPress
You can add the widget code to your WordPress site in a few ways:
- Using a Header & Footer plugin: Install a plugin like "Insert Headers and Footers" and add the widget script to the footer section.
- Editing your theme's footer.php: Add the widget script just before the closing
</body>
tag in your theme's footer.php file.
Shopify
To add the widget to your Shopify store:
- Go to your Shopify admin panel
- Navigate to Online Store > Themes
- Click "Actions" on your current theme and select "Edit code"
- Find and open the "theme.liquid" file
- Add the widget script just before the closing
</body>
tag - Save the changes
Wix
To add the widget to your Wix site:
- Go to your Wix dashboard
- Click on "Settings" in the left sidebar
- Select "Custom Code"
- Click "Add Custom Code"
- Give it a name like "InsiteChat Widget"
- Paste the widget script
- Select "Load code on each new page" and "Body - end"
- Click "Apply"
React Applications
For React applications, you can use our React component:
// Install the package
npm install @insitechat/widget
// Import in your React component
import InsiteChatWidget from '@insitechat/widget';
// Use in your component
function YourComponent() {
return (
<div>
{/* Your app content */}
<InsiteChatWidget
domain="yourdomain.com"
position="right"
primaryColor="#4f46e5"
widgetLabel="Chat with InsiteChat"
welcomeMessage="Hello! I'm InsiteChat. How can I help you today?"
/>
</div>
);
}
Customizing the Widget
Beyond the basic configuration options, you can further customize the widget appearance through our dashboard. Log in to your account, select your website, and update the widget settings from there.
Troubleshooting
Widget Doesn't Appear
If the widget doesn't appear on your website, check the following:
- Make sure the script is loaded correctly (check browser console for errors)
- Verify that your domain is properly set up in our system
- Check if your website has a Content Security Policy (CSP) that blocks external scripts
Widget Styling Issues
If the widget doesn't look right on your site:
- Your website might have CSS that conflicts with the widget. Try adjusting the z-index in your widget configuration
- For mobile display issues, make sure your website has a proper viewport meta tag
Need Help?
If you need assistance integrating the InsiteChat widget, please contact our support team at [email protected].