Live and development snippet reference
You'll know which snippet to use on your live or staging site, how each handles drafts and analytics, and how to check that RightMessage is installed.
Updated
View as MarkdownUse this page to choose the right snippet for your website and understand what happens when it runs. The snippet loads RightMessage, checks visitor conditions, shows eligible widgets, applies your selected configuration, and records supported activity when analytics is on.
You'll find your code in Project settings > Website & install, under Install snippet. Each project's snippet contains its own public project ID.
Choose the live or development snippet
Live site is selected by default. Switching to Staging & development changes the code you can copy. It doesn't change code you've already installed or publish your project. Choose Copy in the code window to copy the snippet.
| If you're installing on… | Choose | Configuration it loads | Analytics |
|---|---|---|---|
| Your public website | Live site | Your last published project configuration | On unless you disable it separately |
| A staging or local development site | Staging & development | Your latest changes, published or not, through a draft debugger session that needs authorization | Off |
Never add the staging snippet to your live site.
The development snippet adds these settings before the normal loader:
useDraftConfig requests the draft debugger. Authorize it with your RightMessage account to load your draft. If the draft request fails, RightMessage keeps the published configuration. Check which configuration the debugger loaded.
disableAnalytics turns off analytics recording whether or not draft access succeeds. A development visit won't update your installation status.
The debugger keeps its visitor state separate and simulates RightMessage's email-platform writes, form submissions, and webhooks. To check that a contact really updates, use an approved published test path outside the debugger. Links, redirects, and your own custom code can still run in the debugger, so use approved test data and destinations. See testing your changes.
After Exit Debugger, that tab ignores the development snippet's draft request and uses the published configuration until you explicitly open another debug or preview session.
Where to put the snippet
Put the full snippet in the <head> of every page where you want RightMessage to run, as the first script, before Google Tag Manager, the Meta pixel, the Google tag, or any other tag. A site-wide custom-code setting covers pages that share it. Standalone landing pages, subdomains, and pages served by another platform may need their own installation.
The loader requests your project script asynchronously. It also adds visibility rules for RightMessage's cloaking controls. A tag manager adds its own loading and tag-firing delay before RightMessage runs. Direct head installation is preferable if late loading makes an original headline appear before its personalized version.
Asynchronous loading still has a performance cost. Your website, connection, configuration, and other scripts affect it. Measure your own page if performance is a concern.
Use one installation method per page. Combining a plugin, theme injection, and a tag-manager tag can load the snippet more than once.
For the steps, see getting started, Google Tag Manager, or your website platform.
Link parameters the snippet removes
Some links that bring visitors to your site carry RightMessage parameters: _rm, the visitor context a redirect or offer link adds, and the email-link identifiers in your email platform's guide, such as rm_ac or rm_kl. The snippet takes these out of the address bar and hands them straight to RightMessage, before your other tags read the page's URL. Your analytics and ad platforms don't receive them in page URLs. That only works when the snippet is the first script in the <head>.
It removes _rm, rm_ac, rm_bh, rm_braze, rm_cio, rm_en, rm_hs, rm_ic, rm_isoft, rm_kl, rm_mc_id, rm_ml, rm_ontraport, and rm_pt. Everything else stays in the address exactly as it was, including email, UTM parameters, and identifiers that belong to another platform's own scripts, such as ck_subscriber_id or _kx.
If Website & install says "After your next publish, copy this snippet again", your project hasn't published since this arrived, and the snippet it shows doesn't remove them yet. Publish, then copy the snippet again and replace the one on your site. A snippet you installed earlier keeps working. RightMessage still removes _rm once it loads, but by then other tags may have read it.
With Google Tag Manager, the parameters come out only when the container fires the RightMessage tag, so tags that fire before it can still read them.
Other platform installation choices
The platform guides use one main installation method. These alternatives let you cover a smaller or larger set of pages. Use one method per page so the snippet doesn't load twice.
ClickFunnels funnels and individual pages
For one funnel, open Funnels and select the settings icon beside it. Paste the snippet into Head Code, then choose Update Funnel. This covers that funnel's pages, not every funnel in your workspace.
For one page, open its editor and choose Settings > Tracking Code. Paste the snippet into Header Code and save. Repeat only for other pages you want to cover.
Use either method instead of the site-wide installation. Saving tracking settings and publishing a new page are separate from publishing changes in RightMessage.
Instapage variations and workspace scripts
For one variation, open it in the builder and choose JavaScript in the right sidebar, then Header. Add the JavaScript without its outer script tags, save, and publish. The Cookie Bar doesn't automatically control this location, so don't use it to bypass required consent.
For several pages, follow Instapage's Workspace Scripts instructions (opens in a new tab) to assign a shared script. Remove overlapping page or variation copies when you switch methods.
Kajabi individual pages
Instead of using Header Page Scripts, find the page under Website and choose Customize. In the builder, open Settings > Custom Code.
Paste only the JavaScript inside the snippet into Custom JavaScript. Remove the HTML comment and the opening and closing script tags. Choose Save and publish the page if it isn't live yet.
This covers only that page. Don't combine it with the site-wide copy.
Squarespace individual pages
Instead of site-wide code, open Pages, hover over the page, and choose its settings gear. Open Advanced, paste the snippet into Page Header Code Injection, and save.
This covers only the selected page. Don't combine it with the site-wide copy. Squarespace 7.0 has template-specific limits, including Index landing pages. Check the code injection guide (opens in a new tab) for your template.
Unbounce custom domains
Script Manager requires a custom domain. It can't add scripts to Unbounce's test domain. Use the page-level installation for that domain or when you don't want broader coverage.
- In Unbounce, open Settings > Script Manager.
- Choose Add a Script, then Custom Script, and name it
RightMessage. - Open Add Script Details and set Placement to Head.
- Under Included on, choose Main Landing Page. Add other locations only if you want RightMessage there too.
- Paste the snippet and select your custom domains under Script Usage.
- Choose Save Changes and check that the script is enabled.
Script Manager covers pages on those domains, including new pages published there. It doesn't cover unrelated domains in the account. If you're replacing page-level copies, remove them and republish those pages to avoid duplicates. See Unbounce's Script Manager guide (opens in a new tab).
Webflow individual pages
Instead of the site-wide installation, open that page's Page settings in the Designer. Under Custom code, paste the snippet into Inside <head> tag. Save and publish the site.
This code covers only that page and loads after site-wide custom code. Don't add it if Head code already contains RightMessage. Webflow's custom-code guide (opens in a new tab) covers both locations.
Wix selected pages
Use Choose specific pages instead of All pages, without adding a second all-pages copy. Site-wide installation is preferable when people can arrive on different pages and navigate between them.
How widget embed code differs
The project snippet loads RightMessage. An Embedded widget's embed code marks where it belongs inside your page content. You need both for an Embedded widget.
An embed shortname belongs to a widget, not a project. The widget also needs a linked flow or offer, the right enabled state, and targeting that lets it appear. Build a resource recommendation in the app introduces flows and widgets.
WordPress embedded placements
The WordPress plugin's Default Embedded Widget field accepts an Embedded widget's shortname and appends its placement to individual posts and pages. Leave it empty if you want to choose each location yourself.
For a selected location, add this shortcode to your WordPress content:
The example name is for WorkForge (opens in a new tab). Replace it with your widget's exact Shortname, then publish or update the content. The shortcode adds a placement. It doesn't create or publish a flow.
Check when RightMessage last received data
The top of Website & install shows your installation status:
| Status | What it means |
|---|---|
| RightMessage is installed | Data has arrived recently. It says when data was last received. |
| Waiting for your first pageview | No data has arrived yet. Add the live snippet and load any page. The status checks again by itself. |
| No data for a number of days | Data used to arrive but has stopped. Check the snippet is still on every page of your site. |
| We couldn't check your install | The status couldn't load. Nothing was changed. Try again in a moment. |
While no recent data has arrived, choose Check now to check again. Use the status to check that data is coming through. Use the debugger to inspect the visitor's path and visible widgets, and check your email platform to confirm a contact update. A development visit with analytics disabled won't update the status.
Hidden content while the snippet loads
Elements with the class rmcloak stay hidden until RightMessage decides what each visitor sees. If RightMessage hasn't loaded after 3 seconds, they show their original content. A snippet you installed earlier keeps the wait time it was copied with. Copy it again to use 3 seconds.
Find earlier published versions
Version history in Website & install shows when you last published. Open version history opens your project's saved versions, where you can restore one. See version history.
What the snippet knows about a visitor
RightMessage can use arrival parameters, visited pages, and survey answers before someone identifies themselves. Browser storage also affects remembered answers, dismissals, and other visitor state.
Connecting an email platform doesn't identify every browser. Supported forms, identifying email links, and integration-specific methods can establish who someone is. Installing the snippet alone doesn't watch every third-party form. Automatic identification needs its own supported setup, such as the optional Email Watcher or a Popup's form-submission trigger.
Contact fields and tags become available for targeting after the browser is identified. Another device needs its own identification event.
Answers in RightMessage, segments assigned to a visitor, and fields written to an email platform are separate records. See how visitor identification works and syncing contact data.
Consent and blocked scripts
The data RightMessage uses depends on your configuration, forms, integrations, and visitor activity. Review those choices with whoever manages your consent and privacy requirements. This page doesn't establish legal compliance for your site.
If JavaScript is off, or a browser, network rule, or extension blocks the snippet, RightMessage's browser-based features can't run normally. Keep your original page and important destinations usable without a widget.
Instead of having your consent tool block the snippet, you can turn on Wait for consent before tracking in Project settings > Privacy & data, under Cookie consent, and publish. Until the visitor accepts cookies:
- RightMessage stores nothing in the browser, runs no tests and sends no stats. Tests show Control.
- Stats and analytics events from the current page are held. If the visitor accepts, they're sent; if they decline, they're discarded.
- Form submissions, email platform lookups, webhooks and email steps still run.
RightMessage reads TCF v2.2 consent banners and Google Consent Mode (analytics_storage, and personalization_storage when set) on its own. It only reads Consent Mode and never changes it. For any other banner, call RM.push(['consent', 'grant']) or RM.push(['consent', 'deny']) when the visitor decides.
If you use RightMessage Edge, update to @rightmessage/cloudflare or @rightmessage/next 0.3.0 or later and redeploy before you turn this on. Older Workers stop personalizing the site until they're redeployed. See use RightMessage with a cookie banner.
For installation, publishing, targeting, or saved-browser-data problems, use installation troubleshooting. Open Debug on site for an authorized debugger session. A query parameter alone isn't an installation test.