extensions/amp-story-interactive/0.1/amp-story-interactive-abstract.js
/**
   * Triggers the analytics event for quiz response.
   *
   * @param {number} optionIndex
   * @private
   */
Triggers the analytics event for quiz response.
@param {number} optionIndex
@private
Triggers the analytics event for quiz response . @param { number } optionIndex @private
triggerAnalytics_(optionIndex) {
    this.variableService_.onVariableUpdate(
      AnalyticsVariable.STORY_INTERACTIVE_ID,
      this.element.getAttribute('id')
    );
    this.variableService_.onVariableUpdate(
      AnalyticsVariable.STORY_INTERACTIVE_RESPONSE,
      optionIndex
    );
    this.variableService_.onVariableUpdate(
      AnalyticsVariable.STORY_INTERACTIVE_TYPE,
      this.interactiveType_
    );
    this.element[ANALYTICS_TAG_NAME] = this.element.tagName;
    this.analyticsService_.triggerEvent(
      StoryAnalyticsEvent.INTERACTIVE,
      this.element
    );
  }
triggerAnalytics_ ( optionIndex ) { this . variableService_ . onVariableUpdate ( AnalyticsVariable . STORY_INTERACTIVE_ID , this . element . getAttribute ( 'id' ) ) ; this . variableService_ . onVariableUpdate ( AnalyticsVariable . STORY_INTERACTIVE_RESPONSE , optionIndex ) ; this . variableService_ . onVariableUpdate ( AnalyticsVariable . STORY_INTERACTIVE_TYPE , this . interactiveType_ ) ; this . element [ ANALYTICS_TAG_NAME ] = this . element . tagName ; this . analyticsService_ . triggerEvent ( StoryAnalyticsEvent . INTERACTIVE , this . element ) ; }
Triggers the analytics event for quiz response.
Triggers the analytics event for quiz response .