From b2da63f5325d9fcc9edf58469966e85a79b2b4f0 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Tue, 12 Jul 2016 16:41:22 +0100 Subject: [PATCH] Track trials starts, with source. --- .../web/public/coffee/ide/pdf/controllers/PdfController.coffee | 1 + services/web/public/coffee/main/account-upgrade.coffee | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index b856e6e38d..a29f7ed7b7 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -348,6 +348,7 @@ define [ $scope.startFreeTrial = (source) -> ga?('send', 'event', 'subscription-funnel', 'compile-timeout', source) + event_tracking.sendCountly 'start-trial', { source } window.open("/user/subscription/new?planCode=student_free_trial_7_days") $scope.startedFreeTrial = true diff --git a/services/web/public/coffee/main/account-upgrade.coffee b/services/web/public/coffee/main/account-upgrade.coffee index b212f65fc1..3bf2e95c4d 100644 --- a/services/web/public/coffee/main/account-upgrade.coffee +++ b/services/web/public/coffee/main/account-upgrade.coffee @@ -1,11 +1,12 @@ define [ "base" ], (App) -> - App.controller "FreeTrialModalController", ($scope, abTestManager, sixpack)-> + App.controller "FreeTrialModalController", ($scope, abTestManager, sixpack, event_tracking)-> $scope.buttonClass = "btn-primary" $scope.startFreeTrial = (source, couponCode) -> + event_tracking.sendCountly 'start-trial', { source } w = window.open() sixpack.convert "track-changes-discount", -> sixpack.participate 'in-editor-free-trial-plan', ['student', 'collaborator'], (planName, rawResponse)->