Integrating Hotspot into any website or web application takes less than a minute. Paste the script tag into your HTML
<head> and start watching live sessions.
1. Copy the Script Tag
Add this snippet to your HTML before the closing </head> tag. Replace YOUR_API_KEY with your site's public tracking key (e.g., from the Hotspot dashboard Sites & Setup tab):
HTML
<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>
Configuration Attributes
| Attribute | Required | Description |
|---|---|---|
src |
Yes | URL to hotspot.js served by your Hotspot server. |
data-api-host |
Yes | Base URL of your Hotspot instance where telemetry payloads are posted. |
data-api-key |
Yes | Site tracking key (e.g. hs_live_app_...). Isolates data per tracked website. |
defer |
Recommended | Ensures non-blocking asynchronous script loading so your initial page load is unaffected. |
2. Verify Live Connection
Once deployed, open your website in a browser tab and test the connection:
- Open your browser DevTools (
F12orCmd+Option+I) and switch to the Network tab. - Filter by
hotspot. You will seehotspot.jsreturn HTTP 200, followed by periodic/hotspot/batch/beacons returning HTTP 202. - Open your Hotspot dashboard and click the Realtime tab in the sidebar. You will see your active visit appear immediately on the global map and live event feed.