Function on Form Submit Click

I am trying to add a function to my form submit button but I cannot get it to trigger.

I have done the following

  1. Added embedded element → Submit Button

  2. Added function in in custom code for the page

Example Page: 7 Night Alaska Roundtrip Vancouver)
Read Only Link: Webflow - CruisePlus Travel & Tours

Hi @jordancp,

You’re missing the closing ‘}’ for your function. This is resulting in this message in the console: ‘submitTrack is not defined’.

Try replacing the code with this:

function submitTrack() {
window.pagesense = window.pagesense || [];
window.pagesense.push(['trackEvent', 'submit_success']);

If it’s still not working, we can troubleshoot from there.