_initVariationTracking() {
    this.linear = false;
    this.skipDelay = DEFAULT_SKIP_DELAY;

    // If no variation has been provided there's nothing else to set
    if (!this.variation) {
      return;
    }

    // Duplicate the variation's trackingEvents property so we can alter it
    for (const eventName in this.variation.trackingEvents) {
      const events = this.variation.trackingEvents[eventName];

      // If for the given eventName we already had some trackingEvents provided by the creative
      // we want to keep both the creative trackingEvents and the variation ones
      if (this.trackingEvents[eventName]) {
        this.trackingEvents[eventName] = this.trackingEvents[eventName].concat(
          events.slice(0)
        );
      } else {
        this.trackingEvents[eventName] = events.slice(0);
      }
    }

    if (isNonLinearAd(this.variation)) {
      this.clickThroughURLTemplate = this.variation.nonlinearClickThroughURLTemplate;
      this.clickTrackingURLTemplates = this.variation.nonlinearClickTrackingURLTemplates;
      this.setDuration(this.variation.minSuggestedDuration);
    } else if (isCompanionAd(this.variation)) {
      this.clickThroughURLTemplate = this.variation.companionClickThroughURLTemplate;
      this.clickTrackingURLTemplates = this.variation.companionClickTrackingURLTemplates;
    }
  }
/**
   * Init the custom tracking options for nonlinear and companion creatives.
   * These options are provided in the variation Object.
   *
   * @return {void}
   */
Init the custom tracking options for nonlinear and companion creatives.
These options are provided in the variation Object.

@return {void}
Init the custom tracking options for nonlinear and companion creatives . These options are provided in the variation Object . @return { void }
_initVariationTracking() {
    this.linear = false;
    this.skipDelay = DEFAULT_SKIP_DELAY;
    if (!this.variation) {
      return;
    }
    for (const eventName in this.variation.trackingEvents) {
      const events = this.variation.trackingEvents[eventName];
      if (this.trackingEvents[eventName]) {
        this.trackingEvents[eventName] = this.trackingEvents[eventName].concat(
          events.slice(0)
        );
      } else {
        this.trackingEvents[eventName] = events.slice(0);
      }
    }
    if (isNonLinearAd(this.variation)) {
      this.clickThroughURLTemplate = this.variation.nonlinearClickThroughURLTemplate;
      this.clickTrackingURLTemplates = this.variation.nonlinearClickTrackingURLTemplates;
      this.setDuration(this.variation.minSuggestedDuration);
    } else if (isCompanionAd(this.variation)) {
      this.clickThroughURLTemplate = this.variation.companionClickThroughURLTemplate;
      this.clickTrackingURLTemplates = this.variation.companionClickTrackingURLTemplates;
    }
  }
_initVariationTracking ( ) { this . linear = false ; this . skipDelay = DEFAULT_SKIP_DELAY ; if ( ! this . variation ) { return ; } for ( const eventName in this . variation . trackingEvents ) { const events = this . variation . trackingEvents [ eventName ] ; if ( this . trackingEvents [ eventName ] ) { this . trackingEvents [ eventName ] = this . trackingEvents [ eventName ] . concat ( events . slice ( 0 ) ) ; } else { this . trackingEvents [ eventName ] = events . slice ( 0 ) ; } } if ( isNonLinearAd ( this . variation ) ) { this . clickThroughURLTemplate = this . variation . nonlinearClickThroughURLTemplate ; this . clickTrackingURLTemplates = this . variation . nonlinearClickTrackingURLTemplates ; this . setDuration ( this . variation . minSuggestedDuration ) ; } else if ( isCompanionAd ( this . variation ) ) { this . clickThroughURLTemplate = this . variation . companionClickThroughURLTemplate ; this . clickTrackingURLTemplates = this . variation . companionClickTrackingURLTemplates ; } }
Init the custom tracking options for nonlinear and companion creatives.
Init the custom tracking options for nonlinear and companion creatives .
// If no variation has been provided there's nothing else to set // Duplicate the variation's trackingEvents property so we can alter it // If for the given eventName we already had some trackingEvents provided by the creative // we want to keep both the creative trackingEvents and the variation ones