Facebook Analytics: user properties and logged events using graph API

时光怂恿深爱的人放手 提交于 2019-12-14 03:45:58

问题


I have facebook app (Messenger Bot App) where I am logging custom events for each user using the graph API endpoint /application/activities/

The events are logged perfectly. What I want to do is creating custom properties for my messenger bot users so I could segment the app data using this properties as described on: https://developers.facebook.com/docs/analytics/properties

So what I did was using the graph API endpoint /application/user_properties/ to create the properties.

It returned "success", the properties were created perfectly and I can see them as possible filters for segmentation on the app analytics page. But this filters always return no results!

I think the problem is: events are logged for specific "fb_user_id" but in user properties endpoint there is nothing to relate "fb_user_id" with the newly created properties.

on FB documentation https://developers.facebook.com/docs/analytics/properties it is stated:

When you set a user ID, this ID is stored on the user's device and included in app events logged from that device.

This means when calling the event logging endpoint there should be a parameter to hold the user id created by me when setting the user properties. But I am not able of finding this parameter. I tried send it as custom_events["_app_user_id"] but results remains the same and on app analytics page I can see the filters but it is useless.


回答1:


Whereas custom_events["_app_user_id"] is the field for app event payloads, it looks like the field is custom_events["user_unique_id"] for user property payloads.



来源:https://stackoverflow.com/questions/40829743/facebook-analytics-user-properties-and-logged-events-using-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!