I want to put the fb pixel on the page and then use the conversion pixel to track everyone who is actually filling out the form
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '');
fbq('track', "PageView");
fbq('track', 'Lead');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1740955919461347&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
I have been using this html form:
<form id="contactform" action method="post">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form">
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<input name="name" type="text" id="name" placeholder="Enter Your Name" >
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<input name="email" type="text" id="email" placeholder="Enter Your Email">
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<input name="phone" type="text" id="phone" placeholder="Enter Your Phone">
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<input class="btn-blue" type="button" value="submit" id="submit" onclick="fbq('track', 'Lead')">
</div>
</div>
</form>
It takes all the viewer pixelize by facebook.I just need to track who complete the registration form. Thanks in advance.
Integrate the pixel on the registration complete view/page.
Your form does an HTTP POST request to handle and save things server side. After your server has finished, there would be an redirect to this side I think. Otherwise we need to see more of the javascript or backend (php?) code ...