There is no "one-size-fits-all" solution for this. Your solution is
unique to how your site is setup. If you want some pointers, you will
need to provide details about how your site is setup. For example, does
your form have a unique URL the visitor has to go to? Or is it some
button you click and you get an overlay on a page? Is it embedded as an
iframe on your site? Same with the "thank you" / confirmation page. But
also, do you care about tracking only submit attempts (as in, user
clicks the ...