> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.poool.fr/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Custom buttons : trigger your own actions with the customButtonClick event

# How does it work ?

When you add a button in an advanced appearance, you can choose the "trigger an event" action, like below:

![](https://storage.crisp.chat/users/helpdesk/website/-/5/f/5/0/5f50f52b22503800/trigger-an-event-button_76gcoc.png)
The **customButtonClick** event is triggered when the user clicks on the button.

That way, you will be able to trigger the action you want. This can be to display a pop-up or to Subscribe with Google for instance.

In terms of configuration, that would be:


```
access.on('customButtonClick', () => {  
    { /* trigger your event */ }  
  }  
)
```

# Is it mandatory to set a name to the triggered event ?


No, it is not.

Poool gives you the possibility to set a name in the button options:

![](https://storage.crisp.chat/users/helpdesk/website/-/5/f/5/0/5f50f52b22503800/event-name_411fyx.png)
However, this is not mandatory, as this is the **customButtonClick** event that is triggers. Naming your event can allow you to distinguish 2 custom buttons in a single appearance.

In terms of configuration, that would be:

```
access.on('customButtonClick', e => {  
  if (e.name === 'event_name')  
    { /* trigger your event */ }  
  }  
)
```

You will find more information in our **customButtonClick** JS event technical documentation 👉 [right here](https://www.poool.dev/en/docs/access/javascript/events#custombuttonclick).

If you have any questions, feel free to reach out !

[Access the Dashboard](https://dashboard.poool.fr/)

