Bold360 AI Events API for Slim and Harmony widgets

The Events API allows the customer to hook into various Bold360 AI widget events. For example, you can use this API to push different Bold360 AI events to a 3rd party BI system (for example Universal Analytics) and generate Bold360 AI-related Reports.

You can use Widget Events API on the page where the widget is implemented as follows:

<script>
Nanorep.floatingWidget.on({ // Nanorep.embeddedWidget 
  init : function() { 
    this.setConfigId('916824103'); 
  }, 
  load : function() { 
    this.setContext({ brand: 'Apple' }); 
  }
});
< /script >

You can find the full list of events and methods here: http://my.Nanorep.com/web/doc/v1.html?section=widgets

Example: Sending customized GA events
 
/* API here */ 
Nanorep.embeddedWidget.on({ 
  init : function() { 
    this.setConfigId("1010521062"); 
  }, 
  ask : function(query) {
    ga('send', 'event', { 
      'eventCategory': 'Nanorep Widget', 
      'eventAction': 'Search', 
      'eventLabel': query 
    }); 
  },
  feedback : function( feedbackInfo , answer ) { 
    var f_message; 
    let type = 'Bad '; 
    console.log(feedbackInfo); 
    
    if (feedbackInfo.text) { 
      f_message = feedbackInfo.text; 
  
    } else { 
      switch (feedbackInfo.type) { 
        case 4: 
          f_message = 'Missing or incorrect information'; 
          break; 

        case 8:
          f_message = 'Answer irrelevant to the page'; 
          break; 

        case 1: 
          { 
            type = 'Good '; 
          }; 
          break; 
      }
    }
    ga("send", "event", { 
      'eventCategory': 'Nanorep Widget', 
      'eventAction': type + 'feedback', 
      'eventLabel': f_message, 
      'dimension1': answer // additional custom dimension 
    })
  }, 
  
  escalate : function( channel , answer ) { 
    ga('send', 'event', { 
      'eventCategory': 'Nanorep Widget', 
      'eventAction': 'Escalation ' + '[' + channel + ']', 
      'eventLabel': answer }); },
  
  noResults : function( query ) { 
    ga('send', 'event', { 
      'eventCategory': 'Nanorep Widget', 
      'eventAction': 'No answer', 
      'eventLabel': query 
    }); 
  }
});