How-to guide

Choose where the widget appears

Keep the chat widget and help center off pages where they get in the way, and bring them in exactly when they help: for signed-in customers, during a campaign, or after someone has been reading for a while.

Where to find it

Open Channels, select your website channel, open the Live Chat tab and scroll to Where the widget appears. Owners and admins can change it. Select Save changes when you are done. Visitors get the new rules on their next page load.

Allow and block lists

Under Pages, choose one of three modes:

  • Show on every page: The default. No page list is used.
  • Only show on these pages: An allow list. The widget appears only where a pattern matches.
  • Hide on these pages: A block list. The widget appears everywhere except where a pattern matches.

Add one pattern per page. Start a pattern with / to match a path on any of your domains, or include the domain to target one site. * matches anything. Matching ignores capital letters and the query string, unless your pattern contains ?.

PatternMatches
/pricingExactly /pricing (a trailing slash is ignored)
/blog/*Every page under /blog/, but not /blog itself
/blog*/blog and every page under it
*checkout*Any path containing checkout
shop.example.com/*Every page on that domain (www. is ignored)
/pricing?plan=*/pricing only when it has a plan parameter

Show the widget based on triggers

Under Only show when, add up to 20 conditions. With more than one, choose whether All conditions match or Any condition matches. The widget appears only on an allowed page and when the conditions match. Dates and times use your workspace time zone from Workspace settings.

ConditionWhat it checksExample
Page URLThe full address of the current page. Matches pattern uses the same wildcards as the page list.contains /pricing
URL parameterOne query parameter, such as a campaign or coupon. Use is set to check that it is there at all.utm_campaign is summer-sale
Came from (referrer)The page the visitor arrived from.contains google.
Visitor emailThe email your site sent with identify, or the visitor typed in. Use is set for “signed-in visitors only”.ends with @acme.com
Visitor attributeAny attribute your site sends with identify or setAttributes: a user ID, group, plan, or custom field. Compares text, numbers and true/false exactly.group is one of vip, beta
DateToday's date, from and/or until a day (both included).from 2026-11-24 until 2026-11-30
Day and timeDays of the week and a time window. A window that ends before it starts runs past midnight.Mon–Fri, 09:00 until 17:00
DevicePhone, or tablet and computer.Phone
Browser languageThe visitor's browser language. de covers de-CH and de-AT.is de
Time on pageSeconds since the visitor opened the current page. The widget appears as soon as the time is reached.at least 15 seconds

Rules are checked again whenever the visitor moves to another page in a single-page app, when your site sends new attributes, and every minute while a date or schedule condition is set. If the chat is open when the rules hide it, it closes. The conversation is kept for when the widget comes back.

Send the values your rules check

Visitor email and attribute conditions read what your site passes to the widget. Signed-in visitors using a verified identity (userJwt) should also pass email if an email condition needs it.

HTML
<script>
  // Send the values your display rules check
  sonny('identify', {
    email: 'anna@acme.com',
    attributes: { userId: 'u_123', group: 'vip', seats: 12 }
  });

  // Later, when something changes
  sonny('setAttributes', { group: 'beta' });
</script>

Override the rules from your code

Your own code always wins. sonny('show') and sonny('hide') ignore the rules until the page reloads.

HTML
<script>
  sonny('hide'); // hide the widget, whatever the rules say
  sonny('show'); // show it again, whatever the rules say
  sonny('open'); // opens the chat, and shows the widget if rules hid it
</script>

Good to know

  • Display rules hide the widget. They don't restrict access: anyone can still load it.
  • The rules cover the whole widget, including its Help tab. Your public help center site is not affected.
  • The iOS and Android SDKs ignore display rules. The app decides when to open chat.
  • Live visitors still lists people on pages where the widget is hidden.

Related docs