Paulo Reis 10 лет назад
Родитель
Сommit
af93ac4413

+ 1 - 1
services/web/app/views/contact-us-modal.jade

@@ -21,7 +21,7 @@ script(type='text/ng-template', id='supportModalTemplate')
 				p.contact-suggestion-label #{translate("kb_suggestions_enquiry")}
 				p.contact-suggestion-label #{translate("kb_suggestions_enquiry")}
 				ul.contact-suggestion-list
 				ul.contact-suggestion-list
 					li(ng-repeat="suggestion in suggestions")
 					li(ng-repeat="suggestion in suggestions")
-						a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", target="_blank")
+						a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", ng-click="clickSuggestionLink(suggestion.url);" target="_blank")
 							span(ng-bind-html="suggestion.name")
 							span(ng-bind-html="suggestion.name")
 							i.fa.fa-angle-right
 							i.fa.fa-angle-right
 			label.desc(ng-show="'#{getUserEmail()}'.length < 1")
 			label.desc(ng-show="'#{getUserEmail()}'.length < 1")

+ 6 - 1
services/web/public/coffee/main/contact-us.coffee

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