Posts Tagged ‘Chartbeat API’

As you may have heard, at Chartbeat we’re able to measure data about audience loyalty, engagement, and referrals. We strive to build the best tools possible based on our data to help our partners make better-informed decisions for their sites. That said, we know our talented clients are capable of doing great things with our data. Thus we make the Chartbeat API accessible to clients, giving them the opportunity to build great things alongside us.

Over the past few years, we’ve been constantly wowed by all of the incredible widgets, programs and visuals our clients come up with by taking advantage of our API – from top page modules to quirkily-customized data visualizations to some clients even making their data available to the public on their sites.

In this month’s awesome webinar we show you what you can do with the Chartbeat API and celebrate some of the more creative or useful projects our data-nerds and clients have built using our data.

Already doing great stuff with the Chartbeat API? Share the fruits of your labor in the Comments section.

Enjoy the webinar!

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.

Enter Google Apps Scripting & Google Spreadsheets.

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.

Google Apps Scripting is a JavaScript cloud scripting language that provides easy ways to automate tasks and most notably, write directly into Google Spreadsheets. Here’s a simple function calling the Chartbeat Historical Traffic Series API with our default response settings (active visitors today, in 5 minute intervals):


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

One of the goals of Chartbeat is to make really complex information really easy to understand – really fast. We keep this in mind when we build anything from a new feature on a dashboard to our heads up display and now our new API Explorer.

Instead of creating static API documentation separate from the API explorer, which is confusing to navigate and takes way too long to jump back and forth, we bundled these two things together. So you have a seamless work flow when working with our API.

Now, when you look at the documentation for an endpoint, you don’t just see a unpersonalized template response, you can actually play around with your own data. It’s a preview of your data with our API. Awesome, right?

Play around with a couple of these to see what I mean:

These API explorer updates aren’t just an opportunity to explore the capabilities of our API, it also helps to directly integrate our API into your service. On top of providing the results of your API query, you’ll now see what URL would return those same results. From there, you’ll use the URL we provide to mimic the exact results you see in the response.

Now, let’s talk about collaboration. Instead of sending the actual API URL to show someone the response, we created a special syntax for specifying an endpoint and it’s parameters within the hash of the URL of the API explorer page itself. This move allows you to show anyone a quick visualization of the information you plan on using without having to build anything.

It’s basically magic. API wizardry.

After you find the query you were looking for, just send the URL of the API explorer page to your friend/colleague/collaborator-in-crime, and they will be presented with an API explorer form just like you left it.

We explain the response completely, so they won’t be bugging you about what a particular field in the response means.

Lastly, we took care of a little housekeeping on the UX front for you: Since we want to make accessing your data as easy as possible, all your current API keys are at the top page, and by selecting one it automatically appears in the form. You can also manage your API keys directly from the explorer page. If you suddenly realize you need a new API key adding one is right there – where you’d expect it to be.

So what do you think? A little more helpful, we hope, especially seeing your data paired with the documentation. But you know us, always iterating, so let us know if you have suggestions on how we can improve our APIs.

Hacking Chartbeat

March 16th, 2012 by Daniel

The number one reason Chartbeat is as awesome as it is? We exclusively hire awesome people. And the backbone of our awesome resides in our team of engineers.

When you hire world-class engineers, you need to give them freedom to build and create. Some people think that’s a scary challenge. We don’t. Because we’ve developed a unique and crazy successful solution.

Percent Time
It’s fairly common in the tech world to have “percent time,” or a set amount of time given to employees to explore ideas outside of the set product roadmap.

The thinking here is that when you allow engineers the ability to scratch their own itches, you end up with happier hackers, less burnout, and most importantly new ideas. Many of the products you use every day started out as a small hack project like Google’s Gmail and Facebook’s birthday calendar.

We take this itch-scratching, happy-hacker time very seriously, though also a bit differently than most companies.

Every six weeks we press pause on roadmaps, projections, and meetings. During this week, affectionately known as Hack Week, everyone is given free reign to build, create, or design whatever piques their interest. The only rule is that you have to demo something once Friday rolls around.

Hacks range from data visualizations to monitoring tools to Arduino-powered empty-water-cooler sensors.

Chartbeat Labs
Hack Week projects are often way too amazing to keep to ourselves, so we blow them out and polish them up and share them through Chartbeat Labs, a public directory of awesome visualizations and tools built around Chartbeat data.

We’re still working on getting everything up there, but there’s a wealth of interesting stuff just waiting for you:

  • Around the World: A real-time map of who’s visiting your site and where they are in the world.
  • Big Board: For real time to be a success, you need to live in it, in a full environment of data. The Chartbeat Big Board is perfect for having an ambient view of activity on your site.
  • Universe: Your site is a galaxy of pages. Watch them pop in and out of orbit.
  • Traffic Control: You know there are people on your site, and you know what pages they’re on. Using Traffic Control, you can watch them move from page to page and understand where your most popular and most important paths are.
  • Big Board Mosaic (just for Newsbeat clients): Easily understand your traffic at a glance. Big colorful blocks that tell you how much traffic a page has, and where on the web they came from.

Most importantly, we try to open source anything and everything we can. We love seeing what you guys can accomplish using our API and your own data to create something truly unique.

Want to get in the hack game? Share what you’ve done with us on Twitter. Or if you’re the shy type, kick it over to us at

Displaying data about your site, on your site, has become part of the standard user experience – from the number of Facebook and Twitter shares to the total page views on every article.

Business Insider's Engage-O-Meter

Last Wednesday, Business Insider took it one step further when they launched the Engage-O-Meter, a customized chartbeat-powered widget showing how many people are on their site right now.

They also made their chartbeat dashboard accessible to the public.

By opening up their real-time data, Business Insider joins a group of other chartbeat users who are showing off their numbers:

  • Midi Libre is displaying both active visits and traffic to top stores at the top of their home page
  • has a real-time feed of where their users are arriving from and what they’re reading
If you want to join this growing list of users, we have a few tools and widgets to get you started. And don’t worry if you aren’t a coding genius – many of these options require minimal engineering skills.

Active Visits

The Active Visits Dial shows the total number of visitors across your entire site with the classic chartbeat gauge. You can customize color and size, refresh rate, and the widget label. Please note that you will need to proxy the api request to use this, so it’s a little more developer intensive than the rest of the widgets.

Active Visits by the Numbers shows the number of people that are currently on a specific page or across your entire site. It can show either the total number of people, the new vs. returning users, or the reading/writing/idle activity on a specific page or the entire site.

Mapping Your Visitors

The Incoming Visitors Map is a simple mashup of Google Maps and the chartbeat ‘recent’ API call that plots the physical location of visitors to your site, along with what page they’re reading. The mashup is open source. View a live demo.

Top Stories

The Big Board is a dynamic overview of which articles are trending at the moment on your site. As traffic moves around your site, the pages will automatically rearrange themselves in order of popularity and arrows will indicate the direction of the traffic to that page. The Big Board is an open source project. View a live demo.

The Top Pages widget is a list of the current most visited pages across your site. You can select the number of stores to be shown in the list.

If you’re interested in displaying recent visits and referrers data, check out our Site Widgets page for easy-to-embed widgets. Or, if you want to build something from scratch, sign up for an API key and have all your data at your fingertips.

As always, we’re here to help. If you run into any problems installing the widgets or have an idea for other tools you’d like to see, let us know. Or, if you do something amazing with your chartbeat data, drop us a line. We’d love to see it!