我跟着导游来了:https://developers.facebook.com/docs/marketing-api/offline-conversions
与“常规”事件集(在仪表板中包含"Test“选项卡)不同,脱机事件集似乎没有此功能。您必须上传CSV或调用API。
然而,离线事件集根本不显示来自API的数据;历史选项卡只显示CSV上传,这是“10天前最后一次收到的”。它甚至不包括我今天做的测试上传。
这是一个错误吗?,我应该等多久才能让数据出现在事件管理器中呢?
样本调用
POST https://graph.facebook.com/v15.0/<offline_event_set_id>/events?access_token=<system_user_access_token>
{
"upload_tag": "store_data",
"data": [
{
"match_keys": {
"em": "<hashed>",
"ph": "<hashed>"
},
"currency": "PHP",
"value": 100,
"event_id": "test",
"event_name": "Purchase",
"event_time": "1669633380",
"custom_data": {
"event_source": "in_store"
},
"action_source": "physical_store",
"order_id": "test",
"data_processing_options": []
}
]
}答复如下:
{"id":"<offline_event_set_id>","num_processed_entries":1} 这似乎表明事件已成功上传。但是,该事件从未出现在离线事件集的概述选项卡中。
如果你能从其他地方得到任何见解/指导/答案的话,我已经花了几天时间在这上面,但没有成功。
发布于 2022-12-01 11:27:34
“错误”:我将event_time编码为一个字符串,而Facebook则期望这个值是一个整数。在更新我的帖子正文以更正后,事件在几分钟内就会出现在“概述”选项卡中。
{
"upload_tag": "store_data",
"data": [
{
"match_keys": {
"em": "<hashed>",
"ph": "<hashed>"
},
"currency": "PHP",
"value": 100,
"event_id": "test",
"event_name": "Purchase",
"event_time": 1669633380, // <-- The only change was removing the quotes
"custom_data": {
"event_source": "in_store"
},
"action_source": "physical_store",
"order_id": "test",
"data_processing_options": []
}
]
}我真希望Facebook能回复一些错误或警告,但至少我发现了这个问题。各位,小心你的数据类型!
https://stackoverflow.com/questions/74640910
复制相似问题