click(fallbackClickThroughURL = null, macros = {}) {
    if (
      this.clickTrackingURLTemplates &&
      this.clickTrackingURLTemplates.length
    ) {
      this.trackURLs(this.clickTrackingURLTemplates, macros);
    }

    // Use the provided fallbackClickThroughURL as a fallback
    const clickThroughURLTemplate =
      this.clickThroughURLTemplate || fallbackClickThroughURL;
    // clone second usage of macros, which get mutated inside resolveURLTemplates
    const clonedMacros = { ...macros };

    if (clickThroughURLTemplate) {
      if (this.progress) {
        clonedMacros['ADPLAYHEAD'] = this.progressFormatted();
      }
      const clickThroughURL = util.resolveURLTemplates(
        [clickThroughURLTemplate],
        clonedMacros
      )[0];

      this.emit('clickthrough', clickThroughURL);
    }
  }
/**
   * Must be called when the user clicks on the creative.
   * It calls the tracking URLs and emits a 'clickthrough' event with the resolved
   * clickthrough URL when done.
   *
   * @param {String} [fallbackClickThroughURL=null] - an optional clickThroughURL template that could be used as a fallback
   * @param {Object} [macros={}] - An optional Object containing macros and their values to be used and replaced in the tracking calls.
   * @emits VASTTracker#clickthrough
   */
Must be called when the user clicks on the creative.
It calls the tracking URLs and emits a 'clickthrough' event with the resolved
clickthrough URL when done.

@param {String} [fallbackClickThroughURL=null] - an optional clickThroughURL template that could be used as a fallback
@param {Object} [macros={}] - An optional Object containing macros and their values to be used and replaced in the tracking calls.
Must be called when the user clicks on the creative . It calls the tracking URLs and emits a ' clickthrough ' event with the resolved clickthrough URL when done . @param { String } [ fallbackClickThroughURL = null ] - an optional clickThroughURL template that could be used as a fallback @param { Object } [ macros = {} ] - An optional Object containing macros and their values to be used and replaced in the tracking calls .
click(fallbackClickThroughURL = null, macros = {}) {
    if (
      this.clickTrackingURLTemplates &&
      this.clickTrackingURLTemplates.length
    ) {
      this.trackURLs(this.clickTrackingURLTemplates, macros);
    }
    const clickThroughURLTemplate =
      this.clickThroughURLTemplate || fallbackClickThroughURL;
    const clonedMacros = { ...macros };
    if (clickThroughURLTemplate) {
      if (this.progress) {
        clonedMacros['ADPLAYHEAD'] = this.progressFormatted();
      }
      const clickThroughURL = util.resolveURLTemplates(
        [clickThroughURLTemplate],
        clonedMacros
      )[0];
      this.emit('clickthrough', clickThroughURL);
    }
  }
click ( fallbackClickThroughURL = null , macros = { } ) { if ( this . clickTrackingURLTemplates && this . clickTrackingURLTemplates . length ) { this . trackURLs ( this . clickTrackingURLTemplates , macros ) ; } const clickThroughURLTemplate = this . clickThroughURLTemplate || fallbackClickThroughURL ; const clonedMacros = { ... macros } ; if ( clickThroughURLTemplate ) { if ( this . progress ) { clonedMacros [ 'ADPLAYHEAD' ] = this . progressFormatted ( ) ; } const clickThroughURL = util . resolveURLTemplates ( [ clickThroughURLTemplate ] , clonedMacros ) [ 0 ] ; this . emit ( 'clickthrough' , clickThroughURL ) ; } }
Must be called when the user clicks on the creative.
Must be called when the user clicks on the creative .
// Use the provided fallbackClickThroughURL as a fallback // clone second usage of macros, which get mutated inside resolveURLTemplates