How to filter for offsite conversions in Facebook Marketing API?

Hey everyone,

I’m trying to use the Facebook Marketing API to get data on offsite conversions for a specific ad. Here’s what I’ve got so far:

graph.facebook.com/v3.0/ad_123456/insights?fields=actions&action_type=offsite_conversion&access_token=my_token

The problem is, I’m getting all the action types in the response, not just offsite conversions. I thought specifying ‘action_type=offsite_conversion’ would filter it, but no luck.

Am I missing something obvious here? Maybe there’s a different way to structure the API call? Any help would be awesome, as I’m kinda stuck!

Thanks in advance for any tips or explanations you can give me. Really appreciate it!

I’ve encountered this issue before when working with the Facebook Marketing API. The trick is to use the ‘action_breakdowns’ parameter instead of ‘action_type’. Here’s what worked for me:

graph.facebook.com/v3.0/ad_123456/insights?fields=actions&action_breakdowns=action_type&filtering=[{field:'action_type',operator:'IN',value:['offsite_conversion']}]&access_token=my_token

This approach allows you to specifically filter for offsite conversions. The ‘action_breakdowns’ parameter breaks down the actions by type, and then the ‘filtering’ parameter narrows it down to just offsite conversions.

One thing to note: make sure your ad actually has offsite conversions tracked. If it doesn’t, you might not get any results even with the correct API call. Also, double-check that you have the necessary permissions in your access token to view this data.

Hope this helps you get the data you need!

I’ve worked extensively with the Facebook Marketing API, and I can offer a different approach. Instead of using ‘action_type’ or ‘action_breakdowns’, try utilizing the ‘action_report_time’ parameter. This allows you to focus on offsite conversions more effectively:

graph.facebook.com/v3.0/ad_123456/insights?fields=actions&action_report_time=conversion&filtering=[{field:‘action_type’,operator:‘CONTAIN’,value:‘offsite_conversion’}]&access_token=my_token

This method ensures you’re getting conversion data specifically for offsite actions. Remember to adjust the API version if needed, as newer versions might offer improved functionality for this type of query. Also, ensure your access token has the appropriate permissions to fetch this data.

If you’re still encountering issues, consider breaking down your request into smaller time intervals. Sometimes, large datasets can cause unexpected behavior in the API response.

hey, i’ve dealt with this before. try using the ‘breakdowns’ parameter instead. something like:

graph.facebook.com/v3.0/ad_123456/insights?fields=actions&breakdowns=action_type&filtering=[{field:‘action_type’,operator:‘CONTAIN’,value:‘offsite_conversion’}]&access_token=my_token

this should give u just the offsite conversion data. goodluck!