Skip to content

Back to Help center

Who takes part: rules and saved audiences

Limit a test to some pages, campaigns, countries, languages or logged-in customers, and save the choice as an audience for your next test.

In this article

Who takes part is step 2 of the launch checklist (see Launch, pause, resume and end a test). It starts with Devices, Visitors (new or returning) and Traffic source. Below those, Rules let you be more precise.

Add a rule

Click Add a rule and pick what the rule is about. Each rule is a short sentence you fill in, such as "Page URL · contains · /sale". Click the × next to a rule to remove it.

Rule What it checks Example
Page URL The address of the page the visitor is on. contains /sale, does not contain /kids, starts with /blog/
UTM tag utm_source, utm_medium or utm_campaign on the first page of the visit. utm_source is google
URL parameter Any parameter in the address of the page. ref is partner
Country Where the visitor is, from their connection. is one of Belgium, Netherlands
Browser language The language the visitor’s browser is set to. is one of Dutch, French
Referrer The site the visitor came from at the start of the visit. contains google., or is empty (direct visit)
Cookie A cookie your site sets. logged_in exists
Local storage value A value your site keeps in the browser’s local storage. customer_type is vip
Element on the page Only when this element is on the page. #sticky-cart

Page URL

  • contains, is exactly, starts with and matches pattern, and the opposite of each (does not contain, is not, …) to keep a test off some pages.
  • Type a path such as /sale, or a full address such as https://www.shop.com/sale. Capitals, www., https:// and a slash at the end don’t matter, so /sale and /Sale/ are the same page.
  • Letters with accents and spaces work as you type them: /café also matches the address /caf%C3%A9.
  • The query string (everything after ?) only counts when your rule has a ? too. is exactly /sale also matches /sale?utm_source=x.
  • matches pattern: * stands for any text, for example /products/*/reviews.
  • The test still runs only on its own page or page group. A URL rule makes that smaller. A test without a page (from an idea without a page) runs on the whole site, so a URL rule decides where it runs.

UTM tag and URL parameter

  • A UTM tag is read from the first page of the visit, so a visitor from your Google Ads campaign still matches on the second and third page. Google Ads clicks with gclid count as utm_source google and utm_medium cpc.
  • A URL parameter is read from the page the visitor is on now. Use exists or does not exist when only the name matters.

Country and browser language

  • Varly knows the country from the visitor’s connection, through Cloudflare. Varly never sends or stores the IP address: the script only gets the two-letter country code, and only on sites with a running test that uses a country rule.
  • When the country is unknown (for example on Tor), the visitor doesn’t take part, also not in a "is not one of" rule.
  • Browser language uses the main language: Dutch also covers Dutch (Belgium).
  • These rules read data in the visitor’s browser, so they only work after consent. In privacy mode, visitors who haven’t accepted cookies never match these rules, also not "does not exist". They see your normal page.
  • When a browser blocks local storage (some private windows), the visitor doesn’t match a local storage rule.

Element on the page

The test only starts when this element is on the page, such as a banner or a sticky cart. Varly waits up to 3 seconds for it. Until then, the parts the variant changes stay hidden, so visitors never see the original flash by. When the element doesn’t appear, the visitor sees the original and is not counted. A split URL test can’t use this rule, because it sends visitors on right away.

All rules or any rule

With two or more rules, choose Visitors must match: All rules (the default) or Any rule. Devices, visitors and traffic sources always count on top of that.

Advanced: a JavaScript condition

Under Advanced, owners and editors can add one JavaScript condition: plain JavaScript that returns true to let the visitor take part. For example:

return window.dataLayer?.some((e) => e.customerType === 'vip') === true
  • It runs before the page is ready, so it must answer right away. When it throws an error or returns anything other than true, the visitor doesn’t take part.
  • Varly checks it like custom code when you launch, and only puts approved code on your site, as a function in your site’s script (never eval).
  • An AI assistant connected to Varly can set every other rule, but not a JavaScript condition: a person adds it in Varly.

What the plan counts

Varly can’t tell in advance how many visitors match a rule, so the plan in step 3 counts all visitors who match the devices, visitors and traffic sources. With rules, the test may take longer than the plan says.

Saved audiences

An audience is a saved Who takes part, such as "Visitors from Google Ads", "Belgian visitors" or "Returning mobile". The share of visitors is not part of it: you choose that per test.

  • Save one: in the launch checklist, set up Who takes part, click Save as audience, type a name and click Save audience.
  • Use one: in the launch checklist of another test, pick it under Saved audience. It fills in the choices; you can still change them for this test. The list then says "Changed from" the audience.
  • See and change them: on Tests, click Audiences. Each audience shows what it contains and which tests use it. Click Edit to change it, or Delete to remove it. Tests that use a deleted audience keep their choices.

Changing an audience that a running test uses

A running test must keep the same kind of visitors from start to end, or its result mixes two groups. So when you change an audience:

  • Tests that haven’t started yet always get the new choices.
  • For running and paused tests, Varly asks. Keep running tests as they are (recommended) is selected. Choose Change running tests too only when you must. It needs permission to launch tests.

Server-side tests

Server-side tests can be limited by device, new or returning visitors, traffic source and a share of visitors. Your server decides who takes part, so the rules on this page work only in tests that Varly shows on the page.

Check it in the preview

The preview bar says whether you would take part on this device and this page, and if not, why: for example "✗ Country is BE, test wants Netherlands". See Preview and check a test.

Common problems

  • The Launch button stays gray. A rule is not complete yet. The red text under Rules says what is missing, for example "Pick at least one country."
  • The test runs, but nobody takes part. Check the rules in the preview bar on a page where the test should run. A typo in a cookie name or a selector is the most common cause.
  • A visitor from the campaign doesn’t see the test on a later page. That works for UTM tag rules. A URL parameter rule only checks the page the visitor is on now.
  • "A JavaScript condition can only be added in Varly". An AI assistant tried to add one. Add it yourself under Advanced.
Was this article helpful?

Still stuck? Email support@varly.ai and we'll help you out.

Related articles

Updated November 7, 2026Next: Keep tests apart →