Platform Setup4 min read

How to Add FloatMessage via Google Tag Manager

If you already use Google Tag Manager (GTM) to manage scripts on your website, you can add FloatMessage without touching your site's code. This guide walks you through setting up a Custom HTML tag in GTM.

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. You'll need this in the next step.

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

Open Google Tag Manager

Log in to tagmanager.google.com and select the container for the website where you want to add FloatMessage.

4

Create a new Custom HTML tag

In the left sidebar, click Tags, then click New.

  1. Name the tag something descriptive, like FloatMessage Embed.
  2. Click Tag Configuration and choose Custom HTML.
  3. Paste the FloatMessage embed snippet into the HTML field:
<script src="https://floatmessage.com/embed/floatmessage.js?userId=YOUR_USER_ID" defer></script>
Tip: Replace YOUR_USER_ID with the actual User ID from your FloatMessage dashboard embed snippet. The embed reads ?userId= from the script src URL when GTM strips data-attributes, so this is a one-line install.

Need to scope to a specific domain workspace? Add &domain=site-a.com to the URL. To pin to an exact registered domain row use &domainId=DOMAIN_ID.

Older self-executing snippet (still works)

Before the embed accepted query-string params, the recommended GTM install was a self-executing script that injected the embed with a data-user attribute. That snippet is still supported:

<script>
  (function() {
    var s = document.createElement('script');
    s.src = 'https://floatmessage.com/embed/floatmessage.js';
    s.setAttribute('data-user', 'YOUR_USER_ID');
    s.async = true;
    document.head.appendChild(s);
  })();
</script>
5

Set the trigger to All Pages

Under the tag configuration, click Triggering and select All Pages. This ensures FloatMessage loads on every page of your site.

Note: If you only want FloatMessage on specific pages, create a custom trigger with a Page URL condition instead. For example, you can trigger only on pages matching /pricing or /checkout.
6

Save and publish

Click Save on the tag, then click Submit in the top right corner of GTM. Add a version name like "Added FloatMessage" and click Publish.

Tip: Use GTM's Preview mode before publishing to test that the tag fires correctly. You should see the FloatMessage script loading in the tag assistant.
7

Verify on your site

Open your website in a browser. Your floating message should appear based on the trigger you configured in the FloatMessage dashboard (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 GTM has finished publishing. It may take a few minutes for the new tag to go live.