FQL:insights

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

The insights table contains statistics about applications, pages, and domains. Available metrics include application and page hits, adds, removes, and likes. The Metrics section contains a complete list of available metrics.

Without a session, an application can retrieve only its own metrics. With a user session, it is possible to retrieve data for all applications, pages, and domains owned by the session user. Reading this data requires the read_insights extended permission</a>.

To retrieve metrics from the table, you must specify an object_id, a time range described by end_time and period, and a metric.

Columns

Highlighted rows are indexable / searchable and one is usually required in the WHERE portion of the query.

Name Type Description
object_id int The object for which you are retrieving metrics.
metric string The usage data to retrieve.
end_time int The end of the period during which the metrics were collected, expressed as a unix time.
period int The length of the period during which the metrics were collected, in seconds.
value mixed The value of the requested metric.

Examples

SELECT metric, value FROM insights WHERE object_id=111605505520003 AND metric='page_like_adds' AND end_time=1272351600 AND period=86400 
SELECT metric, value FROM insights WHERE object_id=111605505520003 AND metric='page_like_adds' AND end_time=end_time_date('2010-04-26') AND period=period('day')

Notes

  • Insights are available for pages, applications, and domains with 30 or more connections.
  • All values for the end_time should be specified as midnight, Pacific Daylight Time.
  • A special function, end_time_date() , is available for the end_time field. The function takes a date string in 'YYYY-MM-DD' format and returns the appropriate value for end_time .
  • Available periods include day ( 86400 ), week ( 604800 ), month ( 2592000 ), and lifetime ( 0 ). Not all periods are available for all metrics.
  • A special function, period() , is available for the period field. The function takes as a string one of the four values for end time: 'day' , 'week' , 'month' , 'lifetime' . It returns the length of the given period in seconds.
  • To obtain data for the 24-hour period starting on September 15th at 00:00 (i.e. 12:00 midnight) and ending on September 16th at 00:00 (i.e. 12:00 midnight), specify 1284620400 as the end_time and 86400 as the period.
  • The _unique suffix indicates the number of unique users who performed a specific action.
  • The _login and _logout suffixes indicate page views by users logged in to Facebook and users not logged in to Facebook.
  • The _source suffix indicates that the metric will be broken down into a list of referral sources. External referrals are broken down by domain. Internal referrals are broken down by Facebook-specific features such as 'Profile', 'Search', 'Requests', 'Suggestions', 'Stream', etc.

Metrics

Application Users

  • application_active_users

    Available Periods: day, week, month

    Users who have engaged with your application or viewed your application

  • application_active_users_locale

    Available Periods: day

    Top locales of your active users

  • application_active_users_city

    Available Periods: day

    Top cities of your active users

  • application_active_users_country

    Available Periods: day

    Top countries of your active users

  • application_active_users_gender

    Available Periods: day

    Gender of your active users

  • application_active_users_age

    Available Periods: day

    Age of your active users

  • application_active_users_gender_age

    Available Periods: day

    Gender and age demographics of your active users

  • application_installed_users

    Available Periods: lifetime

    Total installations of your application or connections to your Connect application

  • application_installed_users_locale

    Available Periods: lifetime

    Top locales of your application's installed user base

  • application_installed_users_city

    Available Periods: lifetime

    Top cities of your application's installed user base

  • application_installed_users_country

    Available Periods: lifetime

    Top countries of your application's installed user base

  • application_installed_users_gender

    Available Periods: lifetime

    Gender of your application's installed user base

  • application_installed_users_age

    Available Periods: lifetime

    Age of your application's installed user base

  • application_installed_users_gender_age

    Available Periods: lifetime

    Gender and age demographics of your application's installed user base

  • application_installation_adds

    Available Periods: day

    New installations of your application or connections to your Connect site. Follows acceptance of your Terms of Service

  • application_installation_adds_unique

    Available Periods: day

    New installations of your application or connections to your Connect site. Follows acceptance of your Terms of Service

  • application_installation_removes

    Available Periods: day

    Removed installations of your application or connections to your Connect site

  • application_installation_removes_unique

    Available Periods: day

    Removed installations of your application or connections to your Connect site

  • application_tos_views

    Available Periods: day

    Impressions of the Terms Of Service dialog of your application

  • application_tos_views_unique

    Available Periods: day

    Impressions of the Terms Of Service dialog of your application

  • application_permission_views_top

    Available Periods: day

    Impressions of each Permissions dialog type

  • application_permission_views_top_unique

    Available Periods: day

    Impressions of each Permissions dialog type

  • application_permission_grants_top

    Available Periods: day

    Impressions of each Permissions dialog type

  • application_permission_grants_top_unique

    Available Periods: day

    Impressions of each Permissions dialog type

  • application_block_adds

    Available Periods: day

    Blocks of your application

  • application_block_adds_unique

    Available Periods: day

    Blocks of your application

  • application_block_removes

    Available Periods: day

    Removed blocks of your application

  • application_block_removes_unique

    Available Periods: day

    Removed blocks of your application

Application Content

  • application_like_adds

    Available Periods: day

    Likes created via your application

  • application_like_adds_unique

    Available Periods: day

    Likes created via your application

  • application_like_removes

    Available Periods: day

    Likes deleted via your application

  • application_like_removes_unique

    Available Periods: day

    Likes deleted via your application

  • application_comment_adds

    Available Periods: day

    Comments created via your application

  • application_comment_adds_unique

    Available Periods: day

    Comments created via your application

  • application_photos

    Available Periods: day

    Photos created via your application

  • application_photos_unique

    Available Periods: day

    Photos created via your application

  • application_shares

    Available Periods: day

    Shares Created by your application via the Links.post method

  • application_shares_unique

    Available Periods: day

    Shares Created by your application via the Links.post method

  • application_status_updates

    Available Periods: day

    Status Updates created via your application

  • application_status_updates_unique

    Available Periods: day

    Status Updates created via your application

  • application_stream_stories

    Available Periods: day

    Stream.publish stories created via your application

  • application_stream_stories_unique

    Available Periods: day

    Stream.publish stories created via your application

  • application_feed_form_views

    Available Periods: day

    Impressions of the Feed form dialog

  • application_feed_form_views_unique

    Available Periods: day

    Impressions of the Feed form dialog from users logged into Facebook

  • application_feed_form_views_login

    Available Periods: day

    Impressions of the Feed form dialog from users logged into Facebook

  • application_feed_form_views_login_unique

    Available Periods: day

    Impressions of the Feed form dialog from users logged into Facebook

  • application_feed_form_views_logout

    Available Periods: day

    Impressions of the Feed form dialog from users not logged into Facebook

Plugins

  • application_widget_activity_views

    Available Periods: day

    Impressions of your activity plugin

  • application_widget_activity_views_unique

    Available Periods: day

    Activity Plugin impressions from users logged into Facebook

  • application_widget_activity_views_login

    Available Periods: day

    Activity Plugin impressions from users logged into Facebook

  • application_widget_activity_views_login_unique

    Available Periods: day

    Activity Plugin impressions from users logged into Facebook

  • application_widget_activity_views_logout

    Available Periods: day

    Activity Plugin impressions from users not logged into Facebook

  • application_widget_activity_views_external_referrals

    Available Periods: day

    Top domains of impressions of your Activity plugins

  • application_widget_comments_views

    Available Periods: day

    Impressions of your Comments plugin

  • application_widget_comments_views_unique

    Available Periods: day

    Impressions of your Comments plugin from users logged into Facebook

  • application_widget_comments_views_login

    Available Periods: day

    Impressions of your Comments plugin from users logged into Facebook

  • application_widget_comments_views_login_unique

    Available Periods: day

    Impressions of your Comments plugin from users logged into Facebook

  • application_widget_comments_views_logout

    Available Periods: day

    Impressions of your Comments plugin from users not logged into Facebook

  • application_widget_fan_views

    Available Periods: day

    Impressions of your Like Box

  • application_widget_fan_views_unique

    Available Periods: day

    Impressions of your Like Box plugin from users logged into Facebook

  • application_widget_fan_views_login

    Available Periods: day

    Impressions of your Like Box plugin from users logged into Facebook

  • application_widget_fan_views_login_unique

    Available Periods: day

    Impressions of your Like Box plugin from users logged into Facebook

  • application_widget_fan_views_logout

    Available Periods: day

    Impressions of your Like Box plugin from users not logged into Facebook

  • application_widget_fan_views_external_referrals

    Available Periods: day

    Top domains of impressions of your Like Box plugins

  • application_widget_like_views

    Available Periods: day

    Impressions of your Like plugin

  • application_widget_like_views_unique

    Available Periods: day

    Like Plugin impressions from users logged into Facebook

  • application_widget_like_views_login

    Available Periods: day

    Like Plugin impressions from users logged into Facebook

  • application_widget_like_views_login_unique

    Available Periods: day

    Like Plugin impressions from users logged into Facebook

  • application_widget_like_views_logout

    Available Periods: day

    Like Plugin impressions from users not logged into Facebook

  • application_widget_like_views_external_referrals

    Available Periods: day

    Top domains of impressions of your Like plugins

  • application_widget_live_stream_views

    Available Periods: day

    Impressions of your Live Stream plugin

  • application_widget_live_stream_views_unique

    Available Periods: day

    Impressions of your Live Stream plugin from users logged into Facebook

  • application_widget_live_stream_views_login

    Available Periods: day

    Impressions of your Live Stream plugin from users logged into Facebook

  • application_widget_live_stream_views_login_unique

    Available Periods: day

    Impressions of your Live Stream plugin from users logged into Facebook

  • application_widget_live_stream_views_logout

    Available Periods: day

    Impressions of your Live Stream plugin from users logged into Facebook

  • application_widget_live_stream_views_external_referrals

    Available Periods: day

    Top domains of impressions of your Live Stream plugins

  • application_widget_recommendation_views

    Available Periods: day

    Impressions of your Recommendation plugin

  • application_widget_recommendation_views_unique

    Available Periods: day

    Recommendation Plugin impressions from users logged into Facebook

  • application_widget_recommendation_views_login

    Available Periods: day

    Recommendation Plugin impressions from users logged into Facebook

  • application_widget_recommendation_views_login_unique

    Available Periods: day

    Recommendation Plugin impressions from users logged into Facebook

  • application_widget_recommendation_views_logout

    Available Periods: day

    Recommendation Plugin impressions from users not logged into Facebook

  • application_widget_recommendation_views_external_referrals

    Available Periods: day

    Top domains of impressions of your Recommendation plugins

  • application_widget_share_views

    Available Periods: day

    Impressions of your Share widget from users logged into Facebook

  • application_widget_share_views_unique

    Available Periods: day

    Impressions of your Share widget from users logged into Facebook

  • application_widget_views

    Available Periods: day

    Total social plugin impressions

  • application_widget_views_unique

    Available Periods: day

    Total social plugin impressions from users logged into Facebook

  • application_widget_views_login

    Available Periods: day

    Total social plugin impressions from users logged into Facebook

  • application_widget_views_login_unique

    Available Periods: day

    Total social plugin impressions from users logged into Facebook

  • application_widget_views_logout

    Available Periods: day

    Total social plugin impressions from users not logged into Facebook

Canvas

  • application_canvas_views

    Available Periods: day

    Number of impressions of your application's canvas page

  • application_canvas_views_unique

    Available Periods: day

    Number of impressions of your application's canvas page from users logged into Facebook

  • application_canvas_views_login

    Available Periods: day

    Number of impressions of your application's canvas page from users logged into Facebook

  • application_canvas_views_login_unique

    Available Periods: day

    Number of impressions of your application's canvas page from users logged into Facebook

  • application_canvas_views_logout

    Available Periods: day

    Number of impressions of your application's canvas page from users not logged into Facebook

  • application_canvas_views_internal_referrals

    Available Periods: day

    Top referrers to your Canvas page on Facebook

  • application_canvas_views_external_referrals

    Available Periods: day

    Top referrering external domains to your Canvas page

Tabs

  • application_tab_views

    Available Periods: day

    Impressions of your application's tab on users' Profiles

  • application_tab_views_unique

    Available Periods: day

    Impressions of your application's tab on users' Profiles

API Performance

  • application_api_calls

    Available Periods: day

    Total API calls from your application

  • application_api_calls_top

    Available Periods: day

    Most frequent API calls from your application

  • application_api_calls_unique

    Available Periods: day

    Total API calls from your application

  • application_api_errors

    Available Periods: day

    Total API errors from your application

  • application_api_errors_top

    Available Periods: day

    Most frequent API errors from your application

Page Users

  • page_active_users

    Available Periods: day, week, month

    Users who have engaged with your Page, viewed your Page, or consumed content generated by your Page

  • page_active_users_locale

    Available Periods: day

    Top locales of your active users

  • page_active_users_city

    Available Periods: day

    Top cities of your active users

  • page_active_users_country

    Available Periods: day

    Top countries of your active users

  • page_active_users_gender

    Available Periods: day

    Gender of your active users

  • page_active_users_age

    Available Periods: day

    Age of your active users

  • page_active_users_gender_age

    Available Periods: day

    Gender and age demographics of your active users

  • page_fans

    Available Periods: lifetime

    Total Likes of your Page

  • page_fans_locale

    Available Periods: lifetime

    Top locales of people who like your Page

  • page_fans_city

    Available Periods: lifetime

    Top cities of people who like your Page

  • page_fans_country

    Available Periods: lifetime

    Top countries of people who like your Page

  • page_fans_gender

    Available Periods: lifetime

    Gender of people who like your Page

  • page_fans_age

    Available Periods: lifetime

    Age of people who like your Page

  • page_fans_gender_age

    Available Periods: lifetime

    Gender and Age demographics of people who like your Page

  • page_fan_adds

    Available Periods: day

    New Likes of your Page

  • page_fan_adds_unique

    Available Periods: day

    New Likes of your Page

  • page_fan_adds_source

    Available Periods: day

    Users can like your page in many different places, both within Facebook and on other websites. These are the most common places where users like your Page.

  • page_fan_adds_source_unique

    Available Periods: day

    Users can like your page in many different places, both within Facebook and on other websites. These are the most common places where users like your Page.

  • page_fan_removes

    Available Periods: day

    Unlikes of your Page

  • page_fan_removes_unique

    Available Periods: day

    Unlikes of your Page

  • page_fan_removes_source

    Available Periods: day

    Source of Unlikes of your Page

  • page_fan_removes_source_unique

    Available Periods: day

    Source of Unlikes of your Page

Page Content

  • page_comment_adds

    Available Periods: day

    Comments created on your Page's content

  • page_comment_adds_unique

    Available Periods: day

    Comments created on your Page's content

  • page_comment_adds_source

    Available Periods: day

    Source of new comments on your Page's content

  • page_comment_adds_source_unique

    Available Periods: day

    Source of new comments on your Page's content

  • page_comment_removes

    Available Periods: day

    Comments deleted on your Page's content

  • page_comment_removes_unique

    Available Periods: day

    Comments deleted on your Page's content

  • page_comment_removes_source

    Available Periods: day

    Source of comment deletions on your Page's content

  • page_comment_removes_source_unique

    Available Periods: day

    Source of comment deletions on your Page's content

  • page_like_adds

    Available Periods: day

    Likes of your Page's content

  • page_like_adds_unique

    Available Periods: day

    Likes of your Page's content

  • page_like_adds_source

    Available Periods: day

    Source of Likes on your Page's content

  • page_like_adds_source_unique

    Available Periods: day

    Source of Likes on your Page's content

  • page_like_removes

    Available Periods: day

    Delete Likes of your Page's content

  • page_like_removes_unique

    Available Periods: day

    Delete Likes of your Page's content

  • page_like_removes_source

    Available Periods: day

    Source of Like deletions on your Page's content

  • page_like_removes_source_unique

    Available Periods: day

    Source of Like deletions on your Page's content

  • page_stream_views

    Available Periods: day

    Impressions of stream stories generated by your Page

  • page_stream_views_unique

    Available Periods: day

    Impressions of stream stories generated by your Page

  • page_wall_posts

    Available Periods: day

    Wall posts to your Page's Wall

  • page_wall_posts_unique

    Available Periods: day

    Wall posts to your Page's Wall

  • page_wall_posts_source

    Available Periods: day

    Source of Wall posts to your Page

  • page_wall_posts_source_unique

    Available Periods: day

    Source of Wall posts to your Page

  • page_photos

    Available Periods: day

    Photos posted to your Page

  • page_photos_unique

    Available Periods: day

    Photos posted to your Page

  • page_photo_views

    Available Periods: day

    Number of times your Page's photos were viewed

  • page_photo_views_unique

    Available Periods: day

    Number of times your Page's photos were viewed

  • page_videos

    Available Periods: day

    Videos posted to your Page

  • page_videos_unique

    Available Periods: day

    Videos posted to your Page

  • page_video_plays

    Available Periods: day

    Number of times your Page's videos were played

  • page_video_plays_unique

    Available Periods: day

    Number of times your Page's videos were played

  • page_audio_plays

    Available Periods: day

    Number of times your Page's audio files where played

  • page_audio_plays_unique

    Available Periods: day

    Number of times your Page's audio files where played

  • page_discussions

    Available Periods: day

    Discussions created on your Page's Discussion Board

  • page_discussions_unique

    Available Periods: day

    Discussions created on your Page's Discussion Board

  • page_review_adds

    Available Periods: day

    New Reviews created for your Page

  • page_review_adds_unique

    Available Periods: day

    New Reviews created for your Page

  • page_review_modifications

    Available Periods: day

    Existing Reviews modified for your Page

  • page_review_modifications_unique

    Available Periods: day

    Existing Reviews modified for your Page

Page Views

  • page_views

    Available Periods: day

    Page views

  • page_views_unique

    Available Periods: day

    Page Views from users logged into Facebook

  • page_views_login

    Available Periods: day

    Page Views from users logged into Facebook

  • page_views_login_unique

    Available Periods: day

    Page Views from users logged into Facebook

  • page_views_logout

    Available Periods: day

    Page views from users not logged into Facebook

  • page_views_internal_referrals

    Available Periods: day

    Top referrers to your Page on Facebook

  • page_views_external_referrals

    Available Periods: day

    Top referrering external domains to your Page

Domain Users

  • domain_active_users_locale

    Available Periods: day

    Top locales of users engaged with your URL or Domain

  • domain_active_users_city

    Available Periods: day

    Top cities of users engaged with your URL or Domain

  • domain_active_users_country

    Available Periods: day

    Top countries of users engaged with your URL or Domain

  • domain_active_users_gender

    Available Periods: day

    Gender of users engaged with your URL or Domain

  • domain_active_users_age

    Available Periods: day

    Age of users engaged with your URL or Domain

  • domain_active_users_gender_age

    Available Periods: day

    Gender and Age demographics of users engaged with your URL or Domain

  • domain_fan_adds

    Available Periods: day

    Open Graph Likes of URLs within your domain

  • domain_fan_removes

    Available Periods: day

    Removed Open Graph Likes of URLs within your domain

Domain Content

  • domain_comment_adds

    Available Periods: day

    Comments on Shares of URLs within your domain

  • domain_like_adds

    Available Periods: day

    Likes on Shares of URLs within your domain

  • domain_like_removes

    Available Periods: day

    Delete Likes on Shares of URLs within your domain

  • domain_shares

    Available Periods: day

    Shares of URLs within your domain

  • domain_reshares

    Available Periods: day

    Reshares of URLs within your domain

Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox