Do you want to know how to install Facebook Pixel on WordPress? Today, you will see the multiple ways to add Pixel tracking code to WordPress websites.
What is a Facebook Pixel?
If you are running Facebook ads, it is essential to monitor their performance to optimize campaigns and attract more audience. Facebook Pixel is a small piece of code that tracks user activities on your site like digital downloads, button clicks, purchases etc. It helps you to know which campaign works best to generate more sales.
In other words, Facebook Pixel is Google Analytics for Facebook ads. Monitor your ad traffic and change strategies to get more page visits from the social site.
There are three ways to install Facebook Pixel on WordPress,
- Manual—Collect your Facebook Pixel code and add it to WordPress manually
- Facebook for WordPress—Facebook official plugin to install Pixel code
- PixelYourSite- Pixel manager plugin for WordPress
Let us get started.
1. How to Install Facebook Pixel without Any Plugin?
Facebook Ad Manager is a single place to manage all your Facebook ad accounts. It includes ad accounts you own and the ad accounts other businesses own, but you have access to.
Visit Facebook Business Manager and select your business from the list. It will redirect you to the account settings.
Expand Data Sources menu on the left pane. Click Pixels. It will show all Pixels you created on the middle pane. Filter them to view your own or pixels owned by others. Tap the Add button to create a new pixel.
A pop up box will appear like this,
Enter a name for Pixel. Then, add a website address for which you are going to set up tracking. Click Continue to go to the next step.
Choose Set up the pixel now option as next. Facebook lets you set up the pixel in two ways. Using their official pixel plugin or manual insertion.
We’ll see the first method in the next step. Click on Set up Manually to install Pixel code in your theme files.
Collect the base code and paste it in your site’s header. Some WordPress themes allow you to insert codes through theme settings. If your theme has no such option, install Insert Headers and Footers plugin to add it easily.
Go back to Pixel settings to set up event code and track various events like add to wishlist, add to cart, start trial, etc.
Either user Facebook event set up tool or install the code manually next to </head> to track required events. For manual insertion, choose ‘manually add event code’ option and collect code for each event. Paste it in your theme files to initiate tracking.
2. How to Install Facebook Pixel with Facebook Official Plugin?
Facebook has developed a simple plugin to connect your WordPress site to ad account. It helps you to track visitors without installing any code manually.
Sign in to WordPress and search for ‘Facebook for WordPress’.
This is the official Facebook Pixel plugin for WordPress. Install and activate it.
Open plugin settings and click on Get Started. A pop-up box will open to connect to your Facebook account. After signing in, you will get an option to connect WordPress to Facebook.
Hit the Continue button to allow. Grant necessary permissions in the next steps to access your business account on Facebook.
Finally, you will get this kind of screen.
You’ve successfully connected WordPress to Facebook Pixel.
3. How to Install Facebook Pixel with a Third Party Plugin?
PixelYourSite is an all-in-one plugin to connect Facebook Pixel and Google Analytics to your WordPress site. It also allows you install Pinterest, Google Ads, and Bing tags in quick moments.
After activation, open plugin settings to configure.
Tap ‘Click for settings’ to configure Facebook Pixel for your site.
Enter your Pixel ID first. Open Facebook Event Manager and copy ID that appears next to your Pixel account.
Paste it in to the ID field. Save settings.
How to Validate Facebook Pixel on WordPress?
How to validate Pixel implementation on your site? Facebook Pixel Helper is a simple Chrome extension to monitor Pixel events in real-time. It is also useful to troubleshoot issues and collect feedback on the code insertion.
After installing, open your site. Click Facebook Pixel Helper icon to ensure the code is working fine or not.
Expand the list to verify the insertion method, loading time, and others. If it is showing any issue, click on troubleshoot to visit Facebook Event Manager and fix things.