If you’ve used Facebook for any length of time, you’ll be familiar with Facebook ads in your timeline.
You’ve also probably visited a website, gone to Facebook and then noticed an ad for the very thing you were looking at minutes before!
What’s going on? Is the business psychic?
The truth is that they’re using something called the Facebook pixel to retarget their users. That is, they serve an ad to someone who’s already expressed an interest in their product or service.
All business owners with a Facebook account can take advantage of this technology to reach their most engaged prospects.
If your site runs WordPress, the first part of that process is to add the Facebook pixel to WordPress.
Here are the points I’m going to run through:
- What is the Facebook pixel?
- What kind of data does the Facebook pixel collect?
- I’m not running Facebook ads – do I need the Facebook pixel?
- Where do I get the Facebook pixel?
- How to add the Facebook pixel to WordPress
- Check that the pixel is working
What is the Facebook pixel?
The Facebook pixel is a piece of code for your website that enables you to measure, optimize and build audiences for your ad campaigns.
Facebook used to have two types of pixel – conversion tracking and Custom Audience pixels. They have now consolidated those into one for simplicity.
The pixel itself is a 1×1 px image (a tiny dot that makes up a larger image). When set on a web page, it sends information to a server which sets a cookie in the user’s browser.
What kind of data does the Facebook pixel collect?
The Facebook pixel will tell you:
- How many people visited your site in a given time period
- Which pages your visitors went to
- What type of device they used (desktop, mobile or tablet)
There are also options to collect data from specific events, such as email signups, views of particular pages or purchases made.
I’m not running Facebook ads – do I need the Facebook pixel?
If you have plans to run Facebook ads in the future, you can start the data collection now. You can retrieve data up to 180 days old.
I won’t go into the how of running Facebook ads in this post.
Suffice it to say that you can gain insights into your audience’s age, gender, job and relationship status via the Facebook pixel. Using this information you can create laser-targeted Facebook ads.
Read more about Facebook custom audiences and creating Facebook ads
- The Importance of the Facebook Pixel
- How to Get Deeper Insights on Your Website Visitors Using the Facebook Pixel
- The Ultimate Facebook Advertising Blueprint
Where do I get the Facebook pixel?
You need a personal Facebook account, and to be logged in.
Choose Create Adverts from the dropdown menu accessible from the white arrow. (I’ve highlighted it with a red border in the screenshot.)
You will momentarily see this:
Then the Facebook Adverts Manager.
Clicking on the hamburger menu is supposed to bring up a mega menu where you can select the Pixels option.
If you find you can’t click on it, as I did, use this link to go directly to the Facebook pixel section of the Ads Manager.
You should see this screen:
Select the Create a Pixel button at the bottom.
Name your pixel – I renamed mine to A Bright Clear Web Pixel.
Read the Facebook pixel terms. Choose Next.
The pixel will be created and you get a confirmation.
Well done! Now you have to add the code to WordPress.
How to add the Facebook pixel to WordPress
Choose how you want to install the pixel.
If you’re using Google Tag Manager already you can go for the first option, Use an integration or tag manager.
Otherwise, choose the second option, copy and paste the code.
Carry out step 1, Install the pixel base code, by copying the generated code.
(In the screenshot, I’ve blanked out the tracking code, which is a numerical ID unique to you.)
You will paste this code into the header section of your website. Your site must be running a self-hosted WordPress.org installation (not WordPress.com) to do this.
Your WordPress theme might have an area in theme settings to do this. My theme (Genesis) does.
Go to Settings > Insert Headers and Footers.
Paste the code into the Scripts for Header area and save.
The following step, adding code to specific pages to track events, is something you can leave at this stage. You can add event tracking later when you know what you want to track!
Check that the Facebook pixel is working
Facebook give you a step to follow to make sure the pixel is installed correctly.
I must admit I didn’t bother with this and left it to its own devices. I later got a Facebook notification to say the pixel was up and running.
Facebook have created the Pixel Helper tool to troubleshoot pixel errors. Make sure you have the Chrome browser to install it.
Clicking on the icon in the browser bar will show you the pixel on your site or any other.
Why? You need to inform your users about the information you collect from them and how you use it.
Let your users know that you are using the Facebook pixel and tell them how they can opt out of data collection.
Not everyone finds using the Facebook pixel appropriate. King County local government authority decided not to use the Facebook pixel because:
Facebook’s page Cookie Consent Guide for Sites and Apps suggests that the following is a potential case for asking for consent:
A Facebook advertiser who installs the Facebook or Atlas pixel on its website in order to measure ad conversions or retarget advertisements on Facebook
It goes on to suggest that consent could be asked for and given by means of a banner or notice on the website with a button to indicate agreement.
However, Heather Burns, who writes about laws relating to web professionals, wrote in a recent blog that the EU have acknowledged cookie consent fatigue. From May 2018, the onus will be on web browsers to manage consent.
I asked Heather what her recommendation was regarding the Facebook pixel and user consent.
— Heather Burns (@WebDevLaw) April 4, 2017
GDPR is the new EU data protection law that comes into force in 2018. It is going to affect everyone that holds personal data on Europeans – whether you live within or outwith Europe. There will be hefty penalties for non-compliance with the new law.
The links Heather recommended are to services that allow opt-outs to advertising services.
To think about
Are you using the Facebook pixel on your WordPress site?
How are you keeping your users informed about the privacy of their information?