You know you want it. The elusive white unicorn that is historical real-time Chartbeat data. We constantly challenge our products to give you better historical context in creative ways (like replay and typical performance), but we totally get that you may just want to log snapshots of your dashboard.
Well, you’re not alone. Many of our client-partners have built their own suites of cron jobs calling the Chartbeat API’s and storing in a database at some frequency to use historical information to give more context to their real-time decisions.
But, for the average pretengineer or those of us who don’t even have enough hours in the day to make time to eat breakfast, going the extra step to get more out of your Chartbeat data isn’t something you can make time for. Adding databases and time-based job schedulers take a backseat to the rest of your life.
With a Google Apps Script & Google Spreadsheet concoction, you can easily leverage the Chartbeat API to store only the data you care about, longer than 30 days.
You can then write directly into a Google Spreadsheet of your choice by converting the response into rows then inserting those rows on your favorite spreadsheet:
To take it a step further, you can schedule a frequency to run it the script behind the scenes. Maybe you want to log your daily max by traffic source every night, or store your average engaged time every-day at lunch. Adding triggers to automate your script is as easy as a couple drop-downs:
As always, if you have a question or maybe just want some code we’ve already built to copy into your Google Drive right away we’re here to help. Drop us a line, shoot us an email, or visit support.chartbeat.com.