> For the complete documentation index, see [llms.txt](https://help.usejimo.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.usejimo.com/docs/publish/target-specific-urls-domains-where.md). Agents can also search and read this documentation through its [MCP server](https://help.usejimo.com/docs/~gitbook/mcp).

# Where: target pages and devices

Choose the devices and pages an experience shows on: what a URL rule is matched against, the operators, the domain filter, trailing slashes and single-page apps.

**Where** sets the devices and the pages an experience shows on. It works on the part of the URL after the domain; the domain itself is the job of the environments you pick when you publish.

**You will have at the end:** URL rules that match the pages you mean, tested before you publish, and none of the usual surprises with trailing slashes, query strings or hash routes.

***

Open **Target & publish**, then **Where**.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2Fn94k1MOhHUuMmUxF1qpf%2FC-s03-where-open.png?alt=media&amp;token=01386b5d-b0fd-493f-b242-26076642e06c" alt="Where section open with Desktop, Tablet and Mobile under Devices, and Every page, One page or Pages matching rules under Pages"><figcaption></figcaption></figure>

## Devices

Tick **Desktop**, **Tablet** and **Mobile** as needed. A new experience is set to desktop only. You can tick several devices on the same experience. When the content needs a different copy or layout on small screens, duplicate the experience and adjust each copy for its device.

## Environment or Where

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2F5xvLYc9kb2Y9REoUqaWe%2FB-03-what-where-matches.png?alt=media" alt="In https://b2b.usejimo.com/pages/billing.html?tab=1#top, the host b2b.usejimo.com goes to the environment, and the path, query and hash go to Where"><figcaption></figcaption></figure>

| Part of the URL                  | Example                         | Decided by                                                                                                                                                                            |
| -------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Host                             | `b2b.usejimo.com`               | The environments, picked in **Publish to** when you publish. See [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md) |
| Path, query string, `#` fragment | `/pages/billing.html?tab=1#top` | The Where rules of the experience                                                                                                                                                     |

Write only the path in Where, and leave the domain to the environment. A Where domain filter that names a domain outside the selected environments matches nothing.

## Choose the pages

Under **Pages**, three options. For a tour that runs over several pages, Where sets the page it starts on.

| Option               | In the app                       |
| -------------------- | -------------------------------- |
| Every page           | All the pages of your app        |
| One page             | A single address                 |
| Pages matching rules | Addresses that follow your rules |

#### Every page

Every page where the Jimo snippet runs. For a tooltip, a hotspot or a hint pinned to an element, the experience still only shows where that element exists. If the element is not unique, every matching element on each page is targeted.

#### One page

One full address, such as `https://b2b.usejimo.com/pages/billing.html`. If you opened the builder on a page of your app, the field can come pre-filled with that address. The field cannot be left empty.

With **One page** and no address, the Where section shows **Add the page URL in Where to publish** and **Publish** stays disabled until you enter a full URL.

#### Pages matching rules

Up to 20 rules on the path, combined so that a page must match all of them or any of them, plus an optional domain filter. This is the option for a group of pages, for pages with ids in the URL, and for exclusions. Set it up as below.

## Write and test rules

Picking **Pages matching rules** opens the rules panel.

{% stepper %}
{% step %}

### Add the rules

Under **Rules**, choose whether a page must match **All rules** or **Any rule**. Pick an operator and type the value: for every page under `/products`, **Starts with** `/products`. Use **Add a rule** for more.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2FJAQOQq8I2YjumQLqP29n%2FK-s10-pages-matching-rules.png?alt=media&amp;token=bbc6c2c5-62f7-417d-b525-325b14176c05" alt="The Pages matching rules panel, with its rules and Test your URL"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Or generate them with AI

Click **Generate rules with AI** and describe the pages in plain words, such as "every project page, but not the settings". Jimo writes the rules, so you do not have to write a regex by hand. Read them before you keep them.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2F1RmGaJd5M2JTnVIyXh44%2FK-s11-generate-rules-with-ai.png?alt=media&amp;token=1512b362-be72-4cf7-9033-fb071cd01976" alt="Generate rules with AI in the Pages matching rules panel"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Narrow to some domains, if needed

Most of the time the environment already sets the domains and the filter stays empty. When the rules must only run on some hosts, click **Add domain** under **Domains**, see [The domain filter](#the-domain-filter). With generated rules, also set the domain, so that they stay on the right site.
{% endstep %}

{% step %}

### Test your URL

Type a full address in **Test your URL**. Jimo tells you whether the experience shows there and which rule matches, for example *shows on this page: its URL starts with /settings.* Test the pages where the experience must show, and the pages where it must not. Then click **Save**.
{% endstep %}
{% endstepper %}

## What a rule is matched on

A rule is compared with everything after the domain: the path, the query string and the `#` fragment together.

| The user is on                | `equals /pages/billing.html` | `starts with /pages/billing` | `contains billing` |
| ----------------------------- | ---------------------------- | ---------------------------- | ------------------ |
| `/pages/billing.html`         | Match                        | Match                        | Match              |
| `/pages/billing.html?tab=1`   | No match                     | Match                        | Match              |
| `/pages/billing.html/`        | No match                     | Match                        | Match              |
| `/pages/profile.html#billing` | No match                     | No match                     | Match              |

#### Trailing slash

Many apps add a `/` at the end of the URL. An `equals` rule then fails. Use `starts with`, or a regex that accepts both: `^/pages/billing\.html/?$`.

#### Query strings

`equals /` matches the home page only without parameters, not `/?tab=1`. Use `starts with`, or `matches regex` `^/(\?.*)?$` for the home page with any query string.

#### Hash-routed apps

In an app whose screens live after `#`, such as `/#/projects/123`, the fragment is part of what the rule reads. Target it like any path: `starts with /#/projects/`.

## Operators

| Operator                                 | Matches when the address after the domain | Use it for                                        |
| ---------------------------------------- | ----------------------------------------- | ------------------------------------------------- |
| **Equals** / **Doesn't equal**           | is exactly the value                      | One page without parameters                       |
| **Starts with** / **Doesn't start with** | begins with the value                     | A section of the app, `/settings`                 |
| **Ends with** / **Doesn't end with**     | ends with the value                       | A file or last segment, `.html`                   |
| **Contains** / **Doesn't contain**       | holds the value anywhere                  | A keyword, exclusions                             |
| **Matches regex**                        | matches the regular expression            | Ids, "something after a prefix", several variants |

The **Doesn't** operators exclude. Combine a positive rule with a **Doesn't** rule and match all of them: **Starts with** `/pages/` and **Doesn't contain** `/sign-in`. Every other operator can also be written as a regex.

#### Variable parts of a URL

Ids and other variable parts of a URL go in a `matches regex` rule: the other operators read the value as plain text.

| You want to match                      | Rule                    | Matches                                     | Does not match                        |
| -------------------------------------- | ----------------------- | ------------------------------------------- | ------------------------------------- |
| Any user profile, `/user/<id>/profile` | `^/user/[^/]+/profile$` | `/user/42/profile`                          | `/user/42/settings`                   |
| An article in any category             | `^/blog/[^/]+/article`  | `/blog/108/article`, `/blog/tuto_1/article` | `/article108`, `/blog/article/tuto_1` |
| A blog post by year and month          | `^/blog/\d{4}/\d{2}/`   | `/blog/2026/10/launch`                      | `/blog/latest`                        |

#### Regex you will reuse

| Need                                                     | Rule                                            |
| -------------------------------------------------------- | ----------------------------------------------- |
| A record page, any id: `/projects/123`                   | `matches regex` `^/projects/[^/]+$`             |
| At least one segment after a prefix, not the bare prefix | `matches regex` `^/#/enrich/product/.+`         |
| The same page with or without a trailing slash           | `matches regex` `^/pages/billing\.html/?$`      |
| A page with any query string                             | `matches regex` `^/pages/billing\.html(\?.*)?$` |

`starts with /#/enrich/product/` also matches `/#/enrich/product/` itself. Use the regex with `.+` when the page must have something after the prefix. Escape a literal dot as `\.`.

<details>

<summary>Regex basics</summary>

A regular expression describes a pattern instead of a fixed text. The pieces you need most:

| Piece       | Means                                     |
| ----------- | ----------------------------------------- |
| `[a-z]`     | Any one letter between a and z            |
| `[^/]+`     | One or more characters that are not a `/` |
| `\d`        | Any digit                                 |
| `a+`        | One or more `a`                           |
| `.+`        | One or more characters of any kind        |
| `^` and `$` | The start and the end of the address      |

A vertical bar means "or": `(ape|bee)` matches `ape` or `bee`.

To learn and test patterns: [ihateregex.io](https://ihateregex.io/) and [Rubular](http://rubular.com/). Then check the rule in **Test your URL**.

</details>

## The domain filter

With Pages matching rules, the domain filter narrows the rules to some hosts. Most of the time the environment already does this, and the filter stays empty. A typical use: the same rule on two sites, such as `blog.yourapp.com` and `test.yourapp.com` in the domain filter with `starts with /article_` as the rule, for every article on both.

* Write the host only: `app.acme.com`, `localhost:3000`. A full URL with `https://` or a path never matches.
* Several domains: add one entry per domain.
* The `www.` of the page is ignored: write `acme.com`. This rule is for the Where domain filter only. The **Domains** field of an environment is a different field with its own rule: there, a `www.` prefix is part of the host, see [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md#what-the-domains-field-accepts).
* An entry with regex characters is read as a regular expression: `\.acme\.com$` for every subdomain.
* With Every page or One page, the domain filter is ignored.

<details>

<summary>Best practices and common cases</summary>

* **Map the journey first.** List the pages where users need help, then write rules for those pages only.
* **Start broad, then refine.** A `starts with` on a section is easier to keep right than ten `equals` rules. Narrow it once you see how users move.
* **Keep broad targeting for broad news.** A general announcement can run on every page.
* **Review the rules when your app changes.** A renamed route silently stops matching.
* **A step on another page?** Rules decide where an experience starts. For a tour that moves across pages, the step before takes users to the next page, see [Tours across several pages](https://help.usejimo.com/docs/experiences/tours-and-modals.md#tours-across-several-pages).

| Case                                         | What to do                                                                                                |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Users at a given stage, onboarding, checkout | Rules on the paths of that stage                                                                          |
| Two URLs that differ by a detail             | A regex that tells them apart                                                                             |
| Pages where the experience is not wanted     | A **Doesn't contain** or **Doesn't start with** rule                                                      |
| Users who did something before               | Rules for the page, conditions in [Who](https://help.usejimo.com/docs/publish/target-right-people-who.md) |
| Mobile users                                 | Tablet and Mobile in Devices, then test on a phone                                                        |

</details>

## From your assistant

Ask: *"Show the Billing banner only on /pages/billing.html on b2b.usejimo.com."* The preview warns that `equals` excludes the same page with a query string, and says whether visibility widens or narrows. More in [What to ask?](https://help.usejimo.com/docs/integrations/mcp/what-to-ask.md)

## Verify

* Type the address of a target page in **Test your URL**: it matches. Type a page where the experience must not show: it does not.
* Open the Troubleshoot tool on the page you target. If the URL condition is unmatched, the experience is **Ineligible**: compare the address in your browser, character by character, with the rule.
* Check the end of the address for a `/`, a `?` or a `#` that your rule does not expect, and the rule itself for a space before or after the value.

## Go further

* [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md): what the Domains field accepts.
* [Targeting on dynamic apps](https://help.usejimo.com/docs/build/positioning/targeting-on-dynamic-apps.md): single-page apps and dynamic selectors.
* [Why my experience does not show](https://help.usejimo.com/docs/getting-started/publish-your-first-experience/why-my-experience-does-not-show.md), cause 3.

**Next page:** [Who: target the right users](https://help.usejimo.com/docs/publish/target-right-people-who.md)
