0

Using PowerMetrics to track Twitter data

Using PowerMetrics to track Twitter data

In this article we learn how to create a Twitter PowerMetric to track different things like followers, likes, following, and the number of tweets with one or multiple twitter handles.

Note: this article assume you would have the basic knowledge of creating a PowerMetric. 

For the first example, let’s start with a basic PowerMetric that measures the number of followers for 1 specific handle. To do this, you can take advantage of one of our pre-built PowerMetric templates. To understand what is behind this pre-build PowerMetric see the steps below. 


This gives you a PowerMetric that tracks followers for one twitter handle. 


Please note that in this PowerMetric, you will have 1 day worth of data initially, however the history grows over time. In the above example, we started the PowerMetric on Aug 1st, 2019. 

 

Above is a great first PowerMetric to try out the basics but what if you have multiple twitter handles you want to track followers for?

Fortunately, the twitter API allows us the option of passing multiple screen names or twitter handles into one single request. So in this 2nd example let’s create a PowerMetric that shows followers for multiple handles.

The steps for creation of datasource, model and PowerMetric. 




  • Model Creation (Steps for each column’s formula) : 

1- Screen Name column: 



2-Value Column: 

 

Now you can see the followers for several twitter handles in one PowerMetric view as shown below.


 

Now, let’s take it one step further and create a PowerMetric where there are multiple handles and multiple twitter entities tracked like followers, following, likes and tweets. 

The datasource query is exactly the same as with the previous example 


  • To create the model, we will have 3 columns to track the Screen Name for each twitter handle, the Category (followers, following, likes and tweets) and the Value for each Category.  

 

  • Column 1(Screen name formula):

           Repeating each ScreenName 4 times. As we are tracking 4 metrics here (Tweets, Followers, Following and Likes) 

  • Col 2 (Value formula):

           Use Array() to combine the different entity values into one column. 

 

  • Then Col 3 (Categories formula) 

           Simply repeat each category name, e.g. followers, for the count of the unique twitter handles in the data source.



PowerMetric: 

Once your model is ready to go, you can create your powerful PowerMetric that allows you to see multiple different handles and measures.  Below is a dashboard built using this PowerMetric example.

 

 

Hope that helps!

 

0 comments

Please sign in to leave a comment.