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:

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:

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.
If you have any questions, feel free to reach out !
Updated on: 22/05/2026
Thank you!
