# 🚀 AI-First Website Widget to Convert Visitors into Sales

![iSales AI Widget](https://raw.githubusercontent.com/iSales-AI/isales-widget/refs/heads/main/ai_widget_github.png)

> **Stop Losing Visitors. Start Closing Deals.** Our AI-powered widget instantly engages every visitor with intelligent chat, AI-assisted voice calls, and seamless scheduling or other call to action — all without them ever leaving your site. Turn passive traffic into active, qualified leads.

[![iSales.ai](https://img.shields.io/badge/🌐%20Visit-isales.ai-4f46e5?style=for-the-badge&logoColor=white)](https://isales.ai)

[![Latest Version](https://img.shields.io/github/v/tag/iSales-AI/isales-widget?label=version&color=blue)](https://github.com/iSales-AI/isales-widget/releases)
[![Bundle Size](https://img.shields.io/badge/bundle%20size-%3C50KB-success)](https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/)
[![JSDelivr](https://img.shields.io/badge/CDN-JSDelivr-ff5722)](https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/)
[![Statically](https://img.shields.io/badge/CDN-Statically-4CAF50)](https://cdn.statically.io/gh/iSales-AI/isales-widget/main/)
[![GitHack](https://img.shields.io/badge/CDN-GitHack-9C27B0)](https://raw.githack.com/iSales-AI/isales-widget/main/)

[![Preact](https://img.shields.io/badge/Framework-Preact%2010.x-673AB7)](https://preactjs.com/)
[![TypeScript](https://img.shields.io/badge/Language-TypeScript-3178C6)](https://www.typescriptlang.org/)
[![Tailwind CSS](https://img.shields.io/badge/Styling-Tailwind%20CSS-06B6D4)](https://tailwindcss.com/)
[![Zustand](https://img.shields.io/badge/State-Zustand-FF6B35)](https://github.com/pmndrs/zustand)
[![Vite](https://img.shields.io/badge/Bundler-Vite-646CFF)](https://vitejs.dev/)

[![GitHub issues](https://img.shields.io/github/issues/iSales-AI/isales-widget)](https://github.com/iSales-AI/isales-widget/issues)
[![GitHub forks](https://img.shields.io/github/forks/iSales-AI/isales-widget)](https://github.com/iSales-AI/isales-widget/network)
[![GitHub stars](https://img.shields.io/github/stars/iSales-AI/isales-widget)](https://github.com/iSales-AI/isales-widget/stargazers)

[![Build Status](https://img.shields.io/github/actions/workflow/status/iSales-AI/isales-widget/ci.yml?branch=main&label=build)](https://github.com/iSales-AI/isales-widget/actions)
[![Uptime](https://img.shields.io/uptimerobot/ratio/7/iSales-AI_isales-widget?label=CDN%20uptime)](https://status.jsdelivr.com/)
[![jsDelivr hits](https://img.shields.io/jsdelivr/gh/hm/iSales-AI/isales-widget?label=CDN%20hits&color=orange)](https://www.jsdelivr.com/package/gh/iSales-AI/isales-widget)
[![GitHub last commit](https://img.shields.io/github/last-commit/iSales-AI/isales-widget)](https://github.com/iSales-AI/isales-widget/commits)
[![GitHub release date](https://img.shields.io/github/release-date/iSales-AI/isales-widget)](https://github.com/iSales-AI/isales-widget/releases)

<details>
<summary>📊 <strong>Badge Legend</strong></summary>

### 🔄 Status & Metrics
- **Version**: Current release version
- **Bundle Size**: Total gzipped size (target: <50KB)
- **Build Status**: CI/CD pipeline status
- **CDN Uptime**: JSDelivr availability
- **CDN Hits**: Monthly download count
- **Last Commit**: Development activity
- **Release Date**: Latest version release

### 🌐 CDN Availability  
- **JSDelivr**: Primary CDN (global edge network)
- **Statically**: Fast alternative CDN
- **GitHack**: Developer-friendly CDN

### 🛠️ Tech Stack
- **Preact**: Lightweight React alternative (3KB)
- **TypeScript**: Type-safe JavaScript
- **Tailwind CSS**: Utility-first CSS framework
- **Zustand**: Lightweight state management
- **Vite**: Fast build tool

### 📈 Community
- **Issues**: Bug reports and feature requests
- **Forks**: Community contributions
- **Stars**: Project popularity

</details>

## ✨ How You'll Win

Deploy a tireless AI sales agent that works 24/7. Watch your conversion rates and customer satisfaction soar.

### 🎯 **AI Chat That Sells While You Sleep**
Instantly answer questions, qualify prospects, and capture leads around the clock. Our AI guides visitors toward a sale, turning curiosity into conversion.
> **Result:** +38% more qualified leads captured overnight

### 📞 **First-Response Voice Calls (<10s)**
Connect hot prospects with human-like AI voice instantly. AI handles initial engagement, your reps focus on qualified leads only.
> **Result:** Triple your speed-to-lead, focus on high-value calls

### 📅 **One-Click Smart Scheduling**
Eliminate back-and-forth emails. Direct Calendly, Google Calendar & Cal.com integration. Your pipeline fills itself.
> **Result:** 40%+ increase in booked demos and sales meetings

### 🧭 **Proactive Site Navigator**
AI anticipates visitor needs, guides them to the right pages, resolves 80% of support queries instantly.
> **Result:** Slash support tickets, dramatically improve UX

## 🏆 Industry Success Stories

**🏠 Real Estate**: +47% qualified leads, 34% higher showing attendance  
**💻 SaaS**: +41% demo bookings, 28% more trial sign-ups  
**🛒 E-commerce**: +22% add-to-cart rate, 18% cart recovery  
**👤 Creators**: 2x session time, 31% more client bookings  

## 🚀 Get Your AI Widget Free in 60 Seconds

**Step 1:** Get your API key at [isales.ai](https://isales.ai)  
**Step 2:** Add this single line to your website:

```html
<script>
  window.iSalesWidget = window.iSalesWidget || [];
  window.iSalesWidget.push(['init', {
    // 🔑 Required
    apiKey: 'YOUR_API_KEY',                    // ← Get yours at isales.ai
    
    // 🎨 UI Configuration
    position: 'bottom-right',                  // 'bottom-right' | 'bottom-left'
    theme: 'light',                           // 'light' | 'dark' | 'auto'
    primaryColor: '#000000',                  // Hex color for branding
    locale: 'en-US',                          // Language locale (en-US, es-ES, fr-FR, etc.)
    
    // 🆕 Widget Mode - Choose your UI experience
    widgetMode: 'classic',                    // 'classic' | 'modern' - Widget UI mode
    
    // 💬 Suggested Questions (up to 4 questions)
    suggestedQuestions: [
      'How can I get started?',
      'What features do you offer?',
      'Do you have a free trial?',
      'How can I contact support?'
    ],
    
    // 📱 Social Media Integration (optional)
    instagram: 'https://instagram.com/yourhandle',     // Instagram profile URL with iSales AI Chatbot Agent
    telegram: 'https://t.me/yourusername',             // Telegram chat URL with iSales AI Chatbot Agent
    whatsapp: 'https://wa.me/1234567890',              // WhatsApp number URL with iSales AI Chatbot Agent
    
    // 🎙️ AI Voice Integration (optional)
    elevenlabs_agent_id: 'your-agent-id',             // ElevenLabs AI agent ID
    
    // 📅 Google Calendar Integration (optional)
    calendar_embedding_code: '<iframe src="..."></iframe>',  // Use and embed custom calendar HTML for Google Calendar, or direct links for Cal.com or Calendly or anything else
  }]);
</script>
<script async src="https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/latest/loader.js"></script>
```


**Step 3:** Watch your conversions soar! 📈

> **🔄 Auto-Update Enabled:** Widget automatically updates to the latest version every 5 minutes  
> **💡 Pro Tip:** Start with our free tier - no credit card required

### ✨ **What Happens After Integration**

🔄 **Automatic Updates**: Your widget checks for new versions every 5 minutes and auto-updates  
🚀 **Zero Maintenance**: No manual updates required - always get the latest features  
📊 **Performance Tracking**: Update events are tracked in your analytics dashboard  
🛡️ **Reliable Delivery**: Multiple CDN fallbacks ensure 99.9% uptime

## 📦 CDN URLs

### 🚀 CDN URLs (Multiple Strategies)

#### ⚡ Immediate Updates (Commit-Hash URLs)
For instant access to the latest version without waiting for CDN cache:
- **JSDelivr**: `https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@e3e5229/latest/loader.js`
- **Statically**: `https://cdn.statically.io/gh/iSales-AI/isales-widget/e3e5229/latest/loader.js`
- **GitHack**: `https://raw.githack.com/iSales-AI/isales-widget/e3e5229/latest/loader.js`
- **GitHub Raw**: `https://raw.githubusercontent.com/iSales-AI/isales-widget/e3e5229/latest/loader.js`

> **🚀 Use these URLs for immediate access to v1.0.61** - No waiting for CDN cache!

#### 🔄 Auto-Updating (Branch-Based URLs)
Standard URLs that auto-update (may take 5-24 hours for JSDelivr):
- **JSDelivr**: `https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/latest/loader.js`
- **Statically**: `https://cdn.statically.io/gh/iSales-AI/isales-widget/main/latest/loader.js`
- **GitHack**: `https://raw.githack.com/iSales-AI/isales-widget/main/latest/loader.js`
- **GitHub Raw**: `https://raw.githubusercontent.com/iSales-AI/isales-widget/main/latest/loader.js`

#### 📌 Version-Specific (Pinned)
For production environments requiring specific versions:
- **JSDelivr**: `https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/versions/v1.0.61/loader.js`
- **Statically**: `https://cdn.statically.io/gh/iSales-AI/isales-widget/main/versions/v1.0.61/loader.js`
- **GitHack**: `https://raw.githack.com/iSales-AI/isales-widget/main/versions/v1.0.61/loader.js`
- **GitHub Raw**: `https://raw.githubusercontent.com/iSales-AI/isales-widget/main/versions/v1.0.61/loader.js`

### 🔄 CDN Comparison

| CDN | Speed | Reliability | Features | Best For |
|-----|-------|-------------|----------|----------|
| **JSDelivr** | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Global edge, Auto-minify | Production |
| **Statically** | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | Fast, Simple | Alternative |
| **GitHack** | ⭐⭐⭐ | ⭐⭐⭐ | No rate limits | Development |
| **GitHub Raw** | ⭐⭐ | ⭐⭐⭐ | Direct, No caching | Testing |

### 🎯 CDN Selection Guide

Choose the right CDN strategy for your use case:

```javascript
// ⚡ IMMEDIATE ACCESS (v1.0.61 - No waiting!)
<script src="https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@e3e5229/latest/loader.js"></script>

// 🚀 Production (Recommended - Auto-updating)
<script src="https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/latest/loader.js"></script>

// 🔄 High Performance Alternative  
<script src="https://cdn.statically.io/gh/iSales-AI/isales-widget/main/latest/loader.js"></script>

// 🧪 Development/Testing
<script src="https://raw.githack.com/iSales-AI/isales-widget/main/latest/loader.js"></script>

// 📦 Version-Pinned (Production)
<script src="https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/versions/v1.0.61/loader.js"></script>
```

**Performance Tips:**
- Use JSDelivr for production (best global performance)
- Pin to specific versions for critical applications
- Test with GitHack during development
- Monitor CDN status at [JSDelivr Status](https://status.jsdelivr.com/)

## ⚙️ Configuration

### 📋 Complete Configuration Options

```javascript
window.iSalesWidget.push(['init', {
  // 🔑 Required
  apiKey: 'your-api-key',                     // Your iSales.ai API key
  
  // 🎨 UI Configuration
  position: 'bottom-right',                   // 'bottom-right' | 'bottom-left'
  theme: 'light',                            // 'light' | 'dark' | 'auto'
  primaryColor: '#000000',                   // Hex color for branding
  locale: 'en-US',                           // Language locale (en-US, es-ES, fr-FR, etc.)
  
  // 🆕 Widget Mode - Choose your UI experience
  widgetMode: 'classic',                     // 'classic' | 'modern' - Widget UI mode
  
  // 💬 Suggested Questions (up to 4 questions)
  suggestedQuestions: [
    'How can I get started?',
    'What features do you offer?',
    'Do you have a free trial?',
    'How can I contact support?'
  ],
  
  // 📱 Social Media Integration (optional)
  instagram: 'https://instagram.com/yourhandle',       // Instagram profile URL
  telegram: 'https://t.me/yourusername',               // Telegram chat URL  
  whatsapp: 'https://wa.me/1234567890',                // WhatsApp number URL
  
  // 🎙️ AI Voice Integration (optional)
  elevenlabs_agent_id: 'your-agent-id',               // ElevenLabs AI agent ID
  
  // 📅 Calendar Integration (optional)
  calendar_embedding_code: '<iframe src="..."></iframe>',      // Custom calendar HTML, or direct links for Cal.com or Calendly or anything else
}]);
```

### 🎯 Quick Start (Minimal)

```javascript
window.iSalesWidget.push(['init', {
  apiKey: 'your-api-key',
  position: 'bottom-right',
  theme: 'light'
}]);
```

### 🚀 Production Ready (Full Features)

```javascript
window.iSalesWidget.push(['init', {
  apiKey: 'your-api-key',
  position: 'bottom-right',
  theme: 'auto',
  primaryColor: '#4f46e5',
  locale: 'en-US',
  widgetMode: 'modern',                      // Try modern UI mode
  suggestedQuestions: [                      // Help users get started
    'How can I get started?',
    'What are your pricing plans?',
    'Do you offer support?'
  ],
  whatsapp: 'https://wa.me/1234567890',
  telegram: 'https://t.me/yoursupport',
  calendar_embedding_code: 'https://calendly.com/yourteam',
  elevenlabs_agent_id: 'agent-xyz123'
}]);
```

## 🎯 API Methods

```javascript
// Control widget
window.iSalesWidget.push(['open']);
window.iSalesWidget.push(['close']);
window.iSalesWidget.push(['toggle']);

// Send messages
window.iSalesWidget.push(['sendMessage', 'Hello!']);
```

## 🎯 Ready to Transform Your Website?

**The numbers don't lie:** Websites with AI chat widgets see 40-60% higher conversion rates. Your competitors are already using AI to capture leads while you sleep.

### 🚀 **Get Started Now**
- **Free Tier**: 1,000 conversations/month, all features included
- **No Setup Fees**: Deploy in under 60 seconds
- **Cancel Anytime**: No contracts, no commitments

[![Start Free Trial](https://img.shields.io/badge/🚀%20Start%20Free%20Trial-isales.ai-success?style=for-the-badge)](https://isales.ai)

---

## 📊 Version Information

- **Latest Release**: v1.0.61 (2026-03-07)
- **Next-Gen AI**: Powered by advanced language models
- **Enterprise Ready**: 99.9% uptime, SOC2 compliant

## 🔗 Resources

- **🎮 Live Demo**: [Try the widget](https://cdn.jsdelivr.net/gh/iSales-AI/isales-widget@main/examples/demo.html)
- **📚 Full Documentation**: [Complete setup guide](https://isales.ai/docs/welcome-to-isales-chatbot)  
- **💬 Get Support**: [Help center](https://t.me/isales_ai)
- **🐛 Report Issues**: [GitHub Issues](https://github.com/iSales-AI/isales-widget/issues)
- **🧪 Test Auto-Updates**: [CDN Test Script](https://github.com/iSales-AI/isales-widget/blob/main/scripts/test-public-cdn-update.mjs)

## 🧪 Testing Auto-Update Functionality

Validate that your CDN setup correctly supports auto-updates:

```bash
# Test all CDNs with latest version
curl -s https://raw.githubusercontent.com/iSales-AI/isales-widget/main/scripts/test-public-cdn-update.mjs | node

# Test specific version
curl -s https://raw.githubusercontent.com/iSales-AI/isales-widget/main/scripts/test-public-cdn-update.mjs | node - versions/v1

# Test with custom repository
PUBLIC_REPO=your-org/your-repo curl -s https://raw.githubusercontent.com/iSales-AI/isales-widget/main/scripts/test-public-cdn-update.mjs | node
```

### Expected Test Results

✅ **All CDNs should pass these tests:**
- Loader accessibility and auto-update logic
- Widget file availability and correct headers
- Manifest.json version checking endpoint
- Cache-busting parameter support
- Version comparison and reload functionality

🎯 **Performance Benchmarks:**
- JSDelivr: 99%+ success rate (recommended)
- Statically: 95%+ success rate (fast alternative)
- GitHack: 90%+ success rate (development)
- GitHub Raw: 85%+ success rate (basic)

### Auto-Update Monitoring

Monitor update behavior in your browser console:

```javascript
// Check current widget version
console.log(window.iSalesWidget._version);

// Monitor update events
window.addEventListener('beforeunload', () => {
  console.log('Widget version check triggered page reload');
});

// View update metrics
console.log(window.iSalesWidget.getMetrics());
```