5

I've been fighting with the Facebook Marketing API in the last days. I simply want to retrieve the cost_per_action_type but matched with the campaign's objective.

I've discovered this: https://developers.facebook.com/docs/marketing-api/reference/ads-action-stats/.

But I simply cannot retrieve that data! I didn't find any working examples or at least guides on the web. I pasted some links below but they aren't of any help. Maybe this is how connected to the insights API, but I don't know how.

Do you have any idea?

Related: Match facebook campaign objective with insights actions types https://github.com/facebook/facebook-php-ads-sdk/issues/278

asked Feb 19, 2017 at 19:43
3
  • hey. did you solve this? Commented Sep 28, 2020 at 5:08
  • Hey @Adam, no, I didn't. Commented Sep 28, 2020 at 9:00
  • ohh. I am actually calling act_<AccountId>/insights endpoint successfully but i could only get a few of the AdActionsStats types. For example purchase_roas comes back with values but converted_product_quantity it doesn't. so weird Commented Sep 29, 2020 at 4:18

2 Answers 2

2

The way to get the cost per action type is with this endpoint:
<campaign ID>/insights?fields=cost_per_action_type

You can substitute Campaign ID with Adset ID if you prefer.

answered May 16, 2017 at 17:00
Sign up to request clarification or add additional context in comments.

Comments

1

I faced the same problem like you, I use almost one day to figure it out. The point is you cannot reach the Ads Action Stats, the reason why is that the just mean status of the ads-insight; therefore,you would just see

 website_ctr [{'action_type': 'link_click', 'value': '0.714286'}]
cost_per_action_type [{'action_type': 'link_click', 'value': '30'}, {'action_type': 'landing_page_view', 'value': '30'}, {'action_type': 'post_engagement', 'value': '30'}, {'action_type': 'page_engagement', 'value': '30'}, {'action_type': 'omni_view_content', 'value': '15'}]
cpc 7.5
cpm 214.285714
spend 60
date_start 2019年06月03日
date_stop 2019年07月03日
age 35-44

you can find that [{'action_type': 'link_click', 'value': '30'}, {'action_type': 'landing_page_view', 'value': '30'}, {'action_type': 'post_engagement', 'value': '30'}, {'action_type': 'page_engagement', 'value': '30'}, {'action_type': 'omni_view_content', 'value': '15'}] is the Ads Action Stats you want.

answered Jul 11, 2019 at 9:41

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.