diff --git a/ee/app/controllers/registrations/groups_controller.rb b/ee/app/controllers/registrations/groups_controller.rb index b780c38abdd583d73682f617a961a9ebc574a8c8..92dc16428cd86ef2801cf51cb63b1a91776727ac 100644 --- a/ee/app/controllers/registrations/groups_controller.rb +++ b/ee/app/controllers/registrations/groups_controller.rb @@ -88,6 +88,9 @@ def track_event(action) end def track_project_registration_submission(project) + experiment(:project_templates_during_registration, user: current_user).track(:assignment, + namespace: project.namespace) + experiment_project_templates_during_registration( project, :successfully_submitted_form, diff --git a/ee/spec/controllers/registrations/groups_controller_spec.rb b/ee/spec/controllers/registrations/groups_controller_spec.rb index dd88434c79fdf2d892159daad81ecbc8aa7ec3e7..94cb7368e018f08f224c8e5351bc0b82aee19a2f 100644 --- a/ee/spec/controllers/registrations/groups_controller_spec.rb +++ b/ee/spec/controllers/registrations/groups_controller_spec.rb @@ -187,6 +187,7 @@ it 'tracks submission event' do expect(experiment).to receive(:publish) + expect(experiment).to receive(:track).with(:assignment, namespace: an_instance_of(Group)) expect(experiment).to receive(:track).with(:successfully_submitted_form, label: 'free_registration') expect(experiment).not_to receive(:track).with( @@ -202,6 +203,7 @@ it 'tracks submission event' do expect(experiment).to receive(:publish) + expect(experiment).to receive(:track).with(:assignment, namespace: an_instance_of(Group)) expect(experiment).to receive(:track).with(:successfully_submitted_form, label: 'free_registration') expect(experiment).to receive(:track).with( @@ -220,6 +222,7 @@ it 'tracks submission event' do expect(experiment).to receive(:publish) + expect(experiment).to receive(:track).with(:assignment, namespace: an_instance_of(Group)) expect(experiment).to receive(:track).with(:successfully_submitted_form, label: 'trial_registration') post_create @@ -259,6 +262,7 @@ it 'does not track submission event' do expect(experiment).to receive(:publish) + expect(experiment).not_to receive(:track).with(:assignment, namespace: an_instance_of(Group)) expect(experiment).not_to receive(:track).with(:successfully_submitted_form, label: 'free_registration') post_create