_loadPixel(src, metadata) {
    let pxContainer = document.getElementById('tracking_px_container'),
      px = document.createElement('img');

    if (!metadata) {
      metadata = { times: 0, refireAfter: Date.now() };
      _metricsRetryQueue.set(src, metadata);
    }

    metadata.times++;
    metadata.refireAfter = Date.now() + _retryBaseInterval * metadata.times;

    if (metadata.times > 10) {
      _metricsRetryQueue.delete(src);
    }

    px.src = src + (metadata.times > 1 ? `&refire=${metadata.times - 1}` : '');
    px.onload = () => {
      pxContainer.removeChild(px);
      _metricsRetryQueue.delete(src);
    };
    pxContainer.appendChild(px);
  }
/**
   * Loads the tracking pixel into the tracking container.
   * @param {string} src - Tracking pixel URL to load
   * @param {Object} metadata - Metadata for this particular metric, keeps track of how many times it has been attempted, etc
   * @private
   * @returns {void}
   */
Loads the tracking pixel into the tracking container.
@param {string} src - Tracking pixel URL to load
@param {Object} metadata - Metadata for this particular metric, keeps track of how many times it has been attempted, etc
@private
@returns {void}
Loads the tracking pixel into the tracking container . @param { string } src - Tracking pixel URL to load @param { Object } metadata - Metadata for this particular metric keeps track of how many times it has been attempted etc @private @returns { void }
_loadPixel(src, metadata) {
    let pxContainer = document.getElementById('tracking_px_container'),
      px = document.createElement('img');
    if (!metadata) {
      metadata = { times: 0, refireAfter: Date.now() };
      _metricsRetryQueue.set(src, metadata);
    }
    metadata.times++;
    metadata.refireAfter = Date.now() + _retryBaseInterval * metadata.times;
    if (metadata.times > 10) {
      _metricsRetryQueue.delete(src);
    }
    px.src = src + (metadata.times > 1 ? `&refire=${metadata.times - 1}` : '');
    px.onload = () => {
      pxContainer.removeChild(px);
      _metricsRetryQueue.delete(src);
    };
    pxContainer.appendChild(px);
  }
_loadPixel ( src , metadata ) { let pxContainer = document . getElementById ( 'tracking_px_container' ) , px = document . createElement ( 'img' ) ; if ( ! metadata ) { metadata = { times : 0 , refireAfter : Date . now ( ) } ; _metricsRetryQueue . set ( src , metadata ) ; } metadata . times ++ ; metadata . refireAfter = Date . now ( ) + _retryBaseInterval * metadata . times ; if ( metadata . times > 10 ) { _metricsRetryQueue . delete ( src ) ; } px . src = src + ( metadata . times > 1 ? ` ${ metadata . times - 1 } ` : '' ) ; px . onload = ( ) => { pxContainer . removeChild ( px ) ; _metricsRetryQueue . delete ( src ) ; } ; pxContainer . appendChild ( px ) ; }
Loads the tracking pixel into the tracking container.
Loads the tracking pixel into the tracking container .