If you’re advertising your WordPress-based online business on Facebook and want to get the most out of your advertising budget, there are two crucial things you must specialize in, one is reaching out the right audience and another is generating more conversions.
No matter what type of Facebook Ad youβre running, if you don’t know these two things well, you’re just whipping out your hard earned money on a whim and will never get expected results.
While Facebook offers amazing advertising capabilities to publishers of all shapes and sizes, on the other hand, WordPress is considered to be the easiest, quickest and most efficient way of starting a business online.
However, if you want to get the full value out of Facebook’s advertising capabilities to boost up the growth of your WordPress-powered business, youβll have to add the Facebook Pixel to your WordPress site. Let’s know what the Facebook Pixel actually is and how to leverage it on a WordPress site.
What is the Facebook Pixel and Why Should You Use It?
The Facebook Pixel is nothing but essentially a piece of JavaScript code that empowers you to measure the effectiveness and profitability of your Facebook ad campaigns by helping you understand the actions visitors take on your website and accordingly reach the audience you otherwise might not be able to get to. When you install the Facebook Pixel on your blog or website, youβre able to:
View Your Websiteβs Traffic
With powerful Facebook Pixel dashboard, you can track all of the traffic to your website, get rich insights about how visitors are interacting with your website and create custom audiences to see how your Facebook Ads are performing.
Track Conversions
Enabling you to monitor what actions users take on your website after clicking your Facebook Ad, the Facebook Pixel allows you to measure conversion rates of your Facebook Ads. You can even track your customers across different devices before they convert.
Optimize Your Facebook Ad Campaigns
With the help of the data collected by the Facebook Pixel tracking, you can refine your Facebook advertising strategy to improve your Return on Advertising Spend (ROAS) and optimize your ad spend for better conversions. The Facebook Pixel ensures that your ads will be shown only to the users who are most likely to take your desired action, like making a purchase.
Retarget Your Website Visitors
Using the Facebook Pixel tracking data, you can also serve relevant ads to people who have already expressed their interest in your products or services. For instance, you can show users an ad for the same item which they viewed but didn’t buy on your website. Needless to say, Facebook dynamic ads are built to fulfill the same purpose.
Reach the Right People
In addition to helping you target your existing and most engaged customers, the Facebook Pixel also expands your potential customer base by helping you find new customers on Facebook. You can use its tracking data create lookalike audiences of people having similar likes and interests to your best existing customers.
In a nutshell, Facebook Pixel is an Analytics for your Facebook Ad campaigns which provides you a lot of metrics and data related to people visiting your website through Facebook ads so that you can better target them to maximize conversions and drive more sales.
How Does the Facebook Pixel Work?
The principle behind the working of the Facebook Pixel is very similar to how Google Analytics works. The Facebook Pixel is actually an invisible, 1×1, unique image file that you embed into your website with the help of the JavaScript code provided by the Facebook.
Whenever someone visits your website and takes a specific action, Facebook leveraging the power of an HTTP cookie instructs the browser to download that invisible image from Facebook servers to userβs device that is being used to access the website.
Of course, Facebook can easily track exactly how many times the invisible image has been downloaded, when, and by whom. Facebook can even track what browser, machine, operating system and IP address was used to download the transparent image. Combining all these details, Facebook generates an overall digital signature of all the technologies used by the visitor.
When the user logs into his Facebook account using the same browser, Facebook maps the downloaded image to the specific Facebook ID. Thus, on the basis of a specific userβs browsing behavior, the Facebook Pixel allows you to serve targeted ads. This is called conversion optimization.
How to Add the Facebook Pixel to WordPress?
There are fundamentally three ways to install Facebook Pixel on a WordPress site. Let’s explore each, one by one.
Using the Official Facebook Pixel plug-in
The first and foremost step to install the Facebook Pixel on your WordPress site is generating the Facebook pixel base code. Log in to your Facebook account and head over to the Ads Manager. Click the hamburger menu given in the upper left corner and then click Pixels tab under Events Manager.
You’ll then see a page like this:
Click βCreate a Pixelβ button shown in the above snapshot, enter your Pixel name and click Create. After getting a success message, you’ll be then shown a pop-up saying βInstall Your Pixel Codeβ.
As you can see, here you’re given three options. Select the first one βUse an Integration or Tag Managerβ and you’ll be asked to choose a partner.
Choose WordPress and click the Download link to download the Facebook Pixel plug-in.
Once the Facebook Pixel plug-in is downloaded, youβll need to upload and activate the plugin via your WordPress dashboard. Sign in to the WordPress and click βAdd Newβ under βPluginsβ tab in your WordPress admin panel.
Click βChoose Fileβ and upload the downloaded Facebook Pixel plug-in. Then click βInstall Nowβ and finish the set up by clicking βActivate Pluginβ button.
Now, after at least 30 minutes, go to Ads Manager and click the Pixels tab from the top menu. If the status is Active, your Facebook Pixel has been installed correctly.
Manual Installation
The above method, however, works only with websites using WordPress v4.4 and above. What if your WordPress site is running on a version lower than 4.4? In that case, you have to opt for the manual setup route. Wondering how? Just follow the instructions given below:
When you’re prompt to pick an option to install the Facebook pixel code, choose βManually Install the Code Yourselfβ instead of using an Integration or Tag Manager.
Here youβll be shown where you need to put the code on your website. Simply click on the code provided in step 2 and it will be copied to your clipboard.
From the same pop-up, you can also send test traffic to your Facebook pixel to check its status – but only after installing the code on your WordPress site.
Unlike the first method, which automatically tracks what actions people are taking on your website, the manual installation provides you an option to toggle on and off events. Click βContinueβ button shown in the above image and you’ll be presented with a new pop up to select the events you’d like to track.
However, you must install the pixel base code first to make your preferred event categories work.
Now go to your WordPress Dashboard -> Appearance -> Editor and youβre your themeβs header.php file. Look for the < /head> tag, paste the copied Facebook Pixel code just before it. Update the file and you are done.
In case you’re too lazy to open the header.php file, simply use the Head, Footer and Post Injections plug-in for the same.
Using the Google Tag Manager
Additionally, if youβre already using Google Tag Manager on your WordPress site, installing Facebook Pixel through Tag Manager would also be a wise option. From the options given to install the Facebook pixel code, choose the first one βUse an Integration or Tag Managerβ and choose Google Tag Manager as your partner.
Youβll be then given two options, quick install by simply logging into your Google Account and manual installation by inserting pixel code snippets into your websiteβs code. Since the first method is quite easy, here weβll discuss the second option: manual installation.
Click βManual Installationβ and copy your pixel base code from the step 1.2 given on the next screen.
Now login to Google Tag Manager account, select your website’s container and create a new tag.
Then paste your pixel base code in the HTML field under Configure Tag.
After that, expand the Advanced Settings section and select βOnce per pageβ under Tag firing options.
Click βContinueβ, select βAll Pagesβ under βFire Onβ and click βCreate Tagβ to finish the setup.
Like the manual installation, this method also allows you to manually create action-specific tags for the different types of pages and actions taken on your WordPress site. You can do it in the same way you have installed Facebook Pixel using the Google Tag Manager, with a few minor tweaks in tag settings as shown in the image below:
Likewise, you can create action-specific tags for the other events (like add to cart, purchase, etc) on your WordPress site.
Thatβs all about adding the Facebook Pixel code to a WordPress-powered site. In case, your pixel isn’t working properly and reporting βNo Activity Yetβ instead of βActiveβ, install the Facebook Pixel Helper Chrome extension to get more information and troubleshoot the actual problem.
Check out these cool Facebook plugins from CodeCanyon
5 Responses
Oh nice, thank you for doing this, helps me out a lot!
you helped me a lot. Thank you!!!
Hello Ashish
I Want To ask what if i want to install more then one pixel through facebook partner integrations is that work in my wordpress site?
Hi Ashish,
you helped me a lot. Thank you so much!!!
Great Article Ashish – this really helped me install the Facebook Pixel on a WordPress Site – Other articles found online were not as descriptive. Thanks!