Facebook Analytics Quickstart Guide for Bots for Messenger

This guide is intended to help you set up Facebook Analytics quickly so you can see data, analyze trends, and better understand the behavior of people who use your app.

1. Logging Events

Predefined Events

As soon as you have Messenger Bots running,

predefined app events

are automatically logged by the Messenger Platform.

Custom Events

In addition to the predefined events, bots can log

custom events

by using the

Application Activities Graph API

endpoint.

This table

describes the properties and values that must be provided to the endpoint to log custom bot events. Here is an

example

demonstrating how to log a purchase event using Javascript with Node.JS.

App Event Builder

You can use the following app event builder to create code for both custom events and predefined events.


2. Verifying Event Logging in Facebook Analytics

If you're an admin or a developer of a bot for Messenger, you can validate that you've correctly implemented custom event logging in Facebook Analytics. Please see our documentation on in

debugging events

in Facebook Analytics to learn how to verify that events are being logged.

Take a Guided Tour of Facebook Analytics

Now that you're logging app events, visit our demo app to take a guided tour of all of the key features that Facebook Analytics offers you and your business.

The demo app does not have an Event Debugging link. This link is only available in apps that you create.

Next Steps

Be sure to check out our other documentation pages for more advanced guides.