How to add Facebook conversion tracking to your online form?

How to add Facebook conversion tracking to your online form?

If you want to add Facebook conversion tracking to your online form, but couldn’t figure it out how to do this, worry no more. Here’s how you do it:

1. Generate the pixel code in your Ads Manager on Facebook.

Quick Steps: Ads ManagerToolsCreate a PixelView Pixel Code

2. Copy the code and paste it in a Notepad document, but without the comment line and the tags. So the could should start with:

!function(f,b,e,v,n,t,s){if(f.fbq)return;..

And end with:

.src="https://www.facebook.com/tr..

3. Save the Notepad document with the extension ‘.js‘.

4. Upload the file (document) on a trusted web server (yours recommended).

5. In your 123FormBuilder account, go to My Forms, select your form and go to the SettingsAdvanced section.

6. Enable the option Add a JS script to the Thank You page of your form and paste the URL where your .js file is located.

123FormBuilder add facebook conversion tracking to form

7. Save changes.

8. Go to the NotificationsThank You Page and Redirects section of your form and tick the option Show HTML Block.

9. Next, use the source code option (the <> button on the top right side of the editor) and paste the rest of the code that is left, but without the ‘noscript’ tags:


If the steps have been followed correctly, your online form should be already tracked in the Ads Manager section on Facebook.

If you need more assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

Olivian Stoica
Olivian Stoica
Oli's enthusiasm for helping our fellow users led him to write thorough know-how articles and tutorials that would make form building a bliss on 123FormBuilder.

4 Comments

  1. Noah says:

    The FB pixel code needs to be on the actual Thank You page, not just referenced in a JS file.

    How can you do that?

    • Hello Noah!

      The Add a JS script to the Thank You page of your form option is equivalent to adding the code on the actual Thank You page. The only difference is that the code is hosted on a server, instead of being directly added to the page.

      Facebook provides the pixel tracking code in HTML format, meaning that when you add it to a js. file, you’ll need to remove the first line and the <script> and <noscript> tags. So your tracking code should begin with function ().. followed by the rest of the code until the line window._fbq.push([..}]); (without the </script> tag at the end). Next, copy the last line of the code (the one with the <img> tag) and paste in the source code of your HTML Block of the Thank You page (enabled in NotificationsThank You Page and RedirectsShow HTML block).

      You cannot add JavaScript codes to the Show HTML block option, due to security reasons, so the pixel tracking script cannot be copied there.

      If you need assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form.

      Thanks!

  2. Maryanne McNeill says:

    I am sorry but i do not understand the above and i desperately need to get this facebook campaign moving.
    http://screencast.com/t/5UAplgmZv6

    I am sorry I am taking up so much of your time but desperately need and appreciate your help.

    thank you

    Maryanne

    • Hello Maryanne!

      The URL is the location where you have uploaded the .js file that contains the Facebook conversion pixel code you saved. Here’s how it goes:

      You copy the code from your Facebook Ads Manager and paste it in Notepad. You then save the document and add ‘.js’ at the end of the document’s name. This will save the file with the extension ‘.js’ which is a JavaScript file. Now, you will need to upload the file on your website’s server. The URL is the path that takes you to the content of that ‘.js’ file. For example: ‘http://www.yourdomain.com/my_conversion_pixel.js’. This is the URL you will need to add to the option Add a JS script to the Thank You page of your form.

      Uploading the file on your website’s server would imply the use of a File Transfer Protocol software (FTP). Your website’s server contains all files that create every aspect of your website. If your website is hosted by a website builder (Wix, Weebly, Squarespace, GoDaddy, etc.), then you will need to contact its customer support to ask for access to your website’s server or ask them to upload the ‘.js’ file for you.

      For more assistance, don’t hesitate to contact our Support Team at support@123formbuilder.com or via our contact form. They may set up the conversion pixel for you, if the help is needed.

      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *