Platform Setup3 min read

How to Add FloatMessage to a Custom HTML Site

If you're building your own website with HTML, a static site generator, or any framework - adding FloatMessage takes one line of code. This guide covers the simplest possible setup.

1

Sign up and create your first message

Go to floatmessage.com/login and sign in with Google. You'll get a 30-day free trial with full access - no credit card required.

In the dashboard, click Messages in the sidebar, then New Message. Pick a template, customize it, and save.

FloatMessage dashboard showing the message editor with template selection and HTML/CSS editing
Create and customize your message in the dashboard
2

Copy your embed code

Go back to your Dashboard home page and copy the embed snippet shown there.

FloatMessage dashboard showing the embed snippet with User ID
Copy the embed snippet from your dashboard
3

Paste the script before the closing body tag

Open your HTML file and paste the snippet just before the closing </body> tag:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Website</title>
</head>
<body>
    <h1>Welcome to my site</h1>

    <!-- FloatMessage -->
    <script src="https://floatmessage.com/embed/floatmessage.js?userId=YOUR_USER_ID" defer></script>
</body>
</html>

That's it - one line of code and FloatMessage is running on your site.

Tip: The defer attribute ensures the script loads without blocking your page. Your site's performance won't be affected.
4

Add the embed script

Add your account ID via the ?userId= query parameter. The script will automatically load every active floating message and the live chat widget for your account - you don't need to manage individual message IDs. Already installed with data-user? Still works.

<script src="https://floatmessage.com/embed/floatmessage.js?userId=YOUR_USER_ID" defer></script>
Tip: Find your user ID in the FloatMessage dashboard under Setup. Add or edit messages anytime — the same script tag picks them up automatically.
5

Open your site and verify

Open your HTML page in a browser. Your floating message should appear based on the trigger you configured (immediately, on scroll, after a delay, or on exit intent).

Note: If you don't see anything, make sure the message is set to Active in the FloatMessage dashboard and that the trigger conditions are met.
Tip: For multi-page sites, add the same script tag to every page - or include it in a shared layout/template file so it loads everywhere automatically.