Skip to main content
Skip table of contents

How-to Create a Sentiment Dashboard from FB Sentiment

Overview

This how-to article takes you through how to create a data studio dashboard using the Facebook (Meta) Sentiment datasource

Instructions

  1. In Alli create a datasource, Facebook Sentiment V2 type, named fb_sentiment and select all dimensions and metrics available.

  2. In Looker Studio, load this Datasource: https://datastudio.google.com/u/0/datasources/15gLQB8LHNnoUsTi9JOEjSloCqTWpgAUN (Note you must be part of the social@pmg.com alias for you to view this datasource)

  3. Click the Duplicate button

     

  4. Rename this Datastudio Datasource to your actual client. Ex. “myclient_fb_sentiment”

  5. Update the connections for the datasource.

  1. Select your client from the list below and select your fb_sentiment datasource you created in step 1.

    1. pmg-datawarehouse → client → fb_sentiment

      Note (Optional): If your client has given PMG the “manage_pages” access. PMG has a way to pull in PAC ads via a Facebook Firehose. This will push both organic and paid ad comments to Alli Data every 3 hours. If you are using this, you will need to use “Custom Query” and insert the following query:

      SQL
      SELECT
        id,
        created_time,
        message,
        creative_url,
        creative_platform,
        creative_id,
        creative_title,
        creative_body,
        ad_id,
        ad_name,
        score,
        magnitude,
        like_count,
        comment_count
      FROM
        {client}.fb_sentiment -- Replace {client} with your client/datasource here. (client_name.fb_sentiment) 
      UNION ALL
      SELECT
        comment_id,
        created_time,
        message,
        CONCAT('https://facebook.com/',post_id) AS creative_url,
        'facebook' AS creative_platform,
        post_id AS creative_id,
        '' AS creative_title,
        '' AS creative_body,
        '' AS ad_id,
        'webhook' AS ad_name,
        sentimentScore AS score,
        magnitude,
        0 AS like_count,
        0 AS comment_count
      FROM
        social.sentiment_webhook
      WHERE
        page_id = '{page_id}' -- Replace {page_id} with the page_id of your client's page. (page_id = '1234')
        and comment_id NOT IN (select distinct id from {client}.fb_sentiment) -- Replace {client} with your client/datasource here, client_name.fb_sentiment
      

  2. Navigate to this report: https://datastudio.google.com/u/0/reporting/1uSYMChPd6SczhQthf8WBNoJ_808acPOm/page/WGyIB

  3. Click the duplicate button

     

  4. Select your new sentiment datasource you created in step 4.

  5. Hit copy report.

  6. You can now edit this Data Studio Dashboard or share out to clients as a normal dashboard.

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.