Facebook Insights

To retrieve data from Facebook Insights, you must make a request that contains several parameters with unique values to a specific table.

Each request includes the name of the table you want to request data from, for example, InsightsByConsumptionType, and three unique parameters described below

Insight Name: The metric to be returned.

Target: The element to retrieve the insights from. When requesting data from a source, all the data is returned for the authorized user who made the request. For example, target in (select ID from pages) returns all the pages for the relevant ID for the defined period of time.

Note: When requesting data for all posts for all of your pages, you might experience performance issues. Sisense recommends breaking up requests in which large amounts of data are returned by Facebook.

Period: The aggregation period. The value ‘lifetime’ includes all your data up to the time of the request. Any other values such as ‘day’, ‘month’ etc. are limited to a range of 90 days as per Facebook’s time range limitation.

This page provides example requests and lists the possible values for each table.

InsightsByConsumptionType

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, VideoPlay, OtherClicks, PhotoView, LinkClicks, ButtonClicks

FROM InsightsByConsumptionType

where target in (select ID from pages) and InsightName = 'PAGE_CONSUMPTIONS_BY_CONSUMPTION_TYPE' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

 

Insight Name Target Period
PAGE_CONSUMPTIONS_BY_CONSUMPTION_TYPE Page day, week, days_28
PAGE_CONSUMPTIONS_BY_CONSUMPTION_TYPE_UNIQUE Page day, week, days_28
POST_CONSUMPTIONS_BY_TYPE Post day, week, days_28
POST_CONSUMPTIONS_BY_TYPE_UNIQUE Post day, week, days_28

 

InsightsByFeedbackType

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, [Like], Comment, Link, Answer, Claim, Rsvp, HideAllClicks, HideClicks, UnlikePageClicks, ReportSpamClicks, XButtonClicks

FROM InsightsByFeedbackType

where target in (select ID from pages) and InsightName = 'PAGE_NEGATIVE_FEEDBACK_BY_TYPE' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

 

Insight Name Target Period
PAGE_NEGATIVE_FEEDBACK_BY_TYPE Page day, week, days_28
PAGE_NEGATIVE_FEEDBACK_BY_TYPE_UNIQUE Page day, week, days_28
PAGE_POSITIVE_FEEDBACK_BY_TYPE Page day, week, days_28
PAGE_POSITIVE_FEEDBACK_BY_TYPE_UNIQUE Page day, week, days_28
POST_NEGATIVE_FEEDBACK_BY_TYPE Post lifetime
POST_NEGATIVE_FEEDBACK_BY_TYPE_UNIQUE Post lifetime

 

InsightsByLikeSourceType

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, PageSuggestion, PageTimeline, Ads, MobileAds, Registration, Mobile, WizardSuggestion, ProfileConnect, ExternalConnect,

RecommendedPages, Favorites, Api, PageBrowser, MobilePageBrowser, Hovercard, Search, PageProfile, Ticker, LikeStory, FeedChaining, AllCategoryPyml,

PageSuggestionsOnLiking, MobilePageSuggestionsOnLiking, FanContextStory, SponsoredStory, PageInviteEscapeHatchFinch, PageAdminNumPosts, PageAdminNumPostsByType

FROM InsightsByLikeSourceType

where target in (select ID from pages) and InsightName = 'PAGE_FANS_BY_LIKE_SOURCE' and FromDateTime='Date' and ToDateTime='Date'

Mapping

Insight Name Target Period
PAGE_FANS_BY_LIKE_SOURCE Page day
PAGE_FANS_BY_LIKE_SOURCE_UNIQUE Page day
PAGE_FANS_BY_UNLIKE_SOURCE_UNIQUE Page day

 

InsightsByPaidStatus

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, Total, Paid, Unpaid

FROM InsightsByPaidStatus

where target in (select ID from pages) and InsightName = 'PAGE_IMPRESSIONS_BY_PAID_NON_PAID' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

Insight Name Target Period
PAGE_IMPRESSIONS_BY_PAID_NON_PAID Page day, week, days_28
PAGE_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE Page day, week, days_28
POST_IMPRESSIONS_BY_PAID_NON_PAID Post lifetime
POST_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE Post lifetime
PAGE_POSTS_IMPRESSIONS_BY_PAID_NON_PAID Post day, week, days_28
PAGE_POSTS_IMPRESSIONS_BY_PAID_NON_PAID_UNIQUE Post day, week, days_28

 

InsightsByReactionTotals

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, [Like], Love, Wow, Haha, Sorry, Anger, Target

FROM InsightsByReactionTotals

where target in (select ID from pages)

and InsightName = 'PAGE_ACTIONS_POST_REACTIONS_TOTAL' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

Insight Name Target Period
PAGE_ACTIONS_POST_REACTIONS_TOTAL Page day

 

InsightsByStoryType

Example:

SELECT EndTime as Date,Target as PostID, Period, InsightName, UserPost, PagePost, Checkin, Fan, Question, Coupon, Event, Mention, Other

FROM InsightsByStoryType

where target in (select ID from Posts where target in (select ID from pages))

and InsightName = 'POST_IMPRESSIONS_BY_STORY_TYPE' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

 

Insight Name Target Period
PAGE_STORIES_BY_STORY_TYPE Page day, week, days_28
PAGE_STORYTELLERS_BY_STORY_TYPE Page day, week, days_28
PAGE_IMPRESSIONS_BY_STORY_TYPE Page day, week, days_28
PAGE_IMPRESSIONS_BY_STORY_TYPE_UNIQUE Page day, week, days_28
POST_IMPRESSIONS_BY_STORY_TYPE Post day, week, days_28
POST_IMPRESSIONS_BY_STORY_TYPE_UNIQUE Post day, week, days_28

 

InsightsByTabType

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, AllActivity, App, Info, Insights, Likes, Locations, Photos, PhotosAlbums, PhotosStream, Profile, ProfileInfo, ProfileLikes, ProfilePhotos, Timeline, Events, Videos, Wall

FROM InsightsByTabType

where target in (select ID from pages)

and InsightName = 'PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE' and Period = 'day' and FromDateTime='Date' and ToDateTime='Date'

Mapping

Insight Name Target Period
PAGE_TAB_VIEWS_LOGIN_TOP_UNIQUE Page day, week
PAGE_TAB_VIEWS_LOGIN_TOP Page day, week
PAGE_TAB_VIEWS_LOGOUT_TOP Page day

 

SimpleInsights

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, Value FROM SimpleInsights where target in (select ID from pages) and InsightName = 'PAGE_ACTIONS_POST_REACTIONS_ANGER_TOTAL' and Period = 'day' and FromDateTime='@Date' and ToDateTime='@Date'

Mapping

 

Insight Name Target Period
PAGE_STORIES Page day,week, days_28
POST_STORIES Page lifetime
POST_STORYTELLERS Page lifetime
PAGE_IMPRESSIONS Page day, week, days_28
PAGE_IMPRESSIONS_UNIQUE Page day, week, days_28
PAGE_IMPRESSIONS_PAID Page day, week, days_28
PAGE_IMPRESSIONS_PAID_UNIQUE Page day, week, days_28
PAGE_IMPRESSIONS_ORGANIC Page day, week, days_28
PAGE_IMPRESSIONS_ORGANIC_UNIQUE Page day, week, days_28
PAGE_IMPRESSIONS_VIRAL Page day, week, days_28
PAGE_IMPRESSIONS_VIRAL_UNIQUE Page day, week, days_28
PAGE_IMPRESSIONS_FREQUENCY_DISTRIBUTION Page day, week, days_28
PAGE_IMPRESSIONS_VIRAL_FREQUENCY_DISTRIBUTION Page day, week, days_28
PAGE_ENGAGED_USERS Page day, week, days_28
PAGE_CONSUMPTIONS Page day, week, days_28
PAGE_CONSUMPTIONS_UNIQUE Page day, week, days_28
PAGE_PLACES_CHECKIN_TOTAL Page day, week, days_28
PAGE_PLACES_CHECKIN_TOTAL_UNIQUE Page day, week, days_28
PAGE_PLACES_CHECKIN_MOBILE Page day, week, days_28
PAGE_PLACES_CHECKIN_MOBILE_UNIQUE Page day, week, days_28
PAGE_NEGATIVE_FEEDBACK Page day, week, days_28
PAGE_NEGATIVE_FEEDBACK_UNIQUE Page day, week, days_28
PAGE_FANS_ONLINE Page day
PAGE_FANS_ONLINE_PER_DAY Page day
PAGE_FANS Page lifetime
PAGE_FAN_ADDS Page day
PAGE_FAN_ADDS_UNIQUE Page day, week
PAGE_FAN_REMOVES Page day
PAGE_FAN_REMOVES_UNIQUE Page day
PAGE_VIEWS Page day
PAGE_VIEWS_UNIQUE Page day, week
PAGE_VIEWS_LOGIN Page day, week
PAGE_VIEWS_LOGIN_UNIQUE Page day, week
PAGE_VIEWS_LOGOUT Page day
PAGE_VIDEO_VIEWS Page day, week, days_28
PAGE_VIDEO_VIEWS_PAID Page day, week, days_28
PAGE_VIDEO_VIEWS_ORGANIC Page day, week, days_28
PAGE_VIDEO_VIEWS_AUTOPLAYED Page day, week, days_28
PAGE_VIDEO_VIEWS_CLICK_TO_PLAY Page day, week, days_28
PAGE_VIDEO_VIEWS_UNIQUE Page day, week, days_28
PAGE_VIDEO_REPEAT_VIEWS Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_PAID Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_ORGANIC Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_AUTOPLAYED Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_CLICK_TO_PLAY Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_UNIQUE Page day, week, days_28
PAGE_VIDEO_COMPLETE_VIEWS_30S_REPEAT_VIEWS Page day, week, days_28
PAGE_POSTS_IMPRESSIONS Post lifetime
PAGE_POSTS_IMPRESSIONS_UNIQUE Post lifetime
PAGE_POSTS_IMPRESSIONS_PAID Post lifetime
PAGE_POSTS_IMPRESSIONS_PAID_UNIQUE Post lifetime
PAGE_POSTS_IMPRESSIONS_ORGANIC Post lifetime
PAGE_POSTS_IMPRESSIONS_ORGANIC_UNIQUE Post lifetime
PAGE_POSTS_IMPRESSIONS_VIRAL Post lifetime
PAGE_POSTS_IMPRESSIONS_VIRAL_UNIQUE Post lifetime
POST_IMPRESSIONS Post lifetime
POST_IMPRESSIONS_UNIQUE Post lifetime
POST_IMPRESSIONS_PAID Post lifetime
POST_IMPRESSIONS_PAID_UNIQUE Post lifetime
POST_IMPRESSIONS_FAN Post lifetime
POST_IMPRESSIONS_FAN_UNIQUE Post lifetime
POST_IMPRESSIONS_FAN_PAID Post lifetime
POST_IMPRESSIONS_FAN_PAID_UNIQUE Post lifetime
POST_IMPRESSIONS_ORGANIC Post lifetime
POST_IMPRESSIONS_ORGANIC_UNIQUE Post lifetime
POST_IMPRESSIONS_VIRAL Post lifetime
POST_IMPRESSIONS_VIRAL_UNIQUE Post lifetime
POST_CONSUMPTIONS Post day, week, days_28
POST_CONSUMPTIONS_UNIQUE Post day, week, days_28
POST_ENGAGED_USERS Post day, week, days_28
POST_NEGATIVE_FEEDBACK Post day, week, days_28
POST_NEGATIVE_FEEDBACK_UNIQUE Post day, week, days_28
POST_VIDEO_AVG_TIME_WATCHED Post lifetime
POST_VIDEO_COMPLETE_VIEWS_ORGANIC Post lifetime
POST_VIDEO_COMPLETE_VIEWS_ORGANIC_UNIQUE Post lifetime
POST_VIDEO_COMPLETE_VIEWS_PAID Post lifetime
POST_VIDEO_COMPLETE_VIEWS_PAID_UNIQUE Post lifetime
POST_VIDEO_VIEWS_ORGANIC Post lifetime
POST_VIDEO_VIEWS_ORGANIC_UNIQUE Post lifetime
POST_VIDEO_VIEWS_PAID Post lifetime
POST_VIDEO_VIEWS_PAID_UNIQUE Post lifetime

 

SimpleVideoInsights

Example:

SELECT Target as PostID, Period, InsightName, Value FROM SimpleVideoInsights where target in (select id from videos where target in (select ID from Pages)) and InsightName = 'TOTAL_VIDEO_VIEWS' and Period = 'lifetime'

Mapping

Insight Name Target Period
PAGE_VIDEO_VIEW_TIME Page day
TOTAL_VIDEO_VIEWS Video lifetime
TOTAL_VIDEO_VIEWS_UNIQUE Video lifetime
TOTAL_VIDEO_VIEWS_AUTOPLAYED Video lifetime
TOTAL_VIDEO_VIEWS_CLICKED_TO_PLAY Video lifetime
TOTAL_VIDEO_VIEWS_SOUND_ON Video lifetime
TOTAL_VIDEO_COMPLETE_VIEWS Video lifetime
TOTAL_VIDEO_COMPLETE_VIEWS_UNIQUE Video lifetime
TOTAL_VIDEO_COMPLETE_VIEWS_AUTO_PLAYED Video lifetime
TOTAL_VIDEO_COMPLETE_VIEWS_CLICKED_TO_PLAY Video lifetime
TOTAL_VIDEO_10S_VIEWS Video lifetime
TOTAL_VIDEO_10S_VIEWS_UNIQUE Video lifetime
TOTAL_VIDEO_10S_VIEWS_auto_played Video lifetime
TOTAL_VIDEO_10S_VIEWS_CLICKED_TO_PLAY Video lifetime
TOTAL_VIDEO_10S_VIEWS_SOUND_ON Video lifetime
TOTAL_VIDEO_AVG_TIME_WATCHED Video lifetime
TOTAL_VIDEO_VIEW_TOTAL_TIME Video lifetime
TOTAL_VIDEO_IMPRESSIONS Video lifetime
TOTAL_VIDEO_IMPRESSIONS_UNIQUE Video lifetime
TOTAL_VIDEO_IMPRESSIONS_VIRAL_UNIQUE Video lifetime
TOTAL_VIDEO_IMPRESSIONS_VIRAL Video lifetime
TOTAL_VIDEO_IMPRESSIONS_FAN_UNIQUE Video lifetime
TOTAL_VIDEO_IMPRESSIONS_FAN Video lifetime

VideoInsightsByActionType

Example:

SELECT Target as PostID, Period, InsightName, Value

FROM VideoInsightsByActionType

where target in (select id from videos where target in (select ID from Pages)) and InsightName = 'TOTAL_VIDEO_STORIES_BY_ACTION_TYPE' and Period = 'lifetime'

Mapping

Insight Name Target Period
TOTAL_VIDEO_STORIES_BY_ACTION_TYPE Video lifetime

VideoInsightsByDistributionType

Example:

SELECT EndTime as Date,Target as PageID, Period, InsightName, Page_Owned, Shared, Crossposted

FROM VideoInsightsByDistributionType

where target in (select ID from pages)

and InsightName = 'TOTAL_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE' and Period = 'lifetime'

Mapping

Insight Name Target Period
TOTAL_VIDEO_VIEWS_BY_DISTRIBUTION_TYPE Video lifetime
TOTAL_VIDEO_VIEW_TIME_BY_DISTRIBUTION_TYPE Video lifetime

VideoInsightsByReactionType

Example:

SELECT Target as PostID, Period, InsightName, Value

FROM VideoInsightsByReactionType

where target in (select id from videos where target in (select ID from Pages)) and InsightName = 'TOTAL_VIDEO_REACTIONS_BY_TYPE_TOTAL' and Period = 'lifetime'

Mapping

Insight Name Target Period
TOTAL_VIDEO_REACTIONS_BY_TYPE_TOTAL Video lifetime