diff --git a/ee/app/controllers/registrations/groups_controller.rb b/ee/app/controllers/registrations/groups_controller.rb index 558b3995c49ba515d6464278bc8c7d26ab89814e..85f442b5af0119e0b1ee3d7465b9cfd1df70695a 100644 --- a/ee/app/controllers/registrations/groups_controller.rb +++ b/ee/app/controllers/registrations/groups_controller.rb @@ -86,6 +86,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