Chartbeat

Adding The Code

The Chartbeat code consists of two pieces of JavaScript. Insert this right after the opening head tag (<head>):

        <script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
    

Insert this right before the closing body tag (</body>):

<script type="text/javascript">
var _sf_async_config={};
/** CONFIGURATION START **/
_sf_async_config.uid = 1234; /** CHANGE THIS **/
_sf_async_config.domain = "changeme.com"; /** CHANGE THIS **/
/** CONFIGURATION END **/
(function(){
  function loadChartbeat() {
    window._sf_endpt=(new Date()).getTime();
    var e = document.createElement("script");
    e.setAttribute("language", "javascript");
    e.setAttribute("type", "text/javascript");
    e.setAttribute("src",
       (("https:" == document.location.protocol) ?
         "https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" :
         "http://static.chartbeat.com/") +
       "js/chartbeat.js");
    document.body.appendChild(e);
  }
  var oldonload = window.onload;
  window.onload = (typeof window.onload != "function") ?
     loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
</script>
    

Please login to retrieve your user id.

Chartbeat will be up and running now, but you can make a couple of configuration tweaks to make Chartbeat better fit exactly what you need. You can read about them next.