Facebook pixel integration: Installation and setup
Using Facebook ads to share your forms? Adding Facebook pixel allows you to see how many people view, open, and submit your form from Facebook sources.
What you need:
- A Business Typeform Account
- A form you want to share
- A Facebook Business account with Pixel set up (here's how to set up Facebook pixel)
It’s really easy to add Facebook pixel tracking to your forms. All you need to do is copy your pixel ID from Facebook and add it to your form. Let’s break it down:
1. First we'll find your pixel ID in Facebook. Open your Facebook Business account, and click the hamburger menu icon, then select Events Manager:
2. Now the Events Manager interface is open, you'll see all your pixels named, with their ID shown underneath:
Copy this long ID number from here - this is what we'll need to add your pixel to your form.
3. Now open the form you want to track with a pixel, and go to the Connect panel. Search for 'Facebook' and then click Connect:
4. This will open a new menu, where you can add your pixel ID number.
You can click save and finish now, but if you want to be able to track your form when it's used on an iOS device, you need to check the Enable iOS tracking box. Let's do that.
Note! A custom subdomain is required to enable iOS tracking. Learn more about how to set up a custom subdomain here.
5. The menu will expand. These extra steps are necessary due to changes in tracking in iOS14 and above. Copy the typeform URL shown in step 2 below, under Register your typeform URL:
6. Click this link to open your Facebook Business Domain settings. Now click the Add button under Domains:
7. This will open a new popup. Paste the typeform URL you copied in step 5 in the Your domain box, then click Add:
8. Now click the dropdown menu under Verify your domain, and choose 'Upload an HTML file to your root directory'.
9. Now, copy the URL you can see under step 3 of this menu:
10. Head back to your Typeform, and paste this URL in the field at the bottom.
IMPORTANT: You must swap 'http' for 'https'. The URL must contain '.html' at the end.
Once you've done that, click Register this URL. You'll see a final instruction appear below:
11. Go back to your Facebook Business Domain settings, and click the green Verify domain button. You'll see a message saying your domain is verified:
You only have to go through steps 6-11 the first time you're setting up the integration. Once you've generated the verification code for step 10, you can go straight to step 12 from step 5, using the same code in all your following forms.
12. Finally, go back to your form, and click Save. Your pixel is now set up!
Once you've set up the integration, you can also check out this guide for troubleshooting, limitations, and other FAQs.