Overview
You may want different chat widgets on different pages, such as one for your pricing page and another for your blog. The Target tab controls this. Open a widget and select Target (next to Chat, Form and Behavior).
Target rules look at the address (URL) of the page a visitor is on. If a widget has no rules, it shows on every page of your website.
Before you start
Target rules decide between pages where a widget could already show. A widget can only show on a page when:
The CloseBot pixel is installed on the page. See Setup.
The page's domain is in the source's Allowed Domains. See Setup.
The widget is turned on in your widget list.
How the rules work
There are two kinds of rule:
Show chat when all rules match (include rules). The page must match every include rule. Add one with Add include rule.
Hide chat when any rule matches (exclusion rules). If the page matches any one of these, the widget is hidden. Add one with Add exclusion rule.
The widget shows only when the page matches all of your include rules and none of your exclusion rules. If a page matches both, the exclusion wins.
Match options
Each rule checks the page's Website URL in one of these ways:
Option | Matches when the URL… | Example value |
contains | has the text anywhere in it | pricing |
does not contain | doesn't have the text anywhere in it | checkout |
is exactly | is the same as the text | /pricing |
starts with | begins with the text | /blog |
ends with | finishes with the text | /thank-you |
A few things to know:
Matching ignores capital letters, so
/Pricingand/pricingare the same.For is exactly, starts with and ends with, you can enter a full URL (
https://example.com/pricing) or just the path (/pricing). A path ignores anything after a?, so/pricingstill matcheshttps://example.com/pricing?ref=email.contains and does not contain check the whole URL, including the domain and anything after a
?. For example, containsplanmatches every page onmyplanner.com.starts with
/blogalso matches/blog-archive. Use/blog/if you only want pages inside your blog.A trailing slash counts. is exactly
/pricingdoesn't match/pricing/.
In this example the widget has one include rule (URL contains plans) and one exclusion rule (URL contains agency):
Page | Widget | Why |
example.com/plans | Shows | Matches the include rule, no exclusion |
example.com/plans/agency | Hidden | Matches the exclusion rule |
example.com/pricing | Hidden | Doesn't match the include rule |
Remove empty rules. If you add a rule and leave its value blank, delete it before saving. A blank exclusion rule hides the widget on every page.
Test a URL
At the top of the Target tab, paste a full page address, starting with https://, into Test a URL. CloseBot tells you straight away whether this widget would display there, and why not if it wouldn't:
Widget is currently disabled. Turn the widget on in your widget list.
Domain is not in Allowed Domains for this source. Add the domain in your source's Allowed Domains.
Excluded by rule. The page matches the exclusion rule shown.
URL does not match all include rules. At least one include rule doesn't match.
The test uses the rules on screen, including changes you haven't saved yet. Save the widget to apply them to your website.
The test checks this widget only. It can't tell whether:
the pixel is installed on that page, or
another widget higher in your list also matches the page and will show instead (see Showing different widgets on different pages).
If the widget isn't showing
Paste the page's URL into Test a URL and read the reason.
Check your widget list. If a widget higher up also matches the page, that one shows instead.
Make sure the pixel is installed on the page.
Reload the page. Rules are checked when a page first loads. On sites that change pages without reloading (common with website builders and apps built in React or Vue), the widget from the first page stays until the visitor reloads.
Showing different widgets on different pages
Only one widget shows on a page. When a visitor opens a page, CloseBot goes down your widget list from the top and shows the first turned-on widget whose rules match. You can change the order by dragging widgets in the list. See Creating and Ordering Widgets.
To set this up:
Put widgets for specific pages at the top, each with its own rules. For example, a pricing widget with starts with
/pricing.Put a general widget with no rules at the bottom. It catches every page the widgets above it don't.
A widget with no rules matches every page, so anything below it in the list will never show.
Next, learn how to make the widget open on its own in Behavior Settings.


