I am working with the Facebook Marketing API and am interested in knowing the number of people that made a purchase after interacting with a specific ad/ad campaign. So for example, I want to see for a given time period that Campaign X had a reach of Y, and of those Y users Z made a purchase. Reach is straightforward, but I am confused as to how one calculates purchases.
The insights API allows me to calculate action_values
for a campaign, which should give number of actions by action_type
. Looking at action_type
, I see a number of possibly relevant fields:
commerce_event.purchase
: Commerce purchases
offsite_conversion.fb_pixel_purchases
: Purchases
onsite_conversion.purchase
: On-Facebook purchases
But wait, there's more. Under grouped action types, we have:
offsite_conversion
offline_conversion
onsite_conversion
purchase
I would think that adding offsite and onsite purchases would work, but then what is a "commerce purchase"? The grouped action that is just called purchase is also tempting. How can I get what I'm after?
Also, is there any way to get dollar amounts associated with these purchases? The insights API has a field for ROAS which means it must be recording revenue somewhere. How can I get at that? And does ROAS include on-Facebook purchases?
It really depends on the way you have the measurement integrated on your website (or mobile app).
Typically you'd use Facebook Pixel (setup and details: https://developers.facebook.com/docs/facebook-pixel/pixel-with-ads/conversion-tracking), which sends events from your website to FB.
Once you have the pixel set up and you can see FB receiving events, you can proceed to loading the stats through Insights API.
Most used action type is offsite_conversion.fb_pixel_purchase
, but it really depends on which evens you integrated on your website. There's a lot to choose from.
Semantics of those metrics is as follows:
actions
- counts of actions
value
- actually count of actions, in default attribution modelaction_values
- values according to action type, e.g. purchased goods price
value
- value of actions, in default attribution modelIf you're interested in different attribution models, there are additional fields on actions
and action_types
that have those numbers broken down to after-click/view.