<% if Rails.env.production? -%>
<script type="text/javascript">
  var _sf_async_config = { uid: <%= ENV["CHARTBEAT_UID"] -%>, domain: <%= ENV["CHARTBEAT_HOSTNAME"] -%>, useCanonical: true };
  (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','//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>
<% end -%>

<% if Rails.env.production? -%>
<script type="text/javascript">
  var _sf_async_config = { uid: <%= ENV["CHARTBEAT_UID"] -%>, domain: '<%= ENV["CHARTBEAT_HOSTNAME"] -%>', useCanonical: true };
  (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','//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>
<% end -%>

Fix chartbeat config by quoting string value
Fix chartbeat config by quoting string value

Close #289
