Skip to help content
RightMessage

Target domains, paths, and stable page elements

You'll choose which pages a change applies to and whether Smart Match or a CSS selector finds the element you want to change.

Available on the Scale and Pro plans.

Updated

View as Markdown

Use page and element targeting to change the right part of the right page. Page rules decide where a change applies. Element targeting decides what changes. Audience rules decide who can receive it.

For an agency headline on WorkForge (opens in a new tab), all three need to agree: the visitor matches the agency audience, the page matches the page rules, and RightMessage finds the headline.

Open the change's page rules

In the campaign editor, choose Edit, select an audience, and select the element you want to change. Open Pages in the element editor.

Page rules belong to that audience's change, not the whole campaign. They're available with both Smart Match and CSS selector targeting. Changing the starting URL of a campaign doesn't replace these rules.

Element editor Pages tab with domain, matching rule and page pathOriginal
Element editor Pages tab with domain, matching rule and page path

Each page entry has Domain, Match, and Page path. Choose Add page for another entry or Remove page to remove one. You must keep at least one entry. If any entry matches, the change can apply on that page.

Choose the domain and page path

If you'd like to…Enter this
Limit the change to one websitePut its hostname in Domain, such as workforge.rightmessage.com. Don't include https:// or a page path.
Allow any domainUse * as the entire Domain value. RightMessage still needs to be installed on the site.
Target one pageChoose equals under Match and enter its Page path, such as /pricing.html.
Target the homepageChoose equals and use / or an empty Page path.
Target a group of pagesChoose a matching option below, then enter the path or pattern.

A bare hostname and its www. version count as the same site. Other subdomains stay separate. Partial domain patterns such as *.example.com aren't supported.

Page path is the part of the URL after the hostname. Query strings and fragments aren't included. Put UTM-based visitor rules in audience conditions, not the page path or selector.

Match options

If you'd like the page path to…Choose
Match the entered pathequals
Be different from the entered pathdoes not equal
Include the entered textcontains
Not include the entered textdoes not contain
Begin with the entered textstarts with
End with the entered textends with
Match a pattern where * stands for any textglob

For example, glob with /solutions/* includes paths below /solutions/. glob with * includes every path on the chosen domain. Use glob, rather than equals, when entering a new wildcard pattern.

Path matching ignores letter case and normally ignores leading and trailing slashes. With contains or does not contain, putting slashes at both ends, such as /blog/, keeps those boundaries in the match.

A broad rule can make sense for a shared navigation link. Keep a pricing-page headline's rule narrow so the same selector doesn't change a headline on another page.

Use Smart Match

Set Target mode to Smart Match to find an element using the identifying details RightMessage recorded when you selected it. The selector shown underneath is a backup. This mode is unavailable when no identifying details have been recorded.

For a text element, the recorded wording appears above Text matching. Choose:

  • Exact match to match the full recorded text.
  • Contains to find text that includes the recorded wording.
  • Starts with to find text that begins with it.

Text matching ignores case and differences in whitespace. When several elements share the text, the saved selector helps identify the one you selected. Otherwise, RightMessage compares their appearance and surrounding structure to choose a match. If the recorded text is gone, it tries the saved selector instead.

For an image or another element without recorded text, Smart Match uses its other identifying details. Check the outline and preview to make sure it finds the intended element.

Use a CSS selector

Set Target mode to CSS selector, then enter the selector in CSS selector. A stable ID such as #hero-title works well for one headline. A shared class can match several elements. A selector based on position can break when the layout changes.

RightMessage uses the selector to find matching elements. It doesn't broaden an unmatched selector to a parent section.

Element editor Pages tab showing target mode and CSS selectorOriginal
Element editor Pages tab showing target mode and CSS selector

See Select stable page elements for personalization for click selection, the right-click menu, and adding a change by selector.

Check the pages your rules include

Open each intended page in the campaign editor and inspect the change. For a broad rule, also check a page you expect it to exclude.

Use Preview mode to check the audiences together. Then choose Preview on your site to check the unpublished change on your real website. The on-site inspector helps you confirm which element changed.

Element picker targeting the WorkForge pricing call to action with the debugger minimized, without saving or publishingOriginal
Element picker targeting the WorkForge pricing call to action with the debugger minimized, without saving or publishing

Check mobile and desktop layouts before publishing, and retest after a redesign.

Still need a hand?

Tell us what you’re trying to do and where you’re getting stuck.

support@rightmessage.com