Embed reference
Production script URL and attributes for the hosted Agentoll embed.
Script tag attributes
| Attribute | Required | Description |
|---|---|---|
src |
Yes | https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js |
data-publisher-id |
Yes | pub_... from registration |
data-api-base |
No | API origin (default: script URL origin). Use for local dev: http://localhost:8787 |
async |
Recommended | Non-blocking load |
Production snippet
<script
src="https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js"
data-publisher-id="pub_xxxxxxxx"
async
></script>
Plain HTML
Paste the snippet inside <head> on every page you want protected (or in a shared layout template).
Next.js (App Router)
In app/layout.tsx:
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<Script
src="https://agentoll-middleware-p5aon.ondigitalocean.app/v1/agent-toll.js"
data-publisher-id="pub_xxxxxxxx"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
);
}
Next.js (Pages Router)
In pages/_document.tsx, add the script inside <Head> with async.
WordPress / Webflow / Squarespace
- WordPress — use a header/footer injection plugin or your theme’s
header.php/ “Additional CSS & scripts” setting. - Webflow — Project Settings → Custom Code → Head Code.
- Squarespace — Settings → Advanced → Code Injection → Header.
Each platform’s docs call this “custom code”, “header injection”, or “site-wide header” — paste the same snippet there.