Using Calculated PowerMetrics to track metrics form Instagram and Instagram Business data

This article assumes you know how to create a PowerMetric. 

To combine metrics from 2 different services, we can use a capability in Klipfolio called Calculated Metrics. This article describes how to do this with Instagram and Instagram Business services.

In Instagram, we want to see the number of Posts and in Instagram Business, we want to bring in data for Impressions, Reach and Pageviews.

For the first example, let’s start with a simple case where we would like to see 4 metrics displayed in one PowerMetric.

The outline is presented as below:

Create the Instagram PowerMetric

There are 3 steps to create the Instagram PowerMetric, starting with Instagram Posts for an account:

1. Create an Instagram data source using this query to get Posts data:  

2. Create the modelled data source, you will have 3 columns as shown below:

    a)  In Instagram, Media represents Posts



   b)  We are repeating Instagram Account name for future reference in PowerMetric


   c)  Create a column, called Metric to mention which metric we are measuring


3. Create the PowerMetric

Metric A – Show the number of Posts from an account called Shima’s Instagram Account. (To get the Instagram Posts, we need to choose Current Values as the data shape.)

Please note that in this PowerMetric, you will have 1 day worth of data initially, however the history grows over time. In this specific example, we started the PowerMetric on Jun, 2019 ( About 4.5 months worth of data).



Create the Instagram Business PowerMetric

The 3 steps to create a PowerMetric to show Instagram Business Impressions, Reach, and Profile views for the same account.

1. Create an Instagram Business data source using below query to get Impressions, Reach and Pageviews data:
   https://graph.facebook.com/v3.2/<yourInstagramBusinessAccount#>/insights?metric=impressions,reach,profile_views,follower_count&period=day&since= {date.add(-30).format('unixtime')}&until={date.today.format('unixtime')}

Note: We can back log the data by going back to months or years. To learn about creating history refer to this article: Historical Data.

Below is a snapshot of the data source result outlook:


2. To model the data source follow these steps:

   a)  Have a Metric column


   b)  Bring all the values for each Metric


   c)  Show the date for each Metric node


   d)  We are repeating Instagram Business account name for future reference in PowerMetric


   e)  This Year column is optional. It is good if you want to segment your data by year


3. Create the Power Metric: (This PowerMetric data shape is Periodic Summary).



Create the Calculated PowerMetric that combines Instagram and Instagram Business


Now that we have 2 PowerMetrics created, one showing number of posts for an account and the other metric is number of Impressions, Reach and Page_values for the same account. Then we can use a calculated metric to merge these 2 PowerMetrics together.

Click the Calculate a new PowerMetric button and sum PowerMetric A + PowerMetric B to create the third calculated PowerMetric. 



Here are 3 different views of our Calculated PowerMetric:  bar-chart and 2 tables. I chose to show data for the last 3 months. 


 Bar chart by Month


Table by Month


Table by Year



Calculated of Calculated PowerMetrics

Above is a great first Calculated PowerMetric to try out the basics but what if you have multiple Instagram Accounts and Multiple Instagram Business Accounts to track your metrics for?

In this case, we can go one step further and do calculated of calculated PowerMetrics.

Let say you have 2 accounts in Instagram that you like to follow the number of Posts for each account in 1 PowerMetric Visualization.

And Also you have 2 accounts in Instagram business that you would like to follow the number of Impressions, reach and Profile View for each.

The overall outline of what you need to do is as below:



The process for creating data source queries and associated models is exactly the same as explained above. The PowerMetric creation process is shown below.  For more information on Calculated PowerMetrics, see Calculated PowerMetrics.


   a)  Posts from Instagram accounts A and B:



   b)  Impressions, Reach, Page_views from Instagram Business accounts A and B.


   c)  The Calculated PowerMetric based on the above Calculated PowerMetrics is:



Hope that helps! 





Please sign in to leave a comment.