 	"base"
 ], (App)->
 
-	App.controller "NewSubscriptionController", ($scope, MultiCurrencyPricing, abTestManager, $http, sixpack)->
+	App.controller "NewSubscriptionController", ($scope, MultiCurrencyPricing, abTestManager, $http, sixpack, event_tracking)->
 		throw new Error("Recurly API Library Missing.")  if typeof recurly is "undefined"
 	
 		$scope.currencyCode = MultiCurrencyPricing.currencyCode

							country:     $scope.data.country
							state:       $scope.data.state
							postal_code: $scope.data.postal_code
				$http.post("/user/subscription/create", postData)
					.success (data, status, headers)->
						sixpack.convert "in-editor-free-trial-plan", pricing.items.plan.code, (err)->
							window.location.href = "/user/subscription/thank-you"
					.error (data, status, headers)->
						$scope.processing = false

			.done()

		pricing.on "change", =>
			event_tracking.sendCountly "subscription-form", { plan : pricing.items.plan.code }

			$scope.planName = pricing.items.plan.name
			$scope.price = pricing.price
			$scope.trialLength = pricing.items.plan.trial?.length
