Edit in JSFiddle

var _sidestreet = _sidestreet || {};
_sidestreet['sidestreet.siteCode'] = 'XXXXXXXX';
(function (d) {
  var _rp = d.createElement('script');
  _rp.type = 'text/javascript';
  _rp.async = true;
  _rp.src = (d.location.protocol == 'https:' ? "https://" : "http://") + "sidestreet.co/sidestreet-v-1.0.min.js?" + Date.now();
  var _sNode = d.getElementById('_sidestreet_script_tag');
  _sNode.parentNode.insertBefore(_rp, _sNode);
})(document);