How can I add pixel script to my form?

  • Profile Image
    ganaa7
    Asked on February 26, 2018 at 05:24 PM

    Hi, Iam trying to add facebook pixel to my form.  Is it possible to do that?

  • Profile Image
    Jan
    Answered on February 26, 2018 at 07:58 PM

    Unfortunately, it is not possible to insert the Facebook pixel code (script) on the form. According to Facebook guide, the pixel code should be inserted in the head element. There's currently no option in the Form Builder where you can insert a code in the head element.

    You may download the form's source code and edit the HTML, CSS and Javascript files. After that, you can upload it to your servers.

    You can also use the Thank You page to redirect to a custom URL where the Facebook pixel tracking code is. You just need to create a page, put the pixel on it, and then upload it to your web server. After that, you can redirect the Thank You page to that file.

    My colleague Mike mentioned on this thread that it is possible to insert a Facebook pixel code using the noscript image tracking. You just need to get the tracking pixel image code that is located in between the tags. Here's an example:

    <noscript>
    <img height="1" width="1" style="display:none;" src="https://www.facebook.com/tr?id=1234567890&ev=PageView&noscript=1"/>
    </noscript>

    After that, you need to use the Text tool's Source Code and insert the image tracking code. Here's a screen capture:

    Hope that helps. Thank you.