How to track your Instagram followers over time with Google Sheets Scripts

Nick Boyce
Feb 27, 2017 · 3 min read

Update: I’m indebted to @Juliandev (Github link) who has rewritten the script from scratch after the old one stopped working.

While some tools have sprung up that allow you to track follower count over time, none of them give you direct access to the data so you can’t add it to Google Sheets. Luckily, the problem was easily solved with a simple Google Apps Script, which you can have up and running in 2 minutes. Here’s how!

  • Create a new Google Sheet, and create headings “followers”, “following”, “Media count”, “Likes”, “Comments”, “Engagement Ratio” in cells A1 to F1
  • Open “Tools > Script Editor”
  • Paste this script and change the variables on lines 2 and 4 to the name of your sheet, and the name of the Instagram account you’d like to target.
  • Save the script (you’ll be prompted to name the project)
  • Open “Run > insertFollowerCount” and when prompted to for authorization choose “Review Permissions” then allow permission on the dialog box

If you switch back to your spreadsheet you should have a new row added with today’s date and the number of followers.

Image for post
Image for post

Because Instagram’s API doesn’t give access to historical follower counts, you’ll need to run this every day. Thankfully we can automate this.

  • Open “Edit > Current project’s triggers”
  • Click “No triggers set up. Click here to add one now.” then choose “Time-driven” and “Day timer” and choose a time you’d like the script to run.
Image for post
Image for post

You’ll now get a new row added to your spreadsheet every night. Once you’ve collected a week or two worth of data, you’ll be able to make it useful.

For our KPI dashboards we track changes over a specific time period and visualise them in charts. Here is an example that shows last week’s metrics using a sparkline to see if changes are caused by a consistent trend, or a one-time spike.

Image for post
Image for post

If you were so inclined (we’re not!), you could also track your competitor’s accounts.

Like what you see? Read about how to tie this all together into automated dashboards.

The current version is provided by @JulianDev on Github. Damian Bast provided the previous version of the script based after mins stopped working when Instagram changed their API. Thanks both for your contributions!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store