Browse Source

Place tracking event on controller load.

Paulo Reis 10 years ago
parent
commit
b3db66e12b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      services/web/public/coffee/main/new-subscription.coffee

+ 1 - 3
services/web/public/coffee/main/new-subscription.coffee

@@ -12,10 +12,10 @@ define [
 		$scope.switchToStudent = ()->
 			window.location = "/user/subscription/new?planCode=student_free_trial_7_days&currency=#{$scope.currencyCode}&cc=#{$scope.data.coupon}"
 
+		event_tracking.sendMB "subscription-form", { plan : window.plan_code }
 
 		$scope.paymentMethod = "credit_card"
 
-
 		$scope.data =
 			number: ""
 			month: ""
@@ -59,8 +59,6 @@ define [
 			.done()
 
 		pricing.on "change", =>
-			event_tracking.sendMB "subscription-form", { plan : pricing.items.plan.code }
-
 			$scope.planName = pricing.items.plan.name
 			$scope.price = pricing.price
 			$scope.trialLength = pricing.items.plan.trial?.length