Web Implementation Guide
Step-by-step instructions for implementing your AI assistant widget across different website platforms and content management systems.
Understanding the Widget Code
Your generated widget code consists of two main components that work together:
Widget Container
<div
id="your-unique-widget-id"
data-config-id="YOUR_CONFIG_ID"
data-primary-color="#ff6b35"
data-agent-name="Customer Support"
data-features="chat,voice"
data-prompt-message="Need help? We're here to assist!"
></div>
Widget Script
<script src="https://cdn.wiil.io/public/wiil-widget.js"></script>
<script>WiilWidget.init();</script>
Important: Always copy and paste your exact generated code. The placeholders shown above are for reference only.
Website Builders Implementation
WordPress
Method 1: Theme Footer (Recommended)
- Go to Appearance → Theme Editor
- Select footer.php from the file list
- Paste your widget code before the closing body tag
- Click Update File
Method 2: Custom HTML Widget
- Go to Appearance → Widgets
- Add a Custom HTML widget to your desired location
- Paste your complete widget code
- Save the widget
Method 3: Plugin (Alternative)
- Install a "Header and Footer Scripts" plugin
- Go to plugin settings
- Paste your widget code in the "Footer Scripts" section
- Save settings
Wix
Using Custom Code:
- Go to Settings → Custom Code
- Click + Add Custom Code
- Paste your widget code
- Set Load code on: "All Pages" or specific pages
- Choose Place code in: "Body - end"
- Click Apply
Using HTML Embed:
- Click Add Elements → Embed → Custom Embeds
- Select HTML Embed
- Click Enter Code
- Paste your complete widget code
- Position the embed element where desired
Squarespace
Code Injection Method:
- Go to Settings → Advanced → Code Injection
- Paste your widget code in the Footer section
- Click Save
Code Block Method:
- Edit the page where you want the widget
- Add a Code Block
- Paste your widget code
- Save and publish
Webflow
Project-Wide Implementation:
- Go to Project Settings → Custom Code
- Paste your widget code in Footer Code
- Click Save Changes and publish
Page-Specific Implementation:
- Open the page in the Designer
- Go to Page Settings → Custom Code
- Paste your widget code in Before body end tag
- Save and publish
E-commerce Platforms
Shopify
Theme Files Method:
- Go to Online Store → Themes
- Click Actions → Edit Code
- Open Layout/theme.liquid
- Paste your widget code before
</body> - Click Save
Alternative - Checkout Settings:
- Go to Settings → Checkout
- Scroll to Order Status Page
- Paste widget code in Additional Scripts
- Save settings
BigCommerce
Script Manager:
- Go to Storefront → Script Manager
- Click Create a Script
- Set Location to "Footer"
- Set Pages to "All Pages" or specific pages
- Paste your widget code in the script content
- Save script
WooCommerce (WordPress)
Follow the WordPress implementation methods above, as WooCommerce runs on WordPress.
No-Code Development Platforms
Lovable
Custom Code Section:
- Access your project's custom code settings
- Add your widget code to the HTML embed component
- Position the component in your desired location
- Save and deploy
Replit
HTML Integration:
- Open your project's main HTML file
- Paste the widget code before the closing body tag
- Save the file
- Run your project to test
Base44
Custom HTML Section:
- Navigate to your generated app's custom HTML section
- Add your widget code to the footer or body area
- Save changes
- Deploy your application
Bubble
HTML Element:
- Add an HTML Element to your page
- Paste your complete widget code
- Position the element where desired
- Set element to be visible
- Preview and publish
Glide
Web Embed Feature:
- Add a Web Embed component to your app
- Paste your widget code
- Configure display settings
- Publish your app
FlutterFlow
Custom Widget:
- Add a Custom Widget component
- Include your widget code in the web view component
- Configure the widget properties
- Build and deploy
Zapier
Webhook Integration:
- Set up a webhook in your automation
- Add your widget code to the webhook response
- Configure the automation trigger
- Test and activate
Advanced Implementation Options
Custom Styling Integration
Your widget supports customization through data attributes:
<div
id="your-unique-widget-id"
data-config-id="YOUR_CONFIG_ID"
data-primary-color="#your-brand-color"
data-agent-name="Your Assistant Name"
data-features="chat,voice"
data-prompt-message="Your custom message"
></div>
Customizable Attributes:
data-primary-color: Widget theme color (hex code)data-agent-name: Display name for your assistantdata-features: Communication options ("chat", "voice", or "chat,voice")data-prompt-message: Welcome message for users
Multiple Page Implementation
Site-Wide (Recommended):
- Place code in footer/header templates
- Widget appears on all pages
- Consistent user experience
Page-Specific:
- Add code to individual pages
- Targeted assistance for specific content
- More granular control
Performance Considerations
Loading Optimization:
- Widget script loads asynchronously
- Minimal impact on page load speed
- Initializes after page content loads
Mobile Responsiveness:
- Widget automatically adapts to screen size
- Touch-friendly interface on mobile devices
- Voice features work on supported mobile browsers
Testing Your Implementation
Verification Steps
-
Check Widget Visibility:
- Widget appears on intended pages
- Positioning looks correct
- No layout conflicts
-
Test Communication Features:
- Text chat functionality works
- Voice features activate (if enabled)
- Assistant responds appropriately
-
Cross-Browser Testing:
- Test in Chrome, Firefox, Safari, Edge
- Verify mobile browser compatibility
- Check voice features in supported browsers
-
Performance Testing:
- Page load speed not significantly impacted
- Widget loads without errors
- No console errors in browser
Common Testing Scenarios
Desktop Testing:
- Text chat conversations
- Voice activation and recognition
- Widget positioning and appearance
Mobile Testing:
- Touch interface responsiveness
- Voice features on mobile browsers
- Screen size adaptation
Different User Flows:
- New visitor experience
- Returning user recognition
- Conversation continuity
Best Practices
Implementation Guidelines
-
Test on Staging First:
- Always test on a staging/development site
- Verify functionality before production deployment
- Check for conflicts with existing scripts
-
Monitor Performance:
- Check page load speeds after implementation
- Monitor for any JavaScript errors
- Ensure widget doesn't interfere with other features
-
User Experience:
- Position widget for easy access
- Ensure it doesn't block important content
- Test on different screen sizes
-
Documentation:
- Record implementation details for team reference
- Document any customizations made
- Keep track of widget configuration settings
Maintenance Considerations
Regular Checks:
- Verify widget continues to function properly
- Monitor for any platform updates that might affect integration
- Test across different browsers periodically
Updates and Changes:
- Widget script automatically updates from CDN
- Configuration changes made in dashboard reflect immediately
- No need to manually update embedded code
Need Help? If you encounter issues with platform-specific implementation, contact our support team at support@wiil.io with your platform details and specific questions.