Auto-open, exit intent and consent
Open the chat on a delay, scroll or exit intent, react to page events from your own code, and require visitors to accept a consent notice first.
Last updated:
Besides colors and text, the widget has behavior settings that decide when it speaks up and what visitors must agree to first. They are all in the site's Appearance tab, take effect without changing the embed snippet, and can be combined. This page covers automatic opening (delay, scroll and exit intent), page events you fire from your own code, and the consent notice.
Open automatically#
Turn on Open the chat automatically and choose one or more triggers. The first one that happens opens the chat.
- After a delay in seconds.
- After scrolling a percentage of the page.
- Exit intent when the visitor looks about to leave.
If no trigger is set the chat opens immediately, so set at least one. Two rules always apply: the chat never opens by itself once the visitor has opened or closed it in that browser tab, and by default it opens at most once per session. The delay and scroll triggers are skipped on phones in full-screen mode, because covering the whole screen is not a nudge.
Exit intent#
On a computer, exit intent fires when the mouse leaves through the top edge of the page, for example towards the tab bar or the address bar, after the minimum time you set (five seconds by default, so an accidental move right after the page loads does nothing). On a touch device there is no cursor, so a fast flick back up the page after reading down it stands in for the same intent. On a phone in full-screen mode the widget shows its small message bubble (the exit-intent bubble text in Text and labels) instead of opening the chat.
Page events#
Your own code can tell the widget that something happened and let it react. Call SiteTrellis('event', name, data) and define a matching rule under Page events in the Appearance tab. A rule can open the chat, show a short plain-text message above the chat button, and set visitor attributes, using values from the event data written as {{field}}.
// somewhere in your checkout code
SiteTrellis('event', 'checkout_started', { items: 3, value: 129 });
// rule "checkout_started": message "Need help with your order?", attribute cart_items={{items}}
- Event names use lowercase letters, digits and the characters
_ . : -, up to 40 characters. Unknown events do nothing. - The data is a flat set of up to ten short values. Messages are shown as plain text, never as HTML.
- Repeated events within two seconds are ignored, a rule marked only once per visit fires once, and a visitor who closed the chat is left alone for the rest of the visit.
- Attributes set this way are self-reported, like any value the page sends. Use a signed identity for facts you need to trust.
Consent notice#
With Require consent before chatting on, the visitor sees your notice and must accept it before the first message. Write it in Text and labels, add an optional link to your privacy policy, and change the accept and decline button labels if you like. If you leave the notice empty a sensible default is used.
- The answer is remembered in the visitor's browser together with a fingerprint of the notice, so changing the text or the link asks again.
- Declining closes the chat. Opening it again shows the notice again.
- Programmatic messages from
SiteTrellis('sendMessage', ...)wait for consent instead of bypassing it. - When the visitor accepts, the time is stored on the conversation and shown in the inbox, as a record that they agreed.
- The notice is keyboard accessible: focus moves to the accept button, the text is announced with it, and the link opens in a new tab.
Without the consent requirement, a notice is shown as a small line at the bottom of the window instead. See the full list of settings in Widget customization.