RightMessage
Google Tag Manager logo
Analytics integrationAnalytics Platform

Use your Google Tag Manager dataLayer in RightMessage, no code required.

RightMessage is a personalization platform with built-in A/B testing. It reads the values and events your site already pushes to window.dataLayer, so you can target visitors by a plan or cart value, open a widget when an event such as purchase fires, and show dataLayer values in your text. When you turn on the Google Tag Manager app, it also pushes an rm_experience_impression event for every version of every test.

Start here

Use the container you already have.

RightMessage reads window.dataLayer without changing it, and pushes its test impressions to the same array. You decide which tags fire from it.

What RightMessage does with your dataLayer.

Target visitors by dataLayer values and events

Choose Google Tag Manager in the condition picker for segments, widget targeting, campaign audiences and flow conditions. A Data layer value condition reads a dot path such as user.plan or ecommerce.value, merged the way GTM merges pushes, and compares it as text, as a number (greater or less than), or checks that it's set.

A Data layer event condition checks whether an event such as purchase or form_submit has or hasn't fired on this page view or this session, optionally with a key in the same push, such as form_id equals newsletter. gtag('event', ...) calls count too. Pushes from before and after RightMessage loads both count, and conditions are checked again as new pushes arrive.

Open widgets on a Tag Manager event

Popups, full-screen takeovers, bars and toasters can appear When a Google Tag Manager event fires, optionally only when a key in the push has a certain value. The widget shows once per page, including for a push made before RightMessage loaded.

Merge text reads the same values: {{ datalayer.user.plan }} in a headline, or {% if datalayer.ecommerce.value > 50 %} to change what a flow says.

Send A/B test impressions back to the dataLayer

Turn on the Google Tag Manager app and RightMessage pushes event: rm_experience_impression each time it counts a visitor in a test version. The push includes exp_variant_string (RM-<experienceId>-<variantId>), rm_experience_id, rm_experience_kind, rm_experience_name, rm_variant_id, rm_variant_name, rm_campaign_id and rm_resource_id, with null for keys that don't apply.

Impressions come from question, form, offer and flow split tests, campaign holdbacks and A/B tests.

How to set up Google Tag Manager with RightMessage.

  • Reading the dataLayer needs no setup. In any condition editor, choose Google Tag Manager, then Data layer value or Data layer event.
  • To open a widget on an event, go to Display, then When it appears, and choose When a Google Tag Manager event fires. Enter the event name your site pushes, such as purchase.
  • In merge text, use datalayer. followed by the dot path, such as {{ datalayer.user.plan | default: 'there' }}. The data picker has examples in its Google Tag Manager dataLayer section.
  • To send test impressions, open Integrations, find the Google Tag Manager card and click Enable, then publish. In Tag Manager, create a Custom Event trigger for rm_experience_impression and Data Layer Variables for the keys you need.

Frequently asked questions.

Do I need to change my Tag Manager setup to target by dataLayer values?+

No. RightMessage reads window.dataLayer directly, the same way a GTM Data Layer Variable does. Later pushes replace earlier values for the same key, and both pushes made before RightMessage loads and pushes made after it count. It doesn't change what's in your dataLayer.

Can a popup open when a GTM event fires?+

Yes. Choose When a Google Tag Manager event fires for a popup, full-screen takeover, bar or toaster, and enter the event name, such as purchase or form_submit. You can also require a key in the same push to equal a value. The widget shows once per page, and its targeting rules still apply.

Do gtag.js events count?+

Yes. gtag('event', 'purchase') counts the same as dataLayer.push({ event: 'purchase' }) for event conditions and the event trigger.

What event name does RightMessage push for test impressions?+

rm_experience_impression. It is deliberately different from GA4's experience_impression, so a page that runs gtag.js and a GA4 tag in Tag Manager doesn't count one impression twice. A key with no value is pushed as null.

Need detailed setup instructions? Read our Google Tag Manager setup guide →
Ready to launch?

Start personalizing your Google Tag Manager experience.

Keep Google Tag Manager in place and add personalized copy, proof, forms, and offers without rebuilding your site.