• Blog
  • Documentation
  • Pricing
  • FAQ
  • Contact
Sign InSign Up

BrainGency.ai – The Human Edge in AI for E-commerce Growth. Unifying marketing, sales, and business data into clear, actionable insights for ambitious SME entrepreneurs.

© Copyright 2025 HelloAivy. All Rights Reserved.

About
  • Blog
  • Contact
Product
  • Documentation
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Getting Started with HelloAivy
  • Widget Installation Overview
    • CDN Installation Guide
    • WordPress Plugin Installation
    • Widget Customization Guide
  • Authentication & Security
    • Account Settings & Configuration

CDN Installation Guide

Install the HelloAivy chat widget on any website using a simple CDN script tag.

The CDN installation method allows you to add the chat widget to any website in under 60 seconds using a simple script tag.

Quick Start

Step 1: Get Your Script Tag

Navigate to your chatbot's Publish tab in the HelloAivy dashboard to find your unique script tag. It will look like this:

<script async data-chatbot='YOUR_CHATBOT_ID' src='https://helloaivy-widget.vercel.app/chat-widget.js'></script>

Step 2: Add to Your Website

Paste the script tag just before the closing </body> tag in your HTML:

<!DOCTYPE html>
<html>
  <head>
    <title>My Website</title>
  </head>
  <body>
    <!-- Your website content -->

    <script async data-chatbot='YOUR_CHATBOT_ID' src='https://helloaivy-widget.vercel.app/chat-widget.js'></script>
  </body>
</html>

Step 3: Verify Installation

Save your HTML file and open it in a browser. You should see a chat button in the bottom-right corner of your page.

Widget Modes

Floating Mode (Default)

The floating mode displays a chat button in the corner of your website:

<!-- Floating Mode (Bottom Right) -->
<script async data-chatbot='YOUR_CHATBOT_ID' src='https://helloaivy-widget.vercel.app/chat-widget.js'></script>

This is the recommended mode for most websites as it's always accessible without taking up page space.

Embedded Mode

Embed the chat interface directly in a container element:

<!-- Embedded Mode -->
<div id="helloaivy-chat" style="height: 600px;"></div>
<script
  async
  data-chatbot='YOUR_CHATBOT_ID'
  data-mode="embedded"
  data-target="helloaivy-chat"
  src='https://helloaivy-widget.vercel.app/chat-widget.js'>
</script>

Perfect for dedicated support pages where you want the chat interface to be the main focus.

Customization Options

Custom Theme & Position

Customize the primary color and button position to match your brand:

<!-- Custom Theme -->
<script
  async
  data-chatbot='YOUR_CHATBOT_ID'
  data-primary-color="#10b981"
  data-position="bottom-left"
  src='https://helloaivy-widget.vercel.app/chat-widget.js'>
</script>

Available Data Attributes

AttributeDescriptionValues
data-chatbotYour chatbot ID (required)UUID string
data-modeWidget display modefloating or embedded
data-targetTarget element ID for embedded modeElement ID (string)
data-positionButton positionbottom-right or bottom-left
data-primary-colorTheme colorHex color code (e.g., #10b981)
data-themeColor themelight or dark

Platform-Specific Instructions

Webflow

  1. Open your Webflow project settings
  2. Navigate to Custom Code → Footer Code
  3. Paste the script tag
  4. Publish your site

Shopify

  1. Go to Online Store → Themes
  2. Click Actions → Edit Code
  3. Open the theme.liquid file
  4. Paste the script before the closing </body> tag
  5. Save changes

Wix

  1. Open your Wix Editor
  2. Click Settings → Custom Code
  3. Click Add Custom Code
  4. Paste the script and select "Body - End"
  5. Apply to all pages and save

Squarespace

  1. Go to Settings → Advanced → Code Injection
  2. Paste the script in the Footer section
  3. Save changes

Webflow

  1. Open your Webflow project
  2. Go to Project Settings → Custom Code
  3. Paste the script in the Footer Code section
  4. Publish your changes

Custom HTML/Static Sites

Simply add the script tag before the closing </body> tag in your HTML files. For multi-page sites, you may want to include it in a footer template or partial that's shared across all pages.

Advanced Usage

Programmatic Initialization

For advanced use cases, you can initialize the widget programmatically:

<!-- Programmatic API -->
<script>
window.ChatWidgetConfig = {
  clientKey: 'YOUR_CHATBOT_ID',
  mode: 'floating',
  position: 'bottom-right',
  theme: 'light',
  apiEndpoint: 'API_ENDPOINT_URL',
};
</script>
<script async src='https://helloaivy-widget.vercel.app/chat-widget.js'></script>

This approach gives you more control over the initialization and allows you to dynamically configure the widget based on runtime conditions.

Single Page Applications (SPAs)

For SPAs built with React, Vue, Angular, etc., you can load the widget in your root component or layout:

// React Example
useEffect(() => {
  const script = document.createElement('script');
  script.src = 'https://helloaivy-widget.vercel.app/chat-widget.js';
  script.async = true;
  script.setAttribute('data-chatbot', 'YOUR_CHATBOT_ID');
  document.body.appendChild(script);

  return () => {
    document.body.removeChild(script);
  };
}, []);

Performance Optimization

The widget is designed for optimal performance:

  • Asynchronous Loading: The async attribute ensures the script doesn't block page rendering
  • Lazy Loading: The chat interface only loads when the user interacts with the button
  • Small Bundle Size: The initial script is minimal (~5KB gzipped)
  • CDN Delivery: Served from a global CDN for fast loading worldwide

Troubleshooting

Widget Not Appearing

  1. Check that the script tag is placed before the closing </body> tag
  2. Verify your chatbot ID is correct
  3. Check the browser console for any error messages
  4. Ensure JavaScript is enabled in the browser
  5. Check for Content Security Policy (CSP) restrictions

Style Conflicts

The widget uses Shadow DOM for complete style isolation, which prevents CSS conflicts with your website. If you're experiencing style issues:

  1. Check that you haven't disabled Shadow DOM in your browser
  2. Verify that your site's CSS isn't using !important rules that might affect the widget button
  3. Try customizing the widget colors using the data-primary-color attribute

Script Loading Issues

If the script fails to load:

  1. Check your network connection
  2. Verify the script URL is correct
  3. Check for browser extensions that might block scripts
  4. Try disabling ad blockers temporarily

Security Considerations

  • The widget script is served over HTTPS
  • All API communication is encrypted
  • User data is handled according to GDPR standards
  • No third-party tracking scripts are included

Next Steps

  • Customization Guide - Learn how to customize the widget appearance
  • WordPress Installation - Alternative installation method for WordPress sites

Support

If you need assistance with the installation, please contact our support team through the HelloAivy dashboard.

  1. Quick Start
    1. Step 1: Get Your Script Tag
    2. Step 2: Add to Your Website
    3. Step 3: Verify Installation
    4. Widget Modes
    5. Customization Options
    6. Platform-Specific Instructions
    7. Advanced Usage
    8. Performance Optimization
    9. Troubleshooting
    10. Security Considerations
    11. Next Steps
    12. Support