Skip to content

Instantly share code, notes, and snippets.

@craigs
Created November 4, 2010 08:51
Show Gist options
  • Save craigs/662242 to your computer and use it in GitHub Desktop.
Save craigs/662242 to your computer and use it in GitHub Desktop.
Chart Beat Installation
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<script type="text/javascript">
var _sf_async_config={uid:12798,domain:"{{ current_account.domain }}"};
(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://s3.amazonaws.com/" : "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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment