What Does The Code Do
The Chartbeat code is fully asynchronous, in that the JavaScript installed on the page waits for the 'onload' event before fetching the main code (around 3KB gzipped). This ensures that the loading of the Chartbeat code has no influence on the main functionality, or page load time, of the page.
Once loaded, the Chartbeat code works like most other web analytics services: It triggers the loading of a beacon image, which returns a 1x1 pixel image (43 bytes). It is as nimble as it can get.
One difference from traditional web analytics is that Chartbeat loads a beacon periodically, not just once. This happens every 15 to 240 seconds, depending on the level of user engagement.
Other than that, the Chartbeat code adds a couple of event listeners for registering user engagement. The Chartbeat code does not however add any click listeners, or anything else that would slow down page performance.
Cookies
Chartbeat uses two cookies. The first one is used to register if the
user has visited the domain before, i.e. "new vs returning" user
(_chartbeat2).
The second (_SUPERFLY_nosample) is used if you receive more traffic
than your plan allows. This will trigger a 503 error from our backend
servers, which sets this cookie and then disables beacons from that
user for one hour.
If your site is subject to cookie legislation and you want to prevent the Chartbeat code from using cookies, you can set the
noCookies
configuration variable.
Reliability
The Chartbeat code itself is loaded from Akamai, which has a proven track record. Our backend services servicing the beacon are also capable of servicing massive amounts of requests, and we monitor the usage extensively. Even so, if either of these services fail, nothing on the page itself will break as both components are fully asynchronous.