Просмотр исходного кода

Actually send the data to Countly.

Paulo Reis 10 лет назад
Родитель
Сommit
b841d41b68
1 измененных файлов с 16 добавлено и 2 удалено
  1. 16 2
      services/web/public/coffee/main/event.coffee

+ 16 - 2
services/web/public/coffee/main/event.coffee

@@ -6,10 +6,24 @@ define [
 		return {
 		return {
 			send: (category, action, label, value)->
 			send: (category, action, label, value)->
 				ga('send', 'event', category, action, label, value)
 				ga('send', 'event', category, action, label, value)
-				event_name = "#{action}-#{category}"
-				window?.heap?.track?(event_name, {label, value})
+
+			sendCountly: (key, segmentation) ->
+				eventData = { key }
+				eventData.segmentation = segmentation if segmentation?
+
+				Countly.q.push(['add_event', eventData]);
 		}
 		}
 
 
+	# App.directive "countlyTrack", () ->
+	# 	return {
+	# 		restrict: "A"
+	# 		scope: false,
+	# 		link: (scope, el, attrs) ->
+	# 			eventKey  = attrs.countlyTrack
+	# 			if (eventKey?)
+	# 				el.on "click", () ->
+	# 					console.log eventKey
+	# 	}
 
 
 	#header
 	#header
 	$('.navbar a').on "click", (e)->
 	$('.navbar a').on "click", (e)->