I’ve successfully set up the main Facebook Pixel for my site but now I’d also like to track when users submit a form on my website. I’ve got the standard FB event/lead tracking code (see below) and added is as an embedded element to the form when it’s in the Successful state. Unfortunately it seems that this gets triggered when the page gets loaded, not when the form is submitted. I know I can redirect to a new page and add the embedded code there, but I don’t want to redirect the user. How do I track form submissions using the code below without sending the user to a new page?
<script> fbq('track', 'Lead'); </script>