FQL:insights
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 theend_time
field. The function takes a date string in'YYYY-MM-DD'
format and returns the appropriate value forend_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 theperiod
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 theend_time
and86400
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, monthUsers who have engaged with your application or viewed your application
-
application_active_users_locale
Available Periods: dayTop locales of your active users
-
application_active_users_city
Available Periods: dayTop cities of your active users
-
application_active_users_country
Available Periods: dayTop countries of your active users
-
application_active_users_gender
Available Periods: dayGender of your active users
-
application_active_users_age
Available Periods: dayAge of your active users
-
application_active_users_gender_age
Available Periods: dayGender and age demographics of your active users
-
application_installed_users
Available Periods: lifetimeTotal installations of your application or connections to your Connect application
-
application_installed_users_locale
Available Periods: lifetimeTop locales of your application's installed user base
-
application_installed_users_city
Available Periods: lifetimeTop cities of your application's installed user base
-
application_installed_users_country
Available Periods: lifetimeTop countries of your application's installed user base
-
application_installed_users_gender
Available Periods: lifetimeGender of your application's installed user base
-
application_installed_users_age
Available Periods: lifetimeAge of your application's installed user base
-
application_installed_users_gender_age
Available Periods: lifetimeGender and age demographics of your application's installed user base
-
application_installation_adds
Available Periods: dayNew installations of your application or connections to your Connect site. Follows acceptance of your Terms of Service
-
application_installation_adds_unique
Available Periods: dayNew installations of your application or connections to your Connect site. Follows acceptance of your Terms of Service
-
application_installation_removes
Available Periods: dayRemoved installations of your application or connections to your Connect site
-
application_installation_removes_unique
Available Periods: dayRemoved installations of your application or connections to your Connect site
-
application_tos_views
Available Periods: dayImpressions of the Terms Of Service dialog of your application
-
application_tos_views_unique
Available Periods: dayImpressions of the Terms Of Service dialog of your application
-
application_permission_views_top
Available Periods: dayImpressions of each Permissions dialog type
-
application_permission_views_top_unique
Available Periods: dayImpressions of each Permissions dialog type
-
application_permission_grants_top
Available Periods: dayImpressions of each Permissions dialog type
-
application_permission_grants_top_unique
Available Periods: dayImpressions of each Permissions dialog type
-
application_block_adds
Available Periods: dayBlocks of your application
-
application_block_adds_unique
Available Periods: dayBlocks of your application
-
application_block_removes
Available Periods: dayRemoved blocks of your application
-
application_block_removes_unique
Available Periods: dayRemoved blocks of your application
Application Content
-
application_like_adds
Available Periods: dayLikes created via your application
-
application_like_adds_unique
Available Periods: dayLikes created via your application
-
application_like_removes
Available Periods: dayLikes deleted via your application
-
application_like_removes_unique
Available Periods: dayLikes deleted via your application
-
application_comment_adds
Available Periods: dayComments created via your application
-
application_comment_adds_unique
Available Periods: dayComments created via your application
-
application_photos
Available Periods: dayPhotos created via your application
-
application_photos_unique
Available Periods: dayPhotos created via your application
- Available Periods: day
Shares Created by your application via the Links.post method
- Available Periods: day
Shares Created by your application via the Links.post method
-
application_status_updates
Available Periods: dayStatus Updates created via your application
-
application_status_updates_unique
Available Periods: dayStatus Updates created via your application
-
application_stream_stories
Available Periods: dayStream.publish stories created via your application
-
application_stream_stories_unique
Available Periods: dayStream.publish stories created via your application
-
application_feed_form_views
Available Periods: dayImpressions of the Feed form dialog
-
application_feed_form_views_unique
Available Periods: dayImpressions of the Feed form dialog from users logged into Facebook
-
application_feed_form_views_login
Available Periods: dayImpressions of the Feed form dialog from users logged into Facebook
-
application_feed_form_views_login_unique
Available Periods: dayImpressions of the Feed form dialog from users logged into Facebook
-
application_feed_form_views_logout
Available Periods: dayImpressions of the Feed form dialog from users not logged into Facebook
Plugins
-
application_widget_activity_views
Available Periods: dayImpressions of your activity plugin
-
application_widget_activity_views_unique
Available Periods: dayActivity Plugin impressions from users logged into Facebook
-
application_widget_activity_views_login
Available Periods: dayActivity Plugin impressions from users logged into Facebook
-
application_widget_activity_views_login_unique
Available Periods: dayActivity Plugin impressions from users logged into Facebook
-
application_widget_activity_views_logout
Available Periods: dayActivity Plugin impressions from users not logged into Facebook
-
application_widget_activity_views_external_referrals
Available Periods: dayTop domains of impressions of your Activity plugins
-
application_widget_comments_views
Available Periods: dayImpressions of your Comments plugin
-
application_widget_comments_views_unique
Available Periods: dayImpressions of your Comments plugin from users logged into Facebook
-
application_widget_comments_views_login
Available Periods: dayImpressions of your Comments plugin from users logged into Facebook
-
application_widget_comments_views_login_unique
Available Periods: dayImpressions of your Comments plugin from users logged into Facebook
-
application_widget_comments_views_logout
Available Periods: dayImpressions of your Comments plugin from users not logged into Facebook
-
application_widget_fan_views
Available Periods: dayImpressions of your Like Box
-
application_widget_fan_views_unique
Available Periods: dayImpressions of your Like Box plugin from users logged into Facebook
-
application_widget_fan_views_login
Available Periods: dayImpressions of your Like Box plugin from users logged into Facebook
-
application_widget_fan_views_login_unique
Available Periods: dayImpressions of your Like Box plugin from users logged into Facebook
-
application_widget_fan_views_logout
Available Periods: dayImpressions of your Like Box plugin from users not logged into Facebook
-
application_widget_fan_views_external_referrals
Available Periods: dayTop domains of impressions of your Like Box plugins
-
application_widget_like_views
Available Periods: dayImpressions of your Like plugin
-
application_widget_like_views_unique
Available Periods: dayLike Plugin impressions from users logged into Facebook
-
application_widget_like_views_login
Available Periods: dayLike Plugin impressions from users logged into Facebook
-
application_widget_like_views_login_unique
Available Periods: dayLike Plugin impressions from users logged into Facebook
-
application_widget_like_views_logout
Available Periods: dayLike Plugin impressions from users not logged into Facebook
-
application_widget_like_views_external_referrals
Available Periods: dayTop domains of impressions of your Like plugins
-
application_widget_live_stream_views
Available Periods: dayImpressions of your Live Stream plugin
-
application_widget_live_stream_views_unique
Available Periods: dayImpressions of your Live Stream plugin from users logged into Facebook
-
application_widget_live_stream_views_login
Available Periods: dayImpressions of your Live Stream plugin from users logged into Facebook
-
application_widget_live_stream_views_login_unique
Available Periods: dayImpressions of your Live Stream plugin from users logged into Facebook
-
application_widget_live_stream_views_logout
Available Periods: dayImpressions of your Live Stream plugin from users logged into Facebook
-
application_widget_live_stream_views_external_referrals
Available Periods: dayTop domains of impressions of your Live Stream plugins
-
application_widget_recommendation_views
Available Periods: dayImpressions of your Recommendation plugin
-
application_widget_recommendation_views_unique
Available Periods: dayRecommendation Plugin impressions from users logged into Facebook
-
application_widget_recommendation_views_login
Available Periods: dayRecommendation Plugin impressions from users logged into Facebook
-
application_widget_recommendation_views_login_unique
Available Periods: dayRecommendation Plugin impressions from users logged into Facebook
-
application_widget_recommendation_views_logout
Available Periods: dayRecommendation Plugin impressions from users not logged into Facebook
-
application_widget_recommendation_views_external_referrals
Available Periods: dayTop domains of impressions of your Recommendation plugins
- Available Periods: day
Impressions of your Share widget from users logged into Facebook
- Available Periods: day
Impressions of your Share widget from users logged into Facebook
-
application_widget_views
Available Periods: dayTotal social plugin impressions
-
application_widget_views_unique
Available Periods: dayTotal social plugin impressions from users logged into Facebook
-
application_widget_views_login
Available Periods: dayTotal social plugin impressions from users logged into Facebook
-
application_widget_views_login_unique
Available Periods: dayTotal social plugin impressions from users logged into Facebook
-
application_widget_views_logout
Available Periods: dayTotal social plugin impressions from users not logged into Facebook
Canvas
-
application_canvas_views
Available Periods: dayNumber of impressions of your application's canvas page
-
application_canvas_views_unique
Available Periods: dayNumber of impressions of your application's canvas page from users logged into Facebook
-
application_canvas_views_login
Available Periods: dayNumber of impressions of your application's canvas page from users logged into Facebook
-
application_canvas_views_login_unique
Available Periods: dayNumber of impressions of your application's canvas page from users logged into Facebook
-
application_canvas_views_logout
Available Periods: dayNumber of impressions of your application's canvas page from users not logged into Facebook
-
application_canvas_views_internal_referrals
Available Periods: dayTop referrers to your Canvas page on Facebook
-
application_canvas_views_external_referrals
Available Periods: dayTop referrering external domains to your Canvas page
Tabs
-
application_tab_views
Available Periods: dayImpressions of your application's tab on users' Profiles
-
application_tab_views_unique
Available Periods: dayImpressions of your application's tab on users' Profiles
API Performance
-
application_api_calls
Available Periods: dayTotal API calls from your application
-
application_api_calls_top
Available Periods: dayMost frequent API calls from your application
-
application_api_calls_unique
Available Periods: dayTotal API calls from your application
-
application_api_errors
Available Periods: dayTotal API errors from your application
-
application_api_errors_top
Available Periods: dayMost frequent API errors from your application
Page Users
-
page_active_users
Available Periods: day, week, monthUsers who have engaged with your Page, viewed your Page, or consumed content generated by your Page
-
page_active_users_locale
Available Periods: dayTop locales of your active users
-
page_active_users_city
Available Periods: dayTop cities of your active users
-
page_active_users_country
Available Periods: dayTop countries of your active users
-
page_active_users_gender
Available Periods: dayGender of your active users
-
page_active_users_age
Available Periods: dayAge of your active users
-
page_active_users_gender_age
Available Periods: dayGender and age demographics of your active users
-
page_fans
Available Periods: lifetimeTotal Likes of your Page
-
page_fans_locale
Available Periods: lifetimeTop locales of people who like your Page
-
page_fans_city
Available Periods: lifetimeTop cities of people who like your Page
-
page_fans_country
Available Periods: lifetimeTop countries of people who like your Page
-
page_fans_gender
Available Periods: lifetimeGender of people who like your Page
-
page_fans_age
Available Periods: lifetimeAge of people who like your Page
-
page_fans_gender_age
Available Periods: lifetimeGender and Age demographics of people who like your Page
-
page_fan_adds
Available Periods: dayNew Likes of your Page
-
page_fan_adds_unique
Available Periods: dayNew Likes of your Page
-
page_fan_adds_source
Available Periods: dayUsers 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: dayUsers 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: dayUnlikes of your Page
-
page_fan_removes_unique
Available Periods: dayUnlikes of your Page
-
page_fan_removes_source
Available Periods: daySource of Unlikes of your Page
-
page_fan_removes_source_unique
Available Periods: daySource of Unlikes of your Page
Page Content
-
page_comment_adds
Available Periods: dayComments created on your Page's content
-
page_comment_adds_unique
Available Periods: dayComments created on your Page's content
-
page_comment_adds_source
Available Periods: daySource of new comments on your Page's content
-
page_comment_adds_source_unique
Available Periods: daySource of new comments on your Page's content
-
page_comment_removes
Available Periods: dayComments deleted on your Page's content
-
page_comment_removes_unique
Available Periods: dayComments deleted on your Page's content
-
page_comment_removes_source
Available Periods: daySource of comment deletions on your Page's content
-
page_comment_removes_source_unique
Available Periods: daySource of comment deletions on your Page's content
-
page_like_adds
Available Periods: dayLikes of your Page's content
-
page_like_adds_unique
Available Periods: dayLikes of your Page's content
-
page_like_adds_source
Available Periods: daySource of Likes on your Page's content
-
page_like_adds_source_unique
Available Periods: daySource of Likes on your Page's content
-
page_like_removes
Available Periods: dayDelete Likes of your Page's content
-
page_like_removes_unique
Available Periods: dayDelete Likes of your Page's content
-
page_like_removes_source
Available Periods: daySource of Like deletions on your Page's content
-
page_like_removes_source_unique
Available Periods: daySource of Like deletions on your Page's content
-
page_stream_views
Available Periods: dayImpressions of stream stories generated by your Page
-
page_stream_views_unique
Available Periods: dayImpressions of stream stories generated by your Page
-
page_wall_posts
Available Periods: dayWall posts to your Page's Wall
-
page_wall_posts_unique
Available Periods: dayWall posts to your Page's Wall
-
page_wall_posts_source
Available Periods: daySource of Wall posts to your Page
-
page_wall_posts_source_unique
Available Periods: daySource of Wall posts to your Page
-
page_photos
Available Periods: dayPhotos posted to your Page
-
page_photos_unique
Available Periods: dayPhotos posted to your Page
-
page_photo_views
Available Periods: dayNumber of times your Page's photos were viewed
-
page_photo_views_unique
Available Periods: dayNumber of times your Page's photos were viewed
-
page_videos
Available Periods: dayVideos posted to your Page
-
page_videos_unique
Available Periods: dayVideos posted to your Page
-
page_video_plays
Available Periods: dayNumber of times your Page's videos were played
-
page_video_plays_unique
Available Periods: dayNumber of times your Page's videos were played
-
page_audio_plays
Available Periods: dayNumber of times your Page's audio files where played
-
page_audio_plays_unique
Available Periods: dayNumber of times your Page's audio files where played
-
page_discussions
Available Periods: dayDiscussions created on your Page's Discussion Board
-
page_discussions_unique
Available Periods: dayDiscussions created on your Page's Discussion Board
-
page_review_adds
Available Periods: dayNew Reviews created for your Page
-
page_review_adds_unique
Available Periods: dayNew Reviews created for your Page
-
page_review_modifications
Available Periods: dayExisting Reviews modified for your Page
-
page_review_modifications_unique
Available Periods: dayExisting Reviews modified for your Page
Page Views
-
page_views
Available Periods: dayPage views
-
page_views_unique
Available Periods: dayPage Views from users logged into Facebook
-
page_views_login
Available Periods: dayPage Views from users logged into Facebook
-
page_views_login_unique
Available Periods: dayPage Views from users logged into Facebook
-
page_views_logout
Available Periods: dayPage views from users not logged into Facebook
-
page_views_internal_referrals
Available Periods: dayTop referrers to your Page on Facebook
-
page_views_external_referrals
Available Periods: dayTop referrering external domains to your Page
Domain Users
-
domain_active_users_locale
Available Periods: dayTop locales of users engaged with your URL or Domain
-
domain_active_users_city
Available Periods: dayTop cities of users engaged with your URL or Domain
-
domain_active_users_country
Available Periods: dayTop countries of users engaged with your URL or Domain
-
domain_active_users_gender
Available Periods: dayGender of users engaged with your URL or Domain
-
domain_active_users_age
Available Periods: dayAge of users engaged with your URL or Domain
-
domain_active_users_gender_age
Available Periods: dayGender and Age demographics of users engaged with your URL or Domain
-
domain_fan_adds
Available Periods: dayOpen Graph Likes of URLs within your domain
-
domain_fan_removes
Available Periods: dayRemoved Open Graph Likes of URLs within your domain
Domain Content
-
domain_comment_adds
Available Periods: dayComments on Shares of URLs within your domain
-
domain_like_adds
Available Periods: dayLikes on Shares of URLs within your domain
-
domain_like_removes
Available Periods: dayDelete Likes on Shares of URLs within your domain
- Available Periods: day
Shares of URLs within your domain
- Available Periods: day
Reshares of URLs within your domain