> For the complete documentation index, see [llms.txt](https://mava.gitbook.io/mava-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mava.gitbook.io/mava-docs/getting-started/integration-setup/web-chat-setup/create-custom-launch-event.md).

# Create custom launch event

### Before you get started

* Make sure you've already created a [Mava web chat from the integration section](/mava-docs/getting-started/integration-setup/web-chat-setup.md)

## 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> 
```

Note: Mava's own default launcher button also uses `id="mava-webchat-launcher"`. Assigning the same id to your own button means any styling applied to `#mava-webchat-launcher` (see [Customize the position & size of the web chat](/mava-docs/getting-started/integration-setup/web-chat-setup/customize-the-position-and-size-of-the-web-chat.md)) will affect it too.

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> 
```
