getInteractionType function
Implementation
String getInteractionType(InteractionTypes type) {
switch (type) {
case InteractionTypes.impression:
return 'impression';
case InteractionTypes.click:
return 'click';
case InteractionTypes.search:
return 'search';
case InteractionTypes.widgetView:
return 'widget-view';
default:
throw Exception('Interaction type is not defined.');
}
}