diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/registrations_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 6d9efb433c2..dfa67f042e2 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -26,12 +26,12 @@ class RegistrationsController < Devise::RegistrationsController end def create - track_experiment_event(:terms_opt_in, 'end') accept_pending_invitations super do |new_user| persist_accepted_terms_if_required(new_user) set_role_required(new_user) + track_terms_experiment(new_user) yield new_user if block_given? end @@ -201,6 +201,13 @@ class RegistrationsController < Devise::RegistrationsController true end + def track_terms_experiment(new_user) + return unless new_user.persisted? + + track_experiment_event(:terms_opt_in, 'end') + record_experiment_user(:terms_opt_in) + end + def load_recaptcha Gitlab::Recaptcha.load_configurations! end |