diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 18:12:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 18:12:32 +0300 |
commit | 7d8d5a3dab415672a41ab29c3bfa9581f275dc50 (patch) | |
tree | 7b9249d8ca8c12ad899b4e6d968193d58e63f458 /app/controllers/registrations_controller.rb | |
parent | 868c8c35fbddd439f4df76a5954e2a1caa2af3cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r-- | app/controllers/registrations_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index c1765d367d1..7b688c0ccc2 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -35,6 +35,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 +224,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') |