Production-ready integration recipes for all modern web frameworks and platforms.
Next.js (App Router)
In Next.js 13/14/15 using the App Router, add the <Script> component inside your root app/layout.tsx:
TypeScript / TSX (app/layout.tsx)
import Script from 'next/script'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<Script
src="https://hotspot.buxa.ai/hotspot.js"
data-api-host="https://hotspot.buxa.ai"
data-api-key="hs_live_YOUR_SITE_KEY"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
)
}
React SPA (Vite / CRA)
Add the script tag to index.html right inside the <head>:
HTML (index.html)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My Application</title>
<script
src="https://hotspot.buxa.ai/hotspot.js"
data-api-host="https://hotspot.buxa.ai"
data-api-key="hs_live_YOUR_SITE_KEY"
defer></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Vue 3 / Nuxt 3
Configure Hotspot in nuxt.config.ts:
TypeScript (nuxt.config.ts)
export default defineNuxtConfig({
app: {
head: {
script: [
{
src: 'https://hotspot.buxa.ai/hotspot.js',
'data-api-host': 'https://hotspot.buxa.ai',
'data-api-key': 'hs_live_YOUR_SITE_KEY',
defer: true
}
]
}
}
})
Shopify Stores
In your Shopify Admin, go to Online Store > Themes > Edit Code. Open layout/theme.liquid and paste the script directly above </head>.
Webflow Sites
In your Webflow Project Settings, go to Custom Code > Head Code, paste the script tag, and publish your project to production.