I have a messenger bot that I want to add Facebook analytics on. I am using app event api to log custom events as seen here.
In my facebook event I want to log my class as JSON so I can export that JSON from the Facebook Event Viewer to a file and use that file to do some analytics on what the users are requesting. I don’t know if this is possible so I tested using fb_content based from the event api docs.
Using the graph explorer I tried to log my custom JSON like this:
When I looked at the Event Viewer I don’t have the JSON that I logged. Is it possible to get the JSON that I log?
3
Answers
You should add all the keys you want to track inside
custom_events
, then you will be able to view the values inside Facebook Analytics’s Event Debugging sectionAs of 10/20/2017, the docs are wrong.
page_scoped_user_id:
should besenderId
notrecipientId
In your actual code, if you are using Node JS, you can make a method to log the events and call it from all the places where you need it.
You can check the following page for more info with the code and output.
https://apiai-aws-heroku-nodejs-bots.blogspot.com/2017/11/how-much-was-conversion-by-your-bot.html