synaptiq Live demo
  • How It Works
  • Pricing
  • Blog
  • FAQ
Log InStart Free Pilot
synaptiq

AI-powered sales agent that qualifies leads and books meetings autonomously.

Product
  • How It Works
  • Pricing
  • FAQ
Resources
  • Blog
  • Docs
  • API Reference
  • Embed Guide
Legal
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
2026 Synaptiq. All rights reserved.
Documentation
  • Quick Start Guide
  • Embed the Widget on Your Site
  • Configure Your AI Agent
  • Upload Your Knowledge Base
  • Test Your First Conversation
  • Understanding Your Dashboard Metrics
  • Managing Leads and Conversations
  • Using the Conversion Funnel
  • Exporting Data
  • Choosing a Theme
  • Customizing the Chat Icon
  • Position and Sizing Options
  • Custom CSS Overrides
  • Choosing an Industry Template
  • Customizing Qualification Criteria
  • Writing Effective Greeting Messages
  • Objection Handling Best Practices
  • Uploading Documents
  • Supported File Formats
  • How the AI Uses Your Documents
  • Testing Queries Against Your Knowledge Base
  • Calendar Setup (Cal.com / Calendly)
  • CRM Sync (HubSpot)
  • Webhook Configuration
  • Zapier / Make Integration
  • Authentication
  • Chat API
  • Leads API
  • Conversations API
  • Analytics API
  • Webhooks
  • Rate Limits and Error Codes
  • Code Examples
  • Plans and Pricing
  • Usage Metering
  • Managing Your Subscription
  • Invoices and Receipts
Docs/Getting Started/Embed the Widget on Your Site

Embed the Widget on Your Site

Add the Synaptiq chat widget to any website with a single script tag.

Embed the Widget on Your Site

The Synaptiq chat widget is a lightweight JavaScript snippet that loads asynchronously on your page. It does not affect page load speed, works on any website, and requires no build tools or dependencies.

The Basic Embed Code

Add the following script tag to any HTML page where you want the chat widget to appear. Place it just before the closing </body> tag:

<script
  src="https://synaptiqintel.com/widget.js"
  data-tenant="YOUR_TENANT_ID"
></script>

Replace YOUR_TENANT_ID with your actual Tenant ID, which you can find in the Synaptiq dashboard under Settings > General > Tenant ID. It looks like tn_a1b2c3d4e5f6.

Once added, a chat bubble appears in the bottom-right corner of the page. Visitors click it to open a conversation with your AI agent.

Data Attributes Reference

You can customize the widget's behavior using HTML data attributes on the script tag. Every attribute is optional except data-tenant.

| Attribute | Type | Default | Description | |-----------|------|---------|-------------| | data-tenant | string | (required) | Your unique Tenant ID | | data-position | string | "bottom-right" | Widget placement: "bottom-right", "bottom-left", "top-right", or "top-left" | | data-theme | string | "light" | Color theme: "light", "dark", or "auto" (follows system preference) | | data-greeting | string | Dashboard setting | Override the default greeting message for this specific page | | data-color | string | "#6366f1" | Primary accent color as a hex code | | data-delay | number | 0 | Delay in milliseconds before the widget appears after page load | | data-open | boolean | false | If "true", the chat window opens automatically on page load | | data-hide-launcher | boolean | false | If "true", hides the chat bubble (use the JavaScript API to open programmatically) | | data-page-context | string | none | Tell the AI what page the visitor is on (e.g., "pricing", "features", "homepage") so it can tailor the conversation |

Example: Fully Customized Script Tag

<script
  src="https://synaptiqintel.com/widget.js"
  data-tenant="tn_a1b2c3d4e5f6"
  data-position="bottom-left"
  data-theme="dark"
  data-greeting="Hi! Looking for pricing details? I can help."
  data-color="#0ea5e9"
  data-delay="2000"
  data-page-context="pricing"
></script>

This configuration places the widget in the bottom-left corner with a dark theme, sky-blue accent color, a pricing-specific greeting, and a 2-second delay before appearing.

Platform-Specific Instructions

Static HTML Sites

For plain HTML websites, paste the script tag directly into your HTML file:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Website</title>
</head>
<body>
  <!-- Your page content -->

  <!-- Synaptiq Widget -->
  <script
    src="https://synaptiqintel.com/widget.js"
    data-tenant="tn_a1b2c3d4e5f6"
  ></script>
</body>
</html>

If you want the widget on every page, add the script to your shared layout or footer template.

React and Next.js

For React-based applications, use the next/script component (Next.js) or a useEffect hook (plain React) to load the widget.

Next.js (App Router) — Recommended

Add the widget to your root layout so it appears on every page:

// app/layout.tsx
import Script from "next/script";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://synaptiqintel.com/widget.js"
          data-tenant="tn_a1b2c3d4e5f6"
          strategy="lazyOnload"
        />
      </body>
    </html>
  );
}

The strategy="lazyOnload" setting ensures the widget loads after the page is fully interactive, so it never blocks rendering.

Next.js (Pages Router)

Add it to your _app.tsx or _document.tsx:

// pages/_app.tsx
import Script from "next/script";
import type { AppProps } from "next/app";

export default function App({ Component, pageProps }: AppProps) {
  return (
    <>
      <Component {...pageProps} />
      <Script
        src="https://synaptiqintel.com/widget.js"
        data-tenant="tn_a1b2c3d4e5f6"
        strategy="lazyOnload"
      />
    </>
  );
}

Plain React (Vite, CRA, etc.)

Use a useEffect hook to inject the script at runtime:

// components/SynaptiqWidget.tsx
import { useEffect } from "react";

export function SynaptiqWidget() {
  useEffect(() => {
    const script = document.createElement("script");
    script.src = "https://synaptiqintel.com/widget.js";
    script.setAttribute("data-tenant", "tn_a1b2c3d4e5f6");
    script.async = true;
    document.body.appendChild(script);

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

  return null;
}

Then render <SynaptiqWidget /> in your app's root component.

WordPress

You have three options for adding Synaptiq to WordPress, from simplest to most flexible:

Option A: Use a Plugin (Easiest)

  1. Install the Insert Headers and Footers plugin (by WPCode) from the WordPress plugin directory
  2. Go to Code Snippets > Header & Footer in your WordPress admin
  3. Paste the Synaptiq script tag into the Footer section
  4. Click Save Changes

Option B: Edit Your Theme's Footer

  1. Go to Appearance > Theme File Editor in your WordPress admin
  2. Open footer.php from the right sidebar
  3. Paste the script tag just before the </body> tag
  4. Click Update File

Warning: Theme updates will overwrite your changes. Use a child theme or Option A to avoid this.

Option C: Add via functions.php

Add the following to your theme's functions.php file:

function synaptiq_enqueue_widget() {
    wp_enqueue_script(
        'synaptiq-widget',
        'https://synaptiqintel.com/widget.js',
        array(),
        null,
        true
    );
    wp_script_add_data('synaptiq-widget', 'data-tenant', 'tn_a1b2c3d4e5f6');
}
add_action('wp_enqueue_scripts', 'synaptiq_enqueue_widget');

Shopify

  1. From your Shopify admin, go to Online Store > Themes
  2. Click Actions > Edit code on your active theme
  3. Open the theme.liquid file under Layout
  4. Scroll to the bottom and paste the script tag just before </body>:
<script
  src="https://synaptiqintel.com/widget.js"
  data-tenant="tn_a1b2c3d4e5f6"
></script>
  1. Click Save

The widget will now appear on every page of your Shopify store, including product pages, the cart, and checkout (if your plan supports checkout customization).

Tip: If you only want the widget on certain pages, wrap it in a Liquid conditional:

{% if template == 'index' or template == 'product' %}
<script
  src="https://synaptiqintel.com/widget.js"
  data-tenant="tn_a1b2c3d4e5f6"
></script>
{% endif %}

Webflow

  1. Open your project in the Webflow Designer
  2. Go to Project Settings > Custom Code
  3. Paste the script tag into the Footer Code section:
<script
  src="https://synaptiqintel.com/widget.js"
  data-tenant="tn_a1b2c3d4e5f6"
></script>
  1. Click Save Changes
  2. Publish your site — Custom code only appears on the published site, not in the Webflow Designer preview

To add the widget to a single page instead of the entire site, open the page's settings (gear icon) and paste the script into that page's Before </body> tag field.

JavaScript API

The widget exposes a global window.Synaptiq object that you can use to control it programmatically. This is useful for opening the widget in response to a button click, passing visitor data, or triggering events.

Open and Close

// Open the chat window
window.Synaptiq.open();

// Close the chat window
window.Synaptiq.close();

// Toggle open/closed
window.Synaptiq.toggle();

Identify a Visitor

If you already know who the visitor is (they are logged in, or you captured their email in a form), pass that data to the widget so the AI agent does not ask for it again:

window.Synaptiq.identify({
  email: "jane@acme.com",
  name: "Jane Smith",
  company: "Acme Corp",
  plan: "Enterprise",
});

Identified visitors show up in your leads dashboard with pre-filled fields, and the AI agent adjusts its questions accordingly.

Set Page Context

Dynamically tell the agent what page the visitor is on:

window.Synaptiq.setContext({
  page: "pricing",
  product: "Enterprise Plan",
  referrer: "google-ads-campaign-q1",
});

The AI agent uses this context to tailor its opening message and qualification strategy.

Listen for Events

window.Synaptiq.on("lead:qualified", (lead) => {
  console.log("New qualified lead:", lead.email);
  // Fire your own analytics event, redirect, etc.
});

window.Synaptiq.on("conversation:started", () => {
  console.log("Visitor started a conversation");
});

window.Synaptiq.on("widget:opened", () => {
  console.log("Widget was opened");
});

Verifying the Installation

After adding the script tag, verify the widget is working:

  1. Open your page in a browser (clear your cache or use incognito mode)
  2. Look for the chat bubble in the corner you specified (default: bottom-right)
  3. Click the bubble and confirm the greeting message matches what you configured in the dashboard
  4. Open the browser console (F12 > Console) and type window.Synaptiq — if it returns an object, the widget loaded successfully
  5. Check the dashboard at /admin/conversations to confirm your test conversation appears

Common Issues

  • Widget not showing: Check for JavaScript errors in the console. Ad blockers and privacy extensions may block the script.
  • Wrong greeting message: The data-greeting attribute overrides the dashboard setting. Remove it if you want to use the dashboard greeting.
  • Widget shows on pages where you do not want it: Use conditional rendering (platform-specific examples above) or the data-hide-launcher attribute combined with the JavaScript API.

Next Steps

  • Configure Your AI Agent — Customize how the agent conversations and qualifies leads
  • Upload Your Knowledge Base — Give the agent product-specific answers
  • Test Your First Conversation — Validate the full flow end-to-end

Was this page helpful?

PreviousQuick Start GuideNextConfigure Your AI Agent