Automatically segmenting by on-site behavior or available data

Below is a detailed overview of how to use RightMessage’s auto-segmentation to profile your visitors.

This guide is broken up into three parts:

  1. Why it’s important to think through the ordering and definition of your segments (the "impossible" segment)
  2. How to set up complex conditions
  3. The available segmentation rules, and how to use them

Beware of the "impossible" segment

On every page view, and for each Segment Group or Question you’ve created, RightMessage attempts to match your visitors into an available segment.

(We go into more detail about how this works here.)

This can often lead to unexpected consequences, especially when you've set up complex auto-segmentation rules.

Consider the following segment definition:

The user most likely is trying to say, "If someone lands on Page A or Page B, then I want to treat them as having arrived on a high-value landing page."

However, "All of the following are true" is selected, which means that RightMessage's segmentation engine is looking for something impossible – a visitor who arrived to your website on two separate pages.

We've also seen cases where incorrect segment ordering can lead to impossible segments.

In this example, we're checking to see if someone's a subscriber. If they are, we match them into the "Subscriber" segment and stop.

A subscriber who's visited the pricing page will never be matched into the correct segment, since the check for "Subscriber who has viewed pricing" can't ever be reached.

The fix here is simple: swap the order of the segments.

Setting up complex conditions

There will inevitably be cases where you'll want to place someone in a segment based on multiple conditions.

Each segment's conditions are made up of one or more condition groups.

And each condition group has one or more conditions within it.

The default behavior of a condition group is to ensure that all conditions within it match. For a visitor to be placed into the below segment, they'd need to have matched into the "Start A New Business" content category and be referred by Google.

By swapping "All of the following..." to "At least one...", the definition of this segment changes to either matching into the "Start A New Business" category OR having been referred to by Google.

And if multiple condition groups are added, if any of them match then the visitor will be matched into the segment in question.

Available segmentation rules in RightMessage, and how to use them

Updated: March 2025

Now that we've covered the importance of how you order your segments, along with how to set up various types of conditions, we'll now look at what data we have to work with:

Data from your email platform or CRM

Once you’ve successfully integrated with your email platform or CRM, we can segment visitors based on:

  • Whether they’re anonymous or a subscriber (i.e. if they’re in your contacts database or not)
  • Tags / Groups they belong to
  • Custom field / attribute / property values
  • Lists they’re subscribed to

These conditions will only ever match correctly when we're able to correctly associate the visitor with a contact in your email platform or CRM. While the person visiting your website might already be a lead of yours, RightMessage might not know that – and, therefore, they'd be treated as an anonymous visitor.

Here's how to set this up.

💡 Tip:

If you’ve already set up two-way synchronization then there’s no need to set up an auto-segmentation rule that queries for that custom field or property.

Referred by

No one (direct traffic)

This refers to visitors who arrived at your website directly, either by typing your URL in their browser, using a bookmark, or clicking a link from an email or document. These visits have no referral source information.

Any site (not direct traffic)

This captures all visits that came from external websites, including search engines, social media, or other referring websites. It excludes direct traffic but includes all other external sources that brought visitors to your site.

Specific domain

If an outside website sent somebody to your website, enter the domain name you’d like to match here.

Don’t include http:// or anything beyond just the domain itself.

Specific URL

This is similiar to segmenting by referring domain, but in this case you’re segmenting someone based on a specific page that sent them to your website.

💡 Tip:

If you dig into your analytics software, you’ll be able to see what domains consistently send you traffic.

It’s a good idea to catalog those domains and set up segments that target this traffic and personalize their experience based on the type of person who reads this website, or with social proof from the people behind the referring website.

On-Site Behavior

Original landing page

Here you can target the very first page RightMessage that someone visited on your website.

💡 Tip:

Search engines like Google no longer send over search keywords within the referring URL data, however knowing where someone first arrived on your website is the next best thing.

If someone first landed on /blog/how-do-I-start-a-bakery , you could probably safely assume that they don’t yet have a baking business.

Pages viewed

You can also segment visitors based on pages they’ve viewed, including the page they’re currently looking at.

Remember that RightMessage (re)segments on every page view. This means that segmentation that might be true right now (“Viewing the pricing page”) won’t be view a page view later, when they’re no longer viewing that page.

First-time visitor

If the visitor has never been to your site before (or, more specifically, RightMessage has never seen them), you can then segment first-time visitors.

Returning visitor

If someone has visited in the past, you can segment based off of:

  • Whether or not they’ve ever been to your site in the past (this)
  • If they have visited within the last X weeks/days/hours
  • If they have NOT visited within the last X weeks/days/hours

💡 Tip:

This is a great way to not only greet first-time visitors differently than everyone else, but it can also be used to diffuse heavy-hitting CTAs.

For example, if you only want to show a flashy CTA to someone if they haven’t been back in a while, that’s totally doable.

Other Segments or Questions

Additionally, “hybrid” segments can be created that combine multiple other segments in RightMessage.

This is useful if you want to create Personas or a Segment Group that calculates a quiz result from a series of questions asked within a Flow.

UTM parameters

Visitors can also be targeted based on standard UTM parameters:

  • utm_source
  • utm_medium
  • utm_campaign
  • utm_term
  • utm_content

💡 Tip:

Many customers who run sizable ad campaigns are using RightMessage to eliminate the need for hosting multiple landing pages. By driving paid traffic to a single landing page, and then are using RightMessage’s segmentation engine to segment them based on the UTM parameter data attached to the ad click to make the landing page truly one-off.

A great way to do this is to think in terms of the kind of campaigns you’re regularly creating. Say you regularly run campaigns on Facebook/AdWords targeting people who want to build strength, and they all include some variation of “strength” in the utm_campaign .

You could set up a rule that targets utm_campaign contains "strength"  to capture all current and future campaign variations (i.e. “strength-powerlift-dec-2020”)

Any other query string / URL parameters

Additionally, if you’re getting referral traffic that includes affiliate IDs or other details, you can segment visitors using these custom query string / URL parameters.

RightMessage

Current Widget

This only really makes sense to use within a Flow condition, but in some instances you might want to route to a different outcome based on the widget that's currently running the Flow. For example, you might want to show an exit popup-specific offer in your exit popup widget, but a standard offer to everyone else.

Location

You can segment visitors based on where they're accessing your website from. This is called geolocation.

Country

Allows you to segment visitors based on their country of origin, determined by their IP address. For example, you can create segments for users from specific countries like "United States" or "United Kingdom."

City

Enables filtering visitors based on their city location, also detected through IP address. This can be useful for targeting users in specific metropolitan areas or comparing engagement across different urban locations.

Date

Between dates

Allows you to set a specific date range for a people who visited your site in this period, using a start and end date (e.g., "Jan 1, 2025 - Jan 31, 2025"). It can be useful for tracking seasonality, or to ensure that an offer only runs during a promotional window.


Week day

Segments visitors based on the day of the week they're visiting your website.

Month

Segment visitors based on the current month.

Device

Operating System

Segments visitors based on their device's operating system (e.g., Windows, macOS, iOS, Android). This could be used to automatically promote your Android app to some, and iPhone app to others.

Browser

Filter visitors based on their web browser choice (e.g., Chrome, Safari, Firefox, Edge)

Browser data

Javascript variable

Some customers find themselves needing to pipe additional data into RightMessage.

Visitors can be segmented using data that you’ve exposed to your website via JavaScript variables. All that’s required is to attach the variables you want us to reference to the window  object wherever you want us to segment.

Let’s say you want to send into RightMessage some information about a user who’s logged in to your app. You could set up the following:

window.currentUser = {
  id: 123,
  email: "janedoe@gmail.com",
  onboardingStage: "activated",
  plan: {
    level: "gold",
    price: 29.99
  }
}

You could easily segment returning, signed in users of your app on your marketing site by drilling down into the currentUser  data.

  • currentUser.onboardingStage = "activated"  would target people who have activated
  • currentUser.plan.price > 20  would target people who are on a billing scheme that pays more than $20/mo

Cookies

You can also segment visitors based on the presence and/or the value of a browser cookie.


Local Storage

Segment based on data stored in the browser's localStorage.

💡 Tip:

If you’re using a 3rd party IP enrichment tool (like Clearbit Reveal), then this is how you’d integrate those products with RightMessage. Any data, regardless of where it comes from, that you want to push into RightMessage is fair game.

WordPress-specific data

If you’re using WordPress, you can also segment visitors based on:

  • Current page
  • Current post
  • Current post’s tags
  • Current post’s category
  • Favorite tag
  • Favorite category

If you’re curious about how we determine things like “Favorite tag” or “Favorite category”, you’re going to want to read through our WordPress set up guide.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us