Install the widget

One script tag. No build step, no package to install, no framework integration.

The snippet

<script
  src="https://widget.minaya.ai/widget.js"
  data-site-key="your-site-key"
  data-api-url="https://api.minaya.ai"
  async
></script>

Copy the version with your real site key from Install & embed in the dashboard. Place it before the closing </body> tag.

Attributes

AttributeRequiredPurpose
srcYesWhere the script is served from (a CDN).
data-site-keyYesIdentifies your business. Public, but only works on allowlisted domains.
data-api-urlYesYour Minaya backend. Separate from src — the script and the API can live on different hosts.
asyncRecommendedKeeps the script from blocking page render.

data-api-url must point at your API, not the CDN serving the script. Pointing it at the CDN produces 403 on every request, because that host has no API.

Framework notes

Next.js

import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://widget.minaya.ai/widget.js"
          data-site-key="your-site-key"
          data-api-url="https://api.minaya.ai"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

WordPress

Paste the snippet into your theme's footer template, or use a “header and footer scripts” plugin. Adding it to a child theme keeps it through updates.

Shopify

Add it to theme.liquid just before </body>.

Single-page apps

The widget mounts once and persists across client-side navigation. Do not mount it per-route.

Domain allowlist

The widget only works on origins you list in the dashboard. Include every host visitors use:

https://example.com
https://www.example.com
https://staging.example.com

Origins are matched exactly, so example.com and www.example.com are different entries.

Troubleshooting

SymptomCause
403 on requestsOrigin not allowlisted, or data-api-url points at the CDN.
Nothing appearsScript did not load, or data-site-key is missing. Check the console.
Wrong coloursConfig is cached briefly; hard-reload after saving changes.
Widget behind other elementsRaise its z-index via Custom CSS.

Rotating your site key

Rotating invalidates the old key immediately and every existing embed stops working, so update your snippet in the same change.