Adding an event to a buttom

I need to add some code to a button submit on this page. . How do I do this?

Hi Matthew

Turn on your developer tools if they are not already turned on in the header menu inside your editor under ‘Code’. Then click on ‘properties panel’, select the button and simply add the onClick handler in the properties panel.


Thank you. Relaly helpful. I am trying to add the event userengage(“event.download_white_paper” to the click but it is throwing an error.

UserEngage is a marketing platform we use and we already have some code on our website, it powers the chat box. I need to do this?

You have to ask WIX how you can Add
simple scrpit CLICK ME!
to this button

The current code reads as follows ands throws an error saying UseEngage is not defined.

Help apprecaited.

This is the code I add to our website from User Engage.

Is anyone able to shed any light onto this please?

You can create an onClick event for the button, however, you cannot edit the HTML code of the button (meaning there’s no option to add this code to the button: CLICK ME! ).
What is the “userengage” thing that you try to add to the button? Is there a REST API for it? If so, you can use the Fetch API to add this to the button.