Instapage allows running javascript code just after anchor or button click.
1. Any link click on the page
Use the following snippet if you want your code executed upon any button click on the page, regardless of element ID.
2. A click on a particular element
Use the following snippet if you want your code to be executed upon clicking a specific element, targeted by its unique ID.
Here you will need to replace "123" with the actual ID of your element. You will need to right-click on the button and select Edit CSS, as seen in the GIF below: