- if (Rails.env.staging? || Rails.env.production?) && Spree::Config.bugherd_api_key.present?
  :javascript
    (function (d, t) {
      var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
      bh.type = 'text/javascript';
      bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{Spree::Config.bugherd_api_key}';
      s.parentNode.insertBefore(bh, s);
    })(document, 'script');
