                 onLoad: () => @.loadingPayments = false
                 onSuccess: (plan) =>
                     @analytics.addEcStep("plan-changed", @.myPlan?.current_plan?.plan_id, @.plan?.plan_id)
-                    @analytics.addEcProduct(@.validPlan)
-                    @analytics.setEcAction("purchase", "Plan")
+                    @analytics.addEcPurchase(@.planId, @.validPlan.name, amount)
                     @._onSuccessBuyPlan(plan, amount, currency)
 
                 planId: @.planId,

            @.validPlan = project
            @analytics.addEcStep("select-plan", @.myPlan?.current_plan?.plan_id, @.validPlan)
            @analytics.addEcImpression(@.validPlan, "Plan detail", 1)
            @analytics.setEcAction("add", "Plan detail")
            if @.myPlan && @.validPlan.name == @.myPlan.current_plan.name
                if @.myPlan.interval == "month"
                    @.invalidInterval = "month"

        currency = @.validPlan.currency

        @analytics.addEcStep("confirm-plan", @.myPlan?.current_plan?.plan_id, @.planId)
        @analytics.setEcProduct(@.planId, @.validPlan.name, amount)

        if @.myPlan && @.myPlan.customer_id?
            plan = {
