|
|
@@ -10,7 +10,7 @@ define [
|
|
|
controller: "SupportModalController"
|
|
|
)
|
|
|
|
|
|
- App.controller 'SupportModalController', ($scope, $modalInstance, algoliaSearch) ->
|
|
|
+ App.controller 'SupportModalController', ($scope, $modalInstance, algoliaSearch, event_tracking) ->
|
|
|
$scope.form = {}
|
|
|
$scope.sent = false
|
|
|
$scope.sending = false
|
|
|
@@ -24,6 +24,8 @@ define [
|
|
|
url :"/learn/kb/#{page_underscored}"
|
|
|
name : hit._highlightResult.pageName.value
|
|
|
|
|
|
+ event_tracking.sendCountly "contact-form-suggestions-shown" if results.hits.length
|
|
|
+
|
|
|
$scope.$applyAsync () ->
|
|
|
$scope.suggestions = suggestions
|
|
|
|
|
|
@@ -57,6 +59,9 @@ define [
|
|
|
else
|
|
|
$scope.suggestions = [];
|
|
|
|
|
|
+ $scope.clickSuggestionLink = (url) ->
|
|
|
+ event_tracking.sendCountly "contact-form-suggestions-clicked", { url }
|
|
|
+
|
|
|
$scope.close = () ->
|
|
|
$modalInstance.close()
|
|
|
|