Just download the API docs and samples from your environment (Settings -> Web & mobile monitoring
-> Advanced setup). There are good samples in the zip file that will certainly help you.
By design, the click on finish should be a separate user action. Depending on whether the web application does some network requests or not a user action will be automatically created.
If you don't see user actions triggered by the button click, you need to implement this custom action calls. But nobody will give you more details on how to implement it without a look at the application.
The number of clicks (user actions) can then be retrieved for example by querying the user sessions.