Use Chatlio triggers to automate messages

Triggers are a great way to increase engagement if used at appropriate places. A trigger can automatically prompt visitors with custom messages when they have been on specific page(s) for X seconds.

A great example of a trigger is asking “Can we help you with any pricing questions?” after visitor has been on your /pricing page for 30 seconds.

Triggers are only fired once per visitor if the conditions are met.

The Chatlio Dashboard settings section has a tab dedicated to creating and configuring triggers:

Triggers, unconfigured

HINT: Triggers are not displayed on mobile devices due to the lack of screen space.

Setup

Setting up your triggers is very easy. You write a message to show to your visitors when the trigger runs, set a delay (or 0 to show the message right away) and the page(s) where you want the trigger to appear. When the URL in the visitors browser matches any of the strings you added under “pages” the message will be shown after the delay you set.

Matching behavior

The matching behavior determines how Chatlio will check if a visitor should see the trigger or not on a given page. Three methods are supported: “contains” (default), “starts with” and “exact”.

With “Contains” matching, the string can appear anywhere in the URL, e.g. “applepie” would match on all of these pages: https://yoursite.com/applepie, https://yoursite.com/faq/what-is-applepie and https://applepie.yoursite.com.

You can use “contains” matching to match query params, e.g. lang=es.

The “Starts with” matching mode is useful if you wish the match to be anchored the beginning of the URL of the page. The primary use-case for this is if you are using subdomains, so that a trigger matching on https://yoursite.com/beef-stew does not also match on https://docs.yoursite.com/beef-stew.

Lastly, if you want to match an exact URL, check the “Exact” checkbox. Use this to add a trigger to your home page: yoursite.com/ or if you want a trigger to appear on the yoursite.com/producs page but not on yoursite.com/products/tractors. Note that exact matches need to include the domain name; this is optional for other matcher types.

Note that the protocol portion (“http://” or “https://”) is not used for matches of any kind.

You can also configure the amount of time that must elapse between two triggers firing. This is to avoid that a visitor that navigates your site gets peppered by triggers. If you do not want this to happen, just set it to 0.

Display

Trigger text is shown in a smaller message bubble above closed widget. Messages over 110 characters are automatically truncated.

Triggers, peek

Trigger API

Need to programmatically fire “triggered” messages? check out our Trigger API

Trigger configuration: Triggers, configured

When a visitor responds to a trigger message, the conversation starts in Slack with the trigger message included in the header so your operator knows which trigger the visitor is responding to.

Triggers, incoming Slack message

Here’s what it might look like to the visitor (using peek style trigger):

Triggers, visitor responding to trigger

So far so good, setup is really easy.

HINT: When testing triggers, read next section and ideally use Chatlio debug

There is one aspect of trigger messages that is a little more complicated though. One of the worst things a site owner can do is to annoy their visitors. It is very important that Chatlio triggers do not end up being a nuisance and to this end we’ve tried hard to ensure that triggers are shown only when appropriate.

There are a number of conditions under which a trigger will not be shown:

  1. A different trigger message was recently shown to the visitor (defaults to within the last hour; configurable)
  2. The trigger message was already shown to the visitor
  3. There is nobody available to chat on the Slack side (offline or throttling is on and the team is busy)
  4. The visitor is already chatting to you (they sent a message within the last hour)
  5. The visitor has opened the live chat widget and is presumably aware of its purpose and knows where to find you if needed
  6. The Chatlio widget is hidden

Note that if your live chat widget is configured to ask visitors to enter name & email before a chat can start, trigger messages will by-pass this and prompt the visitor to start chatting right away.

One thing we noticed ourselves while working and testing this feature is that it is easy to get tripped up in one of the above conditions and end up wondering why the trigger did not run. To help out with this we added a debugging facility that can be very helpful when working with triggers. To enable debug messages add the data-chatlio-debug attribute to your embed code:

<script type="text/javascript">
    // embed code cut for brevity
    n.setAttribute('data-widget-id','<your widget ID here>');
    n.setAttribute('data-chatlio-debug', true); // <–– ADD THIS
    c.parentNode.insertBefore(n,c);
  }();
</script>

With debugging enabled, Chatlio will print plenty of extra information about your triggers and why a trigger might be skipped.

An alternative way of setting up debugging is to execute _chatlio.configure({debug: true}) as soon as possible after the Chatlio embed code. This is useful if you wish to add additional logic to decide whether debugging should be enabled, for example:

<script type="text/javascript">
    // embed code cut for brevity
    n.setAttribute('data-widget-id','<your widget ID here>');
    c.parentNode.insertBefore(n,c);

    if (showChatlioDebug()) {                 // <–– ADD THIS
      _chatlio.configure({debug: true});
    }
  }();
</script>

Here’s a screenshot of a browser JS console in debug mode after setting up a trigger and running it.

Triggers, JS console with debugging enabled, running a trigger

In this case the browser decided to skip the trigger because the visitor had opened the live chat widget.

Triggers, JS console with debugging enabled, skipping a trigger

As always, any feedback you might have is most welcome. Swing by and chat with us or drop us an email: [email protected].

:(
Your browser is out-of-date!

This website is built using latest technogies. Unfortunately your browser doesn't support those. Please update your browser to view this website correctly. Thank you.Update my browser now