Playing With Twitter Analytics

Bill Johnson
5 min readSep 4, 2014

--

Recently Twitter released an analytics dashboard for Twitter Cards. It’s a well designed and interesting tool showing you a lot of useful information about each of your tweets. For each tweet you can see how many times it was viewed, how many times people engaged with it (like clicking your username or hashtags, retweeting it, or even viewing the tweet detail page), and the overall engagement rate. I’m impressed that Twitter is freely and openly exposing this to all of its customers and not just those that pay for promoted tweets.

Even more impressive is that Twitter allows you to export all of this data out of the dashboard into a CSV file. Having some free time waiting for my car to get fixed, I decided to play around with this data a little more…

First step in this crude undertaking is to see how much data Twitter was willing to expose through this export. I’ve been a Twitter user (@dubrie) since May 2009 and somehow have amassed 5,204 tweets at the time of writing this sentence. A quick word count on the file shows that only 871 of those tweets are included in the export:

bill$ wc -l tweet_activity_metrics.csv

871 tweet_activity_metrics.csv

The dashboard only calls out the last 28 days (and implies the previous 28 days by comparison) so it’s not shocking they only provide a subset. Another quick command shows that 871 tweets covers the date range of 10/1/2013 until 7/11/2014 (yesterday). Oh well, that should be plenty to play around with for now.

To really dive into the data I have to start building some scripts. For speed of development I’m going to use Ruby and rely on just outputting to a console. I’m curious what my total numbers look like so first I’ll compile all the 283 days worth of data:

bill$ ruby tweet_stats.rb

———————————————————————

Tweets: 835

Dates: 283 days (2013–10–01 10:05:00 -0700 — 2014–07–11 19:43:00 -0700)

Total Impressions: 68467

Total Engagements: 2698

Impressions/Tweet: 81

engagements/Tweet: 3

———————————————————————

And there is my first mistake in this process: I only have 835 tweets instead of 871. Quick verification shows that between the header row in the dataset and tweets with newline characters in them, I over-counted by 35 tweets so that checks out. Of note is that it appears things you have retweeted do not appear in your analytics data so you will not be able to measure any ripple effects.

What about my “best” tweets? Or in other words, most engaging and viewed tweets?

Highest Engagement: 260 > 2014–05–15 13:40:00 -0700 — Go Blue! @FabioPereira_10 #goblue #umich http://t.co/MBF2ppGXiH

https://twitter.com/dubrie/status/467041887765790720

Most Impressions: 2569 > 2014–05–16 13:40:00 -0700 — Quick lunch w/ @alanhinton11 and Roger Levesque before practice #soundersdreamcamp http://t.co/gB0mA3ySod

https://twitter.com/dubrie/status/467404216537845760

Not shockingly, tweets during my Sounders Dream Camp experience were the most engaging and most viewed. Also, holy crap that was a really fun week!

I identified 3 things I want to answer from this exercise:

  1. When I tweet the most
  2. When things I tweet are viewed the most
  3. When things I tweet are engaged the most

Of those three things, I can slice up the data either by “day” (day of the week) or by “time” (hour of the day). Let’s look at the “day” slicing first. I find that my most popular day for the 3 things listed above are:

  1. When I tweet the most: Thursday
  2. When things I tweet are viewed the most: Friday
  3. When things I tweet are engaged the most: Friday

You can see in the chart above that there is a large difference between days but in general the end of the work week is the best time for me to tweet and have others read and engage with it.

Similarly, I want to slice this data by “time” as well as day. For this, I can break the data up into hours and get the following answer to my 3 goals for this exercise:

  1. When I tweet the most: 9am, 10am, 4pm (tie)
  2. When things I tweet are viewed the most: 1pm
  3. When things I tweet are engaged the most: 1pm

It’s interesting that I tweet mostly in the morning and before leaving work but my highest impressions and engagements are from tweets in the 1pm hour. This is information that a tool like Buffer could use to determine individually appropriate times to tweet for each of its users. Also interesting is how much more engaging tweets in the 1pm hour compared to the rest of the day:

Having these “day” and “time” slices allows me to answer my three stated goals from above. However, I couldn’t help myself from taking the next step and figuring out what is the most optimal hour of the week I should send a tweet to maximize my impressions and engagements.

I modified my charting code to be able to handle a matrix of data so that I can plot every hour of the day for every day of the week with their values and see how they all relate to each other. But just spitting out numbers doesn’t help much for quick comprehension so I normalized the impression data into 4 groups and charted that instead for every day and week:

The size of the marking provides the scale or significance of value. A blank spot is least significant, followed by a “.”, then a lower case “o”, and then finally a capital “O” being most significant. This shows pretty clearly that a tweet at 1pm on Friday is my most optimal time for impression and 8am on Friday is a close second. For engagements, Thursday at 1pm and Friday at 1pm were far and away the most significant with no other times coming close.

You can also see the general trend of activity towards the end of the week where Sunday-Tuesday morning are very light and Wednesday-Saturday are fairly heavy usage. I’m slightly surprised to see an east coast bias in the activity times (6am-2pm) as most of my Twitter usage has been since I’ve lived on the West coast.

I’m curious to run this again as I tweet more and more to see if and what changes over time. For now though, you will probably be seeing more tweets from me at 1pm on Friday!

If you want to check my work, or contribute your own, you can clone my github repo at: https://github.com/dubrie/twitter_analytics

If you don’t already, you should follow Twitter Data for more cool insights into Twitter data and usage.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Bill Johnson
Bill Johnson

Written by Bill Johnson

Principal Engineering Manager for Azure by day, run coach for @teamchallengenw by night

No responses yet

Write a response