8 min read

How Facebook Conversion Attribution (Really) Works

When you spend money to advertise on Facebook, or any platform for that matter, you want to know what you’re getting in return:

  • How many sales did my ads generate?
  • How many downloads?
  • How many signups?

Whatever your KPIs may be, you have to be able to accurately measure them to gauge success and optimize your ads.

You can run into trouble if your conversion tracking isn’t setup correctly or–more commonly–you’re misinterpreting the results.

Facebook’s ad product is world-class, but their conversion attribution is about as clear as a pint of Guinness.

The Most Confusing Thing™

I’ve used conversion reports in dozens of products and none of them work quite like Facebook’s.

If you use common sense to interpret your Facebook ad performance reports, you’ll be wrong.

The easiest way to illustrate this is to run a report for a single day. I’ll pick June 5th. Here’s what I see:

Facebook ROI Data for June 5

But if I look at my actual sales history in Stripe, I didn’t sell 129 units in total on June 5th, let alone via Facebook. I only sold 50 units that day.

If you intuitively understand that a Facebook performance report for June 5th isn’t designed to show you conversions that happened on June 5th, and you know exactly which transactions it is reporting, congrats! You probably don’t need this article.

If, on the other hand, you’re as confused as I was, please read on.

The Facebook Pixel

Let’s start at the very beginning (🎶 a very good place to start 🎶).

Facebook conversion tracking has actually become simpler over time. There used to be two separate components to install:

  • Website Custom Audience Pixel
  • Conversion Pixels

Now you just have one thing: The Facebook Pixel.

It’s just a bit of JavaScript code that you deploy on each page of your site. Think of it just like your Google Analytics snippet.

You can copy/paste it into the header of your site or deploy it via Segment or Google Tag Manager.

The pixel code runs every time someone loads a page on your website–whether the traffic came from Facebook or not–and tells Facebook what happened:

  • They viewed a page
  • They made a purchase for $500
  • They downloaded an ebook

These events are called “Pixel Fires” (my new indie rock band name! 🔥).

The standard “PageView” event will fire by default whenever a page loads. In order to fire other events, you have to add custom code to tell Facebook that the event happened.

For example, on your purchase confirmation page you might add the following code to tell Facebook to fire a “Purchase” conversion:

fbq('track', 'Purchase', { 
    content_type: 'product',
    content_ids: ['1234', '2345'],
    value: 67.50,
    currency: 'USD'
});

Note: Instead of writing Facebook-specific event tracking code, I’d highly recommend using something like Segment so that you can write vendor-agnostic tracking code once and have it sent to any tool in your marketing stack (I go into great detail on how to do that in my $9 Marketing Stack article).

Also, try to stick to the 9 standard events Facebook provides. You can fire a custom event like this:

fbq('trackCustom', 'Viewed Post', {custom_param: 'custom_value'});

But that event can only be used for audience building NOT conversion tracking and optimization per Facebook’s docs:

Building audiences has the added benefit of being able to use trackCustom in order to build more specific audiences that are not covered by 1 of the 9 standard events. You can continue to pass customData into these events for more granular audience building. However, you can not track or optimize for conversions based on custom events at the current time.

A little-known caveat is that you can map that custom event to a standard event using the “Custom Conversions” feature in Facebook:

Mapping a Custom Event to a Custom Conversion in Facebook

Once you do that, it’ll work just like the standard events: you can report on ad performance and optimize ads based on it.

Custom Conversions are pretty awesome because you can fire them based on URL patterns. This eliminates the need to manually add custom fbq tracking code to specific pages. Anything event that is trackable based on URL alone can be done via Custom Conversions.

Custom Conversions Based on URL Patterns

More on setting up your conversion tracking here.

Note: If you’re an e-commerce business and you run on Shopify they do all the heavy-lifting for you. You basically give them your pixel ID and they take care of firing all the right events at the right times (AddToCart, Purchase, ViewContent).

Because Shopify orchestrates the whole shopping and checkout process for you, they can automatically insert the events and properties Facebook needs. Beautiful!

Troubleshooting your pixel

Once you’ve got your conversion tracking instrumented, it’s a good idea to validate that the data you see in your “source of truth” matches the data that Facebook is getting from its pixel.

To see the number of pixel fires for a given day, click on the main menu and go to Assets –> Pixels.

Then find the event you want to validate and hover over the little graph:

Facebook Pixel Traffic

Facebook Pixel Traffic

This number should match your source of truth based on the day the action occurred.

  • If you recorded 50 sales in Stripe on June 5th, Facebook should show ~50 “Purchase” pixel fires for June 5th
  • If you recorded 50 leads in HubSpot on June 5th, Facebook should show ~50 “Lead” pixel fires for June 5th

We aren’t doing any attribution yet. Pixel fires happen every time an event happens whether it was influenced by Facebook or not. If this raw data doesn’t match then your attribution reports will always be wrong.

I also highly recommend installing the Pixel Helper tool and running through the key actions on your site to see if there are any gnarly issues like loading multiple pixels or tracking an invalid event.

Understanding attribution

OK, now that you have all the conversion data cleanly flowing from your website to Facebook, it’s time to figure out how many of those conversions Facebook should get credit for. That’s what attribution’s all about.

Remember our June 5th mystery? Only 50 total sales yet Facebook takes credit for 129.

Facebook ROI Data for June 5

Here’s what Facebook is really saying in its reports:

Of the people who last viewed or clicked an ad on June 5th, 129 of them purchased since.

So, if I’d run the June 5th report on June 7th, just two days later, that number would very likely have been well below 50. But now, over a month later, all of those June 5th ad viewers and clickers have had a long time to convert. Heck, they may have even been influenced by non-Facebook marketing efforts.

Some may have purchased on June 6th, some on June 26th. They all get attributed back to June 5th’s ads because that’s the last time they were exposed to them.

Facebook Attribution Report

✨ Big huge takeaway ✨

💡
Conversions are counted on the day the ad click/view happened NOT the day the conversion happened.

There are some ground rules, though…

Conversion has to be within your window

Facebook doesn’t take credit for conversions due to ad clicks/views in perpetuity. The conversion has to occur within your (adjustable) attribution window (more on this in a sec).

Clicks always get credit over views

The last ad clicked always takes credit for subsequent conversions. If there was never a click, the last ad viewed gets credit. The $ will only ever be attributed to one date and one ad. Example:

Example Attribution Scenario

Many things count as a “click”

Click-through attribution may include engagement clicks, such as likes, comments or shares on your ad. This means if someone liked your ad, conversions would be attributed to the click-through attribution window you’ve selected.

Attribution windows

The default attribution window in Facebook is:

  • 1 day for a view
  • 28 days for a click

This means that if I view an today, I have one day to convert for that ad to get credit. If I click an ad today, I have 28 days to convert for that ad to get credit. If I convert outside these windows, Facebook will not take credit.

If you click on “Customize Columns” you can compare conversion windows side-by-side in your ad reports:

Comparing Facebook Attribution Windows

You can also change your default windows in Ad Account Settings –> Attribution.

In general, the wider you make your window, the more credit your Facebook ads are likely to get. But this depends on your business model, audience, and the type of ad you’re running.

I find that conversions on ebook download ads are almost exactly that same whether I use 1-day or 28-day click attribution windows because people usually act right away, if at all, on an ebook.

For e-commerce, I find that purchase conversions change drastically when I adjust the window. It’s common to view/click an ad, shop around, create a cart, and then checkout at a later date (maybe after getting an abandoned cart email).

You have to play around and see what works for you.

Facebook’s cross-device attribution power

Facebook is one of the few ad platforms that can measure when someone views an ad on their iPhone and later converts on their laptop. If you login to Facebook (or Instagram or Messenger or WhatsApp) on both devices, Facebook can rely on identity and device data instead of simply relying on browser cookies.

It’s creepy, but also illuminates user behavior. You can run cross-device reports to see if people are viewing/clicking ads on mobile and then hopping over to desktop to convert. Or not.

Final thoughts

Perhaps the most important takeaway from this Goliath of an article is that before you attempt to do any sort of ROI analysis, take the time to research and study how your tool’s attribution works, lest be led astray.

Also, unless you market exclusively on Facebook, it’s important to realize that other channels could be influencing conversions that Facebook is taking credit for.

That’s why I like using the very tight 1-day default window for view attribution. We passively scroll through so many ads in our Facebook feeds. It’s hard to justify giving credit to a Facebook ad that someone viewed, but didn’t click, for a purchase occurring two weeks later. By definition, a view attribution only happens in the absence of a click, so perhaps that ad view meant nothing.

Consider this example where you’re doing heavy email marketing in addition to Facebook ads:

So, if you’re doing multi-channel marketing, ask yourself “How likely is it that some other channel is attracting people to my site and now they’re seeing (and ignoring) the Facebook ads I’m retargeting them with?”

Multi-channel and multi-touch attribution is probably the single most challenging topic in marketing. Many products purport to do this automatically and perfectly, but I will tell you quite confidently they can’t. For many reasons. A white whale, I tell you! More on this another time.

⛳️