diff --git a/services/web/app/views/subscriptions/dashboard.jade b/services/web/app/views/subscriptions/dashboard.jade index 454852568b..0c3efa0096 100644 --- a/services/web/app/views/subscriptions/dashboard.jade +++ b/services/web/app/views/subscriptions/dashboard.jade @@ -58,7 +58,7 @@ block content p Your subscription has been canceled and will terminate on #{subscription.nextPaymentDueAt}. No further payments will be taken. form(action="/user/subscription/reactivate",method="post") input(type="hidden", name="_csrf", value=csrfToken) - input(type="submit",value="Reactivate your subscription").btn.btn-success + input(type="submit",value="Reactivate your subscription").btn.btn-success#cancelSubscription when "expired" p Your subscription has expired. a(href="/user/subscription/plans") Create New Subscription @@ -80,4 +80,11 @@ block content mixin printPlans(plans.individualAnnualPlans) +script(type="text/javascript") + $('#cancelSubscription').on("click", function() { + ga('send', 'event', 'subscription-funnel', 'cancelation') + }) + + + diff --git a/services/web/app/views/subscriptions/new.jade b/services/web/app/views/subscriptions/new.jade index 7fa798e6e9..0c798b654f 100644 --- a/services/web/app/views/subscriptions/new.jade +++ b/services/web/app/views/subscriptions/new.jade @@ -14,7 +14,13 @@ block content script(type="text/javascript") Recurly.config(!{recurlyConfig}) - Recurly.buildSubscriptionForm(!{subscriptionFormOptions}); + var recurlySubscriptionFormConfig = !{subscriptionFormOptions} + recurlySubscriptionFormConfig.successHandler = function(){ + ga('send', 'event', 'subscription-funnel', 'created') + } + + Recurly.buildSubscriptionForm(); + include ../general/small-footer