我已经完全阅读了动态脸书marketing.Also的文档,成功地创建了一个基于自定义受众和像素events.But的广告,问题是每次我创建广告时,它都会在广告模板中显示相同的产品。
下面是设置Product set的代码
product_set = ProductSet(None, <CATALOG ID>) # <CATALOG ID>
product_set[ProductSet.Field.name] = 'Product Set'
product_set[ProductSet.Field.filter] = {
'product_type': {
'i_contains': 'example product type',
},
}
product_set.remote_create()
product_set_id = product_set[ProductSet.Field.id]
设置campaign和adset后创建广告的代码:
adset = AdSet(parent_id='<ACCOUNT_ID>')
adset[AdSet.Field.name] = 'Product Adset'
adset[AdSet.Field.bid_amount] = 9100
adset[AdSet.Field.billing_event] = AdSet.BillingEvent.link_clicks
adset[AdSet.Field.optimization_goal] = AdSet.OptimizationGoal.link_clicks
adset[AdSet.Field.daily_budget] = 45500
adset[AdSet.Field.campaign_id] = campaign_id
adset[AdSet.Field.targeting] = {
Targeting.Field.publisher_platforms: ['facebook', 'audience_network'],
Targeting.Field.device_platforms: ['desktop','mobile'],
Targeting.Field.geo_locations: {
Targeting.Field.countries: ['IN'],
},
Targeting.Field.product_audience_specs: [
{
'product_set_id': product_set_id,
'inclusions': [
{
'retention_seconds': 2592000,
'rule': {
'event': {
'eq': 'ViewContent',
},
},
},
],
'exclusions': [
{
'retention_seconds': 259200,
'rule': {
'event': {
'eq': 'Purchase',
},
},
},
],
},
],
Targeting.Field.excluded_product_audience_specs: [
{
'product_set_id': product_set_id,
'inclusions': [
{
'retention_seconds': 259200,
'rule': {
'event': {
'eq': 'ViewContent',
},
},
},
],
},
],
}
adset[AdSet.Field.promoted_object] = {
'product_set_id': product_set_id,
}
adset.remote_create()
adset_id = adset[AdSet.Field.id]
你们能帮我从产品集创建动态产品吗?
发布于 2017-05-17 04:40:43
您的产品目录中是否有product_type包含“example product type”的项目?您可以调用api来验证/<PRODUCT_SET_ID>?fields=product_count,products
设置的该产品下有多少个产品
当广告开始运行时,它会自动呈现产品集中的相关产品。
对于创造性预览,您可以指定要在预览中呈现的特定产品项目:例如product_item_ids=["catalog:1000005:MTIzNDU2"]
有关动态广告创意预览的更多细节,请访问:https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/ads-management/v2.9
https://stackoverflow.com/questions/39363750
复制相似问题