Event tracking

Sending page-specific messages when users navigate through your website is cool, but you can achieve even more with event tracking. Just use a simple Javascript code snippet to trigger events when your website visitors perform specific actions:

  • click a button
  • scroll to a certain place in the webpage
  • watch video
  • add products to the shopping cart
  • etc

To use this feature you have to install website tracking pixel first. Once it’s in place, use this simple Javascript for event tracking:

<script>
activechat.track('<PUT YOUR EVENT NAME HERE>', { 
    param1: "1234",
    param2: "abc" 
})
</script>

When this code is executed (for example, with “onclick” or “onscroll” event handlers), Activechat will trigger event that you specified in <PUT YOUR EVENT NAME HERE> and attributes $param1 and $param2 will be set to the specified values.

Create a skill in your chatbot that will start on this event, and your bot will immediately send a message in the website chat widget (either Facebook Messenger or Activechat widget).

If you prefer not to use the chat widget on your website but at the same time would like to use the event tracking feature you will have to alias your website visitors (they are identified by cookie files in browser) to their messenger IDs. Click the link for the complete how-to 👉 Aliasing website cookies to messenger IDs.

Was this article helpful to you? Yes 1 No 2

How can we help?