_initializeOnce() {
    if (this._isInitialized) {
      return;
    } // can only initialize once

    Logger.log('Initializing Metrics API');
    this._isInitialized = true;

    Storage.setItem('lastContentConsumedSent', Date.now());
    _userSession = this._createUserSession();
    _userSessionParams = {
      b: Properties.brand,
      sid: _userSession.id,
      d: 0,
      e: Properties.entryPage,
      aid: Properties.appID,
      av: Properties.appVersion,
      mtrv: 'JS2.0',
      ua: encodeURIComponent(navigator.userAgent),
      plat: Properties.platform.toLowerCase()
    };
    this._addCreativeData();

    this._runSessionMonitor();

    this._setupVisibility();
    this._setupEventHandlers();

    this._setupUser();
    this.fireUserSession();
    Logger.info('Initialized Metrics');
  }
/**
   * Initializes metrics for the Microzines; includes a guard so it can only be called once.
   * @returns {void}
   * @private
   */
Initializes metrics for the Microzines; includes a guard so it can only be called once.
@returns {void}
@private
Initializes metrics for the Microzines ; includes a guard so it can only be called once . @returns { void } @private
_initializeOnce() {
    if (this._isInitialized) {
      return;
    } 
    Logger.log('Initializing Metrics API');
    this._isInitialized = true;
    Storage.setItem('lastContentConsumedSent', Date.now());
    _userSession = this._createUserSession();
    _userSessionParams = {
      b: Properties.brand,
      sid: _userSession.id,
      d: 0,
      e: Properties.entryPage,
      aid: Properties.appID,
      av: Properties.appVersion,
      mtrv: 'JS2.0',
      ua: encodeURIComponent(navigator.userAgent),
      plat: Properties.platform.toLowerCase()
    };
    this._addCreativeData();
    this._runSessionMonitor();
    this._setupVisibility();
    this._setupEventHandlers();
    this._setupUser();
    this.fireUserSession();
    Logger.info('Initialized Metrics');
  }
_initializeOnce ( ) { if ( this . _isInitialized ) { return ; } Logger . log ( 'Initializing Metrics API' ) ; this . _isInitialized = true ; Storage . setItem ( 'lastContentConsumedSent' , Date . now ( ) ) ; _userSession = this . _createUserSession ( ) ; _userSessionParams = { b : Properties . brand , sid : _userSession . id , d : 0 , e : Properties . entryPage , aid : Properties . appID , av : Properties . appVersion , mtrv : 'JS2.0' , ua : encodeURIComponent ( navigator . userAgent ) , plat : Properties . platform . toLowerCase ( ) } ; this . _addCreativeData ( ) ; this . _runSessionMonitor ( ) ; this . _setupVisibility ( ) ; this . _setupEventHandlers ( ) ; this . _setupUser ( ) ; this . fireUserSession ( ) ; Logger . info ( 'Initialized Metrics' ) ; }
Initializes metrics for the Microzines; includes a guard so it can only be called once.
Initializes metrics for the Microzines ; includes a guard so it can only be called once .
// can only initialize once