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

+ 1 - 11
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -467,17 +467,7 @@ define [
 		$scope.startFreeTrial = (source) ->
 		$scope.startFreeTrial = (source) ->
 			ga?('send', 'event', 'subscription-funnel', 'compile-timeout', source)
 			ga?('send', 'event', 'subscription-funnel', 'compile-timeout', source)
 
 
-			switch source
-				when "dropbox"
-					sixpack.participate 'teaser-dropbox-text', ['default', 'dropbox-focused'], (variant) ->
-						event_tracking.sendMB "subscription-start-trial", { source, variant }
-
-				when "history"
-					sixpack.participate 'teaser-history', ['default', 'focused'], (variant) ->
-						event_tracking.sendMB "subscription-start-trial", { source, variant }
-
-				else
-					event_tracking.sendMB "subscription-start-trial", { source }
+			event_tracking.sendMB "subscription-start-trial", { source }
 
 
 			window.open("/user/subscription/new?planCode=student_free_trial_7_days")
 			window.open("/user/subscription/new?planCode=student_free_trial_7_days")
 			$scope.startedFreeTrial = true
 			$scope.startedFreeTrial = true

+ 13 - 2
services/web/public/coffee/main/account-upgrade.coffee

@@ -6,9 +6,20 @@ define [
 		$scope.buttonClass = "btn-primary"
 		$scope.buttonClass = "btn-primary"
 
 
 		$scope.startFreeTrial = (source, couponCode) ->
 		$scope.startFreeTrial = (source, couponCode) ->
-			event_tracking.sendMB "subscription-start-trial", { source }
-
 			w = window.open()
 			w = window.open()
+
+			switch source
+				when "dropbox"
+					sixpack.participate 'teaser-dropbox-text', ['default', 'dropbox-focused'], (variant) ->
+						event_tracking.sendMB "subscription-start-trial", { source, variant }
+
+				when "history"
+					sixpack.participate 'teaser-history', ['default', 'focused'], (variant) ->
+						event_tracking.sendMB "subscription-start-trial", { source, variant }
+
+				else
+					event_tracking.sendMB "subscription-start-trial", { source }
+
 			sixpack.convert "track-changes-discount", ->
 			sixpack.convert "track-changes-discount", ->
 				sixpack.participate 'in-editor-free-trial-plan', ['student', 'collaborator'], (planName, rawResponse)->
 				sixpack.participate 'in-editor-free-trial-plan', ['student', 'collaborator'], (planName, rawResponse)->
 					ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
 					ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)