Choosing Who Sees a Survey
Learn how page rules, devices, an experiment link and the share of visitors decide which visitors can be shown a survey.
4 min read
The Targeting step, "Who sees it", decides which visitors a survey can be shown to. Every rule narrows the audience. With no rules, a survey can show to every visitor on every page of the website.
A visitor is shown a survey only if all of these hold, checked in this order: the page matches, the device matches, the visitor is in the linked experiment, the frequency limits allow it, and the visitor is within the share of visitors. Only then is the survey's trigger set up.
Pages
Add a rule with + Add page rule. Each rule is a condition and a value:
- equals and not equals: the whole address, such as https://example.com/checkout
- starts with: such as https://example.com/blog
- contains and does not contain: such as /checkout
- ends with: such as /thank-you
- matches regex: a JavaScript regular expression, such as /products/\d+
A page qualifies when it matches any one rule. Rules are checked against the full address in the browser, including https://, the domain, the query string and anything after a #. One trailing slash is ignored on both sides, so /pricing and /pricing/ are the same page.
Matching is case-sensitive: a rule for /checkout does not match /Checkout.
A regular expression is not anchored, so /products/\d+ also matches /en/products/42. Start it with ^ to match from the beginning of the address. A pattern that is not a valid regular expression is flagged in the builder.
Excluding pages
Because a page qualifies when it matches any one rule, a negative rule only works as an exclusion when it is the survey's only page rule. A single "does not contain /account" shows the survey everywhere except account pages.
Combined with other rules it does not narrow them. "contains /checkout" plus "does not contain /account" qualifies every page that is either a checkout page or not an account page, which is nearly every page. Two negative rules do not add up either: a page is only left out if it fails both.
To show a survey on some pages and never on others, write the positive rules so they do not cover the pages you want to leave out, for example "starts with https://example.com/checkout" rather than "contains checkout".
Devices
Choose Desktop, Mobile, Tablet or a combination. With none selected, the survey can show on every device, and selecting all three means the same. The device is detected in the same way as for experiment targeting.
A survey can have at most 20 targeting rules, and each selected device counts as one, so with all three devices selected there is room for 17 page rules.
Experiment
Pick one of the website's experiments to show the survey only to visitors in it. The list is searchable and grouped by status, Running, Deployed, Draft and Ended. Archived experiments are not offered.
Once an experiment is picked, the Variants buttons narrow the survey to specific variants. With none selected, visitors in every variant can see it.
A visitor counts as being in the experiment once it has assigned them a variant, which only happens when they match the experiment's own targeting. The builder tells you when the link means no one will see the survey:
- a draft experiment: no one sees the survey until the experiment starts
- an ended experiment: no one sees the survey
A survey tied to an experiment also opens its results split by that experiment's variants. See Survey Results by Experiment Variant.
If the experiment is archived or deleted later, the builder shows it as No longer available. You can still save other changes to the survey, but an archived or deleted experiment cannot be picked again, and a duplicate of the survey drops the link.
Share of these visitors to ask
Set a whole number from 1 to 100. The default, 100, asks everyone who passes the other rules. Lower it to ask fewer people on a busy page.
Each visitor is in or out once per survey, and stays that way: the decision is kept in their browser alongside the frequency records. Lowering the share later shrinks the same group, so nobody who was left out is asked because the number changed. Raising it lets more people in.
Changing targeting later
Targeting, including the experiment link, can be changed at any time, even on a running survey. Like every survey change, it reaches your site at the website's next publish. The survey's Overview tab summarises the current targeting in its Pages, Devices, Experiment and Visitors asked rows.