analytics.js
function attach(el, fn){
  el.attachEvent('onreadystatechange', function(e){
    if (!/complete|loaded/.test(el.readyState)) return;
    fn(null, e);
  });
  el.attachEvent('onerror', function(e){
    var err = new Error('failed to load the script "' + el.src + '"');
    err.event = e || window.event;
    fn(err);
  });
}
function attach(el, fn){
  el.attachEvent('onreadystatechange', function(e){
    if (!/complete|loaded/.test(el.readyState)) return;
    fn(null, e);
  });
  el.attachEvent('onerror', function(e){
    var err = new Error('failed to load the script "' + el.src + '"');
    err.event = e || window.event;
    fn(err);
  });
}
function attach ( el , fn ) { el . attachEvent ( 'onreadystatechange' , function ( e ) { if ( ! / complete|loaded / . test ( el . readyState ) ) return ; fn ( null , e ) ; } ) ; el . attachEvent ( 'onerror' , function ( e ) { var err = new Error ( 'failed to load the script "' + el . src + '"' ) ; err . event = e || window . event ; fn ( err ) ; } ) ; }
Attach event.

@param {Element} el
@param {Function} fn
@api private
Attach event .