Explorar o código

Add event tracking for upgrade button

Jessica Lawshe %!s(int64=8) %!d(string=hai) anos
pai
achega
d7756ea2de
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      services/web/public/coffee/main/account-settings.coffee

+ 4 - 1
services/web/public/coffee/main/account-settings.coffee

@@ -1,7 +1,7 @@
 define [
 	"base"
 ], (App) ->
-	App.controller "AccountSettingsController", ["$scope", "$http", "$modal", ($scope, $http, $modal) ->
+	App.controller "AccountSettingsController", ["$scope", "$http", "$modal", "event_tracking", ($scope, $http, $modal, event_tracking) ->
 		$scope.subscribed = true
 
 		$scope.unsubscribe = () ->
@@ -24,6 +24,9 @@ define [
 				controller: "DeleteAccountModalController",
 				scope: $scope
 			)
+
+		$scope.upgradeIntegration = (service) ->
+			event_tracking.send 'subscription-funnel', 'settings-page', service
 	]
 
 	App.controller "DeleteAccountModalController", [