Skip to content

HTML websites

You can add the floating PageClerk widget to any HTML site with two script tags. No framework or build step is required.

In your dashboard, open your chatbot’s Embed & Share tab and copy the snippet. It looks like this:

<script>
window.pageclerkConfig = {
chatbotId: "YOUR_CHATBOT_ID"
};
</script>
<script src="https://pageclerk.com/api/widget.js" defer></script>

Open your HTML file or global layout and paste the snippet immediately before the closing </body> tag:

index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Website</title>
</head>
<body>
<h1>Welcome to our website</h1>
<p>Content goes here...</p>
<!-- PageClerk Floating Chatbot Widget -->
<script>
window.pageclerkConfig = {
chatbotId: "YOUR_CHATBOT_ID"
};
</script>
<script src="https://pageclerk.com/api/widget.js" defer></script>
</body>
</html>

If you enabled domain security for the chatbot, your site’s domain (for example mywebsite.com) must be listed under Allowed domains in the chatbot settings, or the widget will refuse to load.

See the widget reference for the full pageclerkConfig shape.