Skip to content
Sign inRequest access

Targeting rules

Targeting decides who sees your launcher and when. Without it, the widget shows on every page carrying the snippet. With it, you scope the widget to the pages, devices and audiences that matter, and you cap how often the same visitor is prompted. Rules are evaluated in the browser, in the widget’s isolated scope, before it mounts; if nothing matches, the widget never renders — no launcher and no panel drawn on your page.

Open your project and go to Widget → Snippet, where the display rules sit alongside the install snippet. Inputs are validated on save: an empty rule value is dropped, and N must be a positive integer. An invalid save never replaces your prior valid configuration, and changes take effect on the next widget load, not on sessions already open.

The widget renders only when all configured categories are satisfied at once: a matching URL group AND an allowed device AND an allowed audience AND under the frequency cap.

Page URL

Match the current page with operators like starts with and contains. This is the most-used control: scope the widget to /checkout, exclude /admin, and so on.

Device class

Limit to any of desktop, tablet, mobile. Inferred in the browser from the user agent and viewport width.

Audience

everyone, or identified: only visitors the host page has identified with an email.

Frequency cap

How often the same visitor is prompted: always, once, at most N times, or re-show after N days. Tracked in the visitor’s own browser.

Each URL rule is an operator plus a value. The five operators:

Operator Sense Matches when the full URL… Value to type
starts_with positive begins with the value the full URL, host included
contains positive contains the value anywhere a fragment, e.g. /checkout
exact positive equals the value exactly the full URL, host included
is_not negative is not exactly the value the full URL, host included
not_contains negative does not contain the value a fragment, e.g. /checkout

How rules combine. Positive operators (starts_with, contains, exact) are OR’d: the widget shows if any positive rule matches, so adding a positive rule only widens reach. Negative operators (is_not, not_contains) are AND’d and evaluated first: every negative rule must hold, so any failed negative suppresses the widget. This lets a negation reliably carve out an exception even when a positive rule would otherwise match. With only negative rules defined, the widget shows everywhere except the excluded paths. With no URL rules at all, it shows on every embedding page.

What the value is compared against. Every operator matches against the whole address-bar URL — scheme, host and path together, as in https://shop.example.com/checkout — never the path on its own. contains and not_contains scan that whole string for the value anywhere inside it, so a path fragment such as /checkout is all they need. starts_with, exact and is_not anchor to the beginning of that same string, so a value that starts with / can never match a URL that starts with https://. Give those three the full URL, host included.

Normalization. Matching is predictable: the URL is lowercased, the #fragment is dropped, and the query string is ignored unless the rule value itself contains a ?. So a contains /checkout rule matches /Checkout?ref=email, but a rule value of /checkout?step=2 is compared against the URL including its query.

Only on the checkout flow
starts_with https://shop.example.com/checkout
The same, across every host you deploy to
contains /checkout
On product pages, but never the printable variant
contains /products/
not_contains /print
Everywhere except the admin area
not_contains /admin

Select any combination of desktop, tablet and mobile. Selecting none is treated as all devices (the default).

Device class is decided in one pass, in this order. The user agent is checked first: iPad, PlayBook, Silk, or the string Tablet anywhere in it — or Android without Mobile — reads as tablet; iPhone, iPod, Windows Phone, Mobi, or Android with Mobile, reads as mobile. If the user agent says nothing recognisable, the width of the browser window decides — under 768 px is mobile, 768–1023 px is tablet, and 1024 px or wider is desktop. Only when that width cannot be read at all is desktop assumed.

Desktop only
devices: desktop

Set the audience to everyone (the default, which never suppresses) or identified. With identified, the widget renders only when the host page has supplied an email through the identify API — custom data on its own does not make a visitor identified. With no email the widget stays hidden; it fails toward not showing rather than guessing.

The frequency cap stops the same visitor being nagged on every page view. It has a mode and a number N:

Mode Behavior
always No cap: show every time (default).
once Show once per visitor, then never again in that browser.
count Show at most N times per visitor.
days Re-show only after N days once the visitor sent a report or closed the tool.

How the count advances. For once and count, an exposure is counted each time the widget is eligible and shown. For days, the timer is set by an interaction (the visitor either sends a report or backs out of the capture tool), and the widget stays suppressed until N days pass.

Where state lives. The cap is tracked entirely in the visitor’s browser local storage, scoped per project (an md_freq_<key> entry holding the exposure count and last-interaction time). It is never sent to uMarker. This is an accepted, browser-local limitation: clearing storage, switching browsers or devices, or private mode resets the cap. If local storage is unavailable, the widget degrades to no cap (it may show every time) rather than erroring or blocking your page.

Suppose you want feedback from signed-in desktop users on the checkout flow, at most once each:

  1. URL rule: starts_with https://shop.example.com/checkout — the full URL, because starts_with matches from the front of the address bar (a bare /checkout would match nothing).

  2. Devices: select desktop only.

  3. Audience: identified — and push the identity from an inline script, so it is in place before the config response arrives rather than after it.

  4. Frequency: mode once.

Now a signed-in visitor who classes as desktop — no phone or tablet user agent, and a window at least 1024 px wide — sees the launcher the first time they hit your checkout URL. An anonymous visitor, a phone, a tablet, a narrowed desktop window and the homepage get no launcher: every one of those decided in the browser, before anything is rendered.