While there’s no default metric for counting Facebook posts in the Facebook Insights data source, you can still import this value to Looker Studio (formerly Data Studio) with a custom calculated field.
Instructions
- Open a report in Looker Studio.
- Click any report element to open Supermetrics.
- Click the Edit icon next to the Facebook Insights data source.
- Click Edit connection.
- Click Add a field to bring up the calculated field window.
- Add a meaningful name in Field Name.
- In the Formula field, add this formula:
SUM(CASE WHEN Post ID IS NULL THEN 0 ELSE 1 END ) - Click Save.
You can now add this as a metric in your reporting.
Troubleshooting
This custom field isn’t a true metric — Facebook still treats it like a “Post ID” dimension value.
For that reason, you’ll see an error if you try to use it without any other metrics (in a scorecard, for instance).
To solve this, use this formula in the custom field instead of the one described in the steps above:
- Count(PostID)+TotalImpressions-TotalImpressions