TRack free trial clicks and redirect to subscription page

This commit is contained in:
James Allen 2014-07-17 12:57:17 +01:00
parent 05b078ec92
commit ee7013c1ee
4 changed files with 11 additions and 10 deletions

View file

@ -69,8 +69,8 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
div.text-center(ng-hide="canAddCollaborators")
p You need to upgrade your account to add more collaborators.
p
a.btn.btn-info(href, ng-click="startFreeTrial()") Start Free Trial
p.small(ng-show="state.startedFreeTrial")
a.btn.btn-info(href, ng-click="startFreeTrial('projectMembers')") Start Free Trial
p.small(ng-show="startedFreeTrial")
| Please refresh this page after starting your free trial.
.modal-footer

View file

@ -4,9 +4,8 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
p You need to upgrade your account to use the History feature.
p
a.btn.btn-info(
href="/user/subscription/plans"
target="_blank"
ng-click="startedFreeTrial = true"
href
ng-click="startFreeTrial('track-changes')"
) Start Free Trial
p.small(ng-show="startedFreeTrial") Please refresh the page after starting your free trial.
.message(ng-show="project.owner._id != user.id")

View file

@ -54,6 +54,13 @@ define [
$scope.chat = {}
$scope.startFreeTrial =
$scope.startFreeTrial = (source) ->
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
window.open("/user/subscription/new?planCode=student_free_trial")
$scope.startedFreeTrial = true
window._ide = ide
ide.project_id = $scope.project_id = window.project_id

View file

@ -51,11 +51,6 @@ define [
$scope.state.inflight = false
$scope.state.error = "Sorry, something went wrong :("
$scope.startFreeTrial = () ->
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "projectMembers")
window.open("/user/subscription/plans")
$scope.state.startedFreeTrial = true
$scope.openMakePublicModal = () ->
$modal.open {
templateUrl: "makePublicModalTemplate"