summaryrefslogtreecommitdiff
path: root/app/controllers/registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index c1765d367d1..057c451ace2 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -6,6 +6,7 @@ class RegistrationsController < Devise::RegistrationsController
include RecaptchaHelper
include InvisibleCaptchaOnSignup
include OneTrustCSP
+ include BizibleCSP
layout 'devise'
@@ -35,6 +36,7 @@ class RegistrationsController < Devise::RegistrationsController
persist_accepted_terms_if_required(new_user)
set_role_required(new_user)
+ track_experiment_event(new_user)
if pending_approval?
NotificationService.new.new_instance_access_request(new_user)
@@ -223,6 +225,14 @@ class RegistrationsController < Devise::RegistrationsController
def context_user
current_user
end
+
+ def track_experiment_event(new_user)
+ # Track signed up event to relate it with click "Sign up" button events from
+ # the experimental logged out header with marketing links. This allows us to
+ # have a funnel of visitors clicking on the header and those visitors
+ # signing up and becoming users
+ experiment(:logged_out_marketing_header, actor: new_user).track(:signed_up) if new_user.persisted?
+ end
end
RegistrationsController.prepend_mod_with('RegistrationsController')