[英]Facebook marketing API: How to get the optimization event
Using the NodeJs (and also the REST API) Facebook marketing API I'm trying to know which Ad Sets are optimizing which event (e,g, add_to_wishlist
)使用 NodeJs(以及 REST API)Facebook 营销 API 我想知道哪些广告集正在优化哪些事件(例如,
add_to_wishlist
)
To do that I'm fetching all ad sets:为此,我正在获取所有广告集:
import bizSdk = require('facebook-nodejs-business-sdk'); // v8.0.0
bizSdk.FacebookAdsApi.init('myaccesstoken')
const adAccount = new bizSdk.AdAccount('act_XXXXX');
const adSets= await adAccount.getAdSets([bizSdk.AdSet.Fields.optimization_sub_event,bizSdk.AdSet.Fields.optimization_goal]);
I always get NONE
for the optimization_sub_event field and VALUE
or OFFSITE_CONVERSIONS
for optimization_goal对于 optimization_sub_event 字段和
VALUE
或OFFSITE_CONVERSIONS
对于 optimization_goal,我总是得到NONE
More over, I tried to fetch ALL fields possible and look for my event names but without success.此外,我尝试获取所有可能的字段并查找我的事件名称,但没有成功。
Is there away to achieve that using the API?有没有办法使用 API 来实现这一点?
Fetch the field promoted_object
.获取字段
promoted_object
。 The value for a custom event will have this structure:自定义事件的值将具有以下结构:
promoted_object: {
"application_id": "994*******818",
"custom_event_type": "OTHER",
"object_store_url": "http://play.google.com/store/apps/details?id=com.*****",
"custom_event_str": "my_custom_event_name" // this is what you want
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.