Get MailChimp Subscribers (Member Count) in Google Sheets

MailChimp Subscribers Google Data Studio

One MailChimp number you really want to have in a dashboard, are the number of MailChimp Subscribers (or Member Count as it’s called in the MailChimp API 3.0 documentation). So here is a quick blog post about how to get this number, plus some other stats about your MailChimp Subscriber List.

The script will output the following data to a Google Sheet from the Lists part of the MailChimp API 3.0 (Read method):

Subscribers, Unsubscribe Count, Cleaned Count, Member Count Since Send, Unsubscribe Count Since Send, Cleaned Count Since Send, Campaign Count, Campaign Last Sent, Merge Var Count, Average Subscription Rate, Average Unsubscription Rate, Average Target Subscription Rate, Open Rate, Click Rate, Date of Last List Subscribe, Date of Last List Unsubscribe, List Rating

Create the Google Sheet

  1. Go to Google Sheets, and Start a new spreadsheet
  2. Rename Google Sheets Tab to MemberData
  3. Via the menu, go to the Script Editor
    (Tools -> Script editor)

Google Apps Script for MailChimp API 3.0

Paste the script below into the Script editor. You should only have to replace 2 things in this script:

  1. MailChimp API Key (API_KEY)
  2. MailChimp List ID (LIST_ID)

Since I in a previous blog post called Get MailChimp API 3.0 Campaign Data in Google Sheets covered how to auto-update data from MailChimp to Google Sheets, I will not cover that in this blog post.

Reporting MailChimp Subscribers in Google Data Studio

Although you can view these MailChimp data directly in Google Sheets and create beautiful reports and dashboard there, the reason I wrote this script is that I wanted this information in Google Data Studio.  Since Google Data Studio don’t have a connector to the MailChimp API, you will first have to get the data into Google Sheets, and then you will connect Google Data Studio to that sheet.

Now go and create a MailChimp Dashboard that (hopefully) shows that your email marketing is not bananas!

6 Comments on "Get MailChimp Subscribers (Member Count) in Google Sheets"

  1. Would it be possible to customize this to fetch stats for a segment within the list? Thanks

  2. How can I record monthly statistics using the script? I currently set it but I am only receiving a single record. It will be awesome to look at the evolution of this numbers.

    Thanks in advance

  3. I am also interested in to learn if you can get monthly statistics to see the evolution

  4. Wonderful !
    Your script is so simple and helpful that I’m wondering why using connectors.
    I haven’t found free ones. Somebody know where I could find it ?
    Supermetrics Mailchimp Connecter doest not appear free anymore https://supermetrics.com/pricing/data-studio.

    I changed a little bit the code for more readability and maintainability :
    https://pastebin.com/Zy1wJxgs
    (I prefer using an Object key:value instead of get two array, if you want to add or remove a value, it is easier)
    Thank you very much++!

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.