Create custom launch event

Learn how to create a custom launch event

Before you get started

How to create a custom launch event

There are a few use cases where you may want to trigger a custom launch event for the Mava Web Chat Widget. A custom launch event allows you to trigger the widget to open from an event other than clicking the default Mava launcher.

Simple

Add id="mava-webchat-launcher" or class="mava-webchat-launcher"to any button on your website, depending on whether you want a single instance or multiple buttons to be able to trigger the web chat open event.

For example:

<button id="mava-webchat-launcher">Open Sesame </button> 

Or...

<button class="mava-webchat-launcher">Open Sesame </button> 

The buttons or elements but me loaded on the page before the Mava web chat script triggers. If your setup is more complex - which is sometimes the case with SPA's or if you're delaying the load of the widget, you may need to use our custom function.

Advanced

<button onclick="window.MavaWebChatToggle()">Open Sesame </button> 

Last updated

Was this helpful?