Page Messaging Insights API

Messenger Platform already supports several ways for users to check analytics for their bot via web interface.

With the Page Messaging Insights API, you can programatically retrieve the same information a user might see if they view the Page Insights tab for their Facebook page.

We provide two Messenger specific metrics via the Pages Insights API:

  • page_messages_active_threads_unique: daily unique active thread counts.
  • page_messages_feedback_by_action_unique: daily unique conversation counts broken down by user feedback actions, including
    1. messaging turn-ons
    2. messaging turn-offs
    3. thread deletions
    4. report spams
    5. others

For further information about the Pages Insights API, including information on other metrics available and the permissions required, please see the Pages Insights documentation, or the Insights object reference.

Getting Daily Unique Active Thread Counts

To get daily unique active thread counts, send a GET request:

curl -X GET "https://graph.facebook.com/v2.8/me/insights/page_messages_active_threads_unique&access_token=PAGE_ACCESS_TOKEN"

Response

If the call was successful, you will get back the following response:

{ 
  "data": [ 
    { 
      "name": "page_messages_active_threads_unique", 
      "period": "day", 
      "values": [ 
        { 
          "value": 83111, 
          "end_time": "2017-02-02T08:00:00+0000" 
        }, 
        { 
          "value": 85215, 
          "end_time": "2017-02-03T08:00:00+0000" 
        }, 
        { 
          "value": 87175, 
          "end_time": "2017-02-04T08:00:00+0000" 
        }
     ], 
     "title": "Daily unique active threads count by thread fbid", 
     "description": "Daily: total unique active threads created between users and page.", 
     "id": "1234567/insights/page_messages_active_threads_unique/day" 
    } 
  ],
}

Fields

Property Name Description

value

Number of active thread counts in the period.

Getting Daily Unique Conversation Counts

To get daily unique conversation counts, send a GET request:

curl -X GET "https://graph.facebook.com/v2.8/me/insights/page_messages_feedback_by_action_unique&access_token=PAGE_ACCESS_TOKEN"

Response

If the call was successful, you will get back the following response:

{ 
  "data": [ 
    { 
      "name": "page_messages_feedback_by_action_unique", 
      "period": "day", 
      "values": [ 
        { 
          "value": { 
            "TURN_ON": 40, 
            "TURN_OFF": 167, 
            "DELETE": 720, 
            "OTHER": 0, 
            "REPORT_SPAM": 0 
          }, 
          "end_time": "2017-02-02T08:00:00+0000" 
        }, 
        { 
          "value": { 
            "TURN_ON": 38, 
            "DELETE": 654, 
            "TURN_OFF": 155, 
            "REPORT_SPAM": 1, 
            "OTHER": 0 
          }, 
          "end_time": "2017-02-03T08:00:00+0000" 
        }
      ], 
      "title": "Daily unique conversation count broken down by user feedback actions", 
      "description": "Daily: total unique active threads created between users and page.", 
      "id": "1234567/insights/page_messages_active_threads_unique/day" 
    } 
  ],
}