Facebook Pixel for a form button

Hello and help… please

As always a simple job has become a-little more complicated - especially for me with my lack of code skills. I know there are a few posts around this subject about but i’ve not found one that quite matches my problem or answers the question.

Here’s the problem.

I’ve been asked to add facebook pixel to the live site - Check - all done A ok and all appears to be working which is good.

I was then asked to add in the code for a lead - this one
fbq(‘track’, ‘Lead’);

Which i’ve added within the snippet of code within the header.

My client has said this appears to be showing up within his facebook system

But… for it to track the lead only when the submit button is clicked do I need to do anything with the button - add code or anything?

I’m sure it’s a simple solution but need some help just to understand or get an idea of what I need to do if anything?

Here’s the link to the site
https://preview.webflow.com/preview/ubx-home?utm_medium=preview_link&utm_source=designer&utm_content=ubx-home&preview=bab224eb7c92108d2018116710f23849&mode=preview

Many thanks
Alex

Hi @Alex100, the code below should be sufficient if the pixel has been installed properly.

$('#submit').on('click', function(){
   fbq(‘track’, ‘Lead’);
})

Hi @dennyhartanto

Thanks so much. So i just add that as custom code to the button?