Use RightMessage with a cookie banner
You'll make RightMessage wait for your visitors' cookie consent, connect it to your banner, and check what still runs before they accept.
Updated
View as MarkdownKeep RightMessage in step with your cookie banner, so nothing is stored in a visitor's browser and no tests or stats run until they accept cookies. Your banner keeps control, and RightMessage keeps the page working in the meantime. It works on every plan.
Turning this on doesn't decide what your site legally needs. Check that with whoever manages your privacy requirements.
What waits for consent
With Wait for consent before tracking on, until the visitor accepts:
- RightMessage stores nothing in the browser.
- It runs no tests. Visitors see Control in every A/B test and aren't counted.
- It sends no stats or analytics events. Those from the current page are held in page memory, then sent if the visitor accepts or discarded if they decline.
- It doesn't read text answers to fill other questions. Visitors can still answer, but nothing gets filled from what they write.
- It doesn't look up the visitor's contact in your email platform, even when they arrive from an identifying email link. RightMessage holds the ID from the link in page memory and looks the contact up as soon as the visitor accepts, on the same page. If they decline, it never does. This needs a publish after October 30, 2026; until then, your site reads contacts before consent.
These still run, because the visitor chose to use them: form submissions, the contact updates they send to your email platform, webhooks and email steps. Personalization still shows on the page, without being remembered between pages.
The exception is a flow's Redirect step or an offer link. When one of them sends the visitor to another page on the same hostname, such as from your quiz to its results page, RightMessage adds their answers and variables to the link, so that page can personalize on them. You don't need to set anything up. The link never holds their visitor or contact ID. The install snippet removes it from the address bar before your other tags read the page's URL, as long as it's the first script in the <head> and is the current version (see the snippet reference). RightMessage Edge reads it too. Links to another domain carry the same answers and variables when the Redirect step has Send subscriber data? on, and offer links always do. See carry visitor context across domains.
When a visitor declines, RightMessage keeps behaving as it did before consent. When they accept, tests apply from their next page. If they accept on a page they reached through one of those links, the answers and variables it carried are saved like any others.
1. Turn it on
- If you use RightMessage Edge, update to
@rightmessage/cloudflareor@rightmessage/next0.3.0 or later and redeploy first. Older Workers stop personalizing the site until they're redeployed. - Open Project settings (the gear at the bottom of the sidebar), then Privacy & data.
- Under Cookie consent, turn on Wait for consent before tracking.
- Publish your changes.
2. Connect your banner
TCF v2.2 banners: RightMessage reads the banner's __tcfapi on its own. It counts consent for purposes 1, 5 and 6, and consent or legitimate interest for purpose 8.
Google Consent Mode: RightMessage reads your gtag('consent', 'default' | 'update', …) entries on its own. Consent counts when analytics_storage is granted and personalization_storage isn't denied. RightMessage only reads Consent Mode. It never changes it.
Any other banner: call the consent command from your banner's accept and decline handlers:
Call it on every page where the banner reports a decision, or once when the visitor decides if your banner remembers it. Call RM.push(['consent']) without a decision to read the state: 'pending', 'granted', 'denied', or 'not_required' when the project doesn't wait. A command outranks TCF and Consent Mode for the rest of the page. See the JavaScript command reference.
If your banner blocks scripts until consent instead, RightMessage doesn't run at all before the visitor accepts, so personalization and forms wait too. Letting RightMessage load and wait for consent itself keeps them working.
3. Check it
- Open your site in a private window and don't answer the banner.
- Open the debugger. Its Consent row says "Waiting for cookie consent. Nothing is stored, tests show Control and stats wait in page memory."
- Accept cookies. The row changes to "Cookie consent given", with what decided it, such as "by the TCF consent banner" or "by Google Consent Mode".
Opening the debugger also excludes that browser from tests and stats, so use a separate private window for anything you want counted.
To check a redirect, use another private window without the debugger, because a debug session doesn't add answers to links. Don't answer the banner, finish the quiz, and check that the next page is personalized and the address bar no longer shows _rm.
Expect fewer visitors in your tests and stats after you turn this on, because visitors who don't accept aren't counted. Tests may take longer to reach a verdict.