Digital Prosperity Blog

How To Use The Facebook Tracking Pixel Correctly

When you're getting traffic from Facebook Ads, you need to know which ads are getting you subscribers and sales.

Instead of using a different tracking link for each ad (which gets very messy!), Facebook have been kind enough to include their own tracking feature, which they call a "pixel".

This is simply a piece of code Facebook gives you that you put on your web pages. When people land on a page containing this pixel code, it tells Facebook, "hey, someone landed on this page!".

You can customize the code to tell Facebook different things, like "hey, someone became a subscriber!", or the same thing for a sale - including the dollar amount - and more.

It's super important you set this up, as it allows you to see specifically which ads are getting you good results and which aren't, so you can pause the losers and scale the winners.

The end result will look something like this...

Facebook Conversions Reported

(Yes, that "Tot..." column is "Total Conversion Value", i.e. how much I earned in sales from that particular ad.)

Even though Facebook have their own help section about this and many other experts have covered this before now, my coaching clients and customers have been begging me to release an easier-to-understand guide for it, as it can be confusing if you're brand new to this stuff.

So to begin with, you need to log into your Facebook Ads Manager, then click the menu button at the top left of the screen (it says "Ads Manager with three horizontal lines to the left of it). In this menu, click on "Pixels".

If you don't see this link, click "All Tools" at the bottom of the menu to show the full range of menu options.

Facebook Pixels Menu Link

You may now be prompted to create the pixel if you haven't already. In this case, just name it after your business's name or your own name.

On that page, click "Actions" in the top menu, then "View Pixel Code" to view the code for your tracking pixel.

View Facebook Pixel

Now this is the part where most people screw it up.

The code that Facebook give you at this point is only good for tracking page views, which will NOT report a "conversion" in your ad statistics.

So feel free to paste this code into the code of your web pages, immediately after where it says "<head>", remembering to re-upload the page to your website after doing so.

Or if you're using something like WordPress for your sales funnel pages, you can install a plugin called "HiFi", which allows you to add code to the <head> section of any page you choose. Just edit the page like normal, and you'll see the field below the main content editing box.

This should be done on every page of your website which will be used with Facebook Ads, but we'll need to edit the code slightly to report new conversions like subscribers and sales.

Full disclaimer: Facebook do provide their own explanation of the pixel on this page, but here's the beginner-friendly version...

The pixel is made up of the standard "base" code (i.e. code which shouldn't be changed), and something called a "standard event".

Facebook Pixel Code Example
Full credit: https://www.facebook.com/business/help/952192354843755

A standard event is just a fancy way of saying "conversion type".

So this could report back to Facebook that by landing on that page, the visitor has just became a "lead" / "subscriber" in your business, or they just purchased something, and so on.

As you can see in the above example, to report a lead, all you need to do is copy and paste the...

fbq('track', 'PageView');

... Code onto the next line, but change "PageView" to "Lead". That way it will report to Facebook that someone viewed this specific page, and also became a lead/subscriber by doing so.

This type of "lead" conversion pixel should only be placed on the page which is shown immediately after somebody opts into your list.

So if you have your own products, this will be your one-time offer page. Or as an affiliate, this will be your content delivery page (similar to a "download page").

You can also report other events, such as making a purchase, completing a registration, and more. Here's a table with the full list, taken from the official guide here.

Website action Standard event code
View content fbq('track', 'ViewContent');
Search fbq('track', 'Search');
Add to cart fbq('track', 'AddToCart');
Add to wishlist fbq('track', 'AddToWishlist');
Initiate checkout fbq('track', 'InitiateCheckout');
Add payment info fbq('track', 'AddPaymentInfo');
Make purchase fbq('track', 'Purchase', {value: '0.00', currency: 'USD'});
Lead fbq('track', 'Lead');
Complete registration fbq('track', 'CompleteRegistration');

But as a marketer in our industry, aside from the "Lead" conversion event, you'll probably only need the "make purchase" conversion event. So let's talk about that...

Where it says...

value: '0.00'

... That's basically Facebook saying, "how much was the thing they purchased?". So just change the 0.00 to the price of the product - without a currency symbol. So for example, for a $27 product, I'd change this to simply...

value: '27.00'

... Then the next section...

currency: 'USD'

... Is simply saying the currency used is US Dollars. If you're charging people in a different currency, then you can change the USD to the appropriate currency code.

Here's a list of them all if you're not sure of the currency code for your chosen currency.

Then like before, paste this full pixel code on the web page which is shown immediately after their purchase goes through (usually the upsell page or order confirmation page), just after the <head> tag in the web page's code.

Once these pixel codes are places on the right pages, you'll then be able to see the conversions within your Facebook Ad statistics, like so...

Facebook Conversions Reported

Then it's just a matter of optimizing your ads in the correct way to get a positive return on your investment.

If you'd like some help with this opimization, I recommend grabbing our swipe file of our most profitable Facebook Ads ever. It's 100% free.

They come in template form, so you can simply "copy and paste" them into your own campaigns.

Happy optimizing!
- James Francis.
Founder & CEO, Digital Prosperity.

Like this post? Please share it below:

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on google
Google+

2 Responses

Leave a Reply

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