Commit 3ce528ae authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '348341-experiment-cleanup-trial_registration_with_reassurance-experiment' into 'master'

Promote the trial_registration_with_reassurance experiment

See merge request gitlab-org/gitlab!78920
parents 966775e1 0c2fa2c1
...@@ -20,8 +20,6 @@ module EE ...@@ -20,8 +20,6 @@ module EE
before_action only: :show do before_action only: :show do
publish_combined_registration_experiment publish_combined_registration_experiment
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:render, label: 'registrations:welcome:show', user: current_user)
end end
before_action only: [:trial_getting_started] do before_action only: [:trial_getting_started] do
......
...@@ -12,8 +12,6 @@ module Registrations ...@@ -12,8 +12,6 @@ module Registrations
feature_category :onboarding feature_category :onboarding
def new def new
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:render, label: 'registrations:groups:new', user: current_user)
@group = Group.new(visibility_level: helpers.default_group_visibility) @group = Group.new(visibility_level: helpers.default_group_visibility)
experiment(:combined_registration, user: current_user).track(:view_new_group_action) experiment(:combined_registration, user: current_user).track(:view_new_group_action)
push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops) push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops)
...@@ -43,13 +41,6 @@ module Registrations ...@@ -43,13 +41,6 @@ module Registrations
def apply_trial_for_trial_onboarding_flow def apply_trial_for_trial_onboarding_flow
if apply_trial if apply_trial
experiment(:trial_registration_with_reassurance, actor: current_user).track(
:apply_trial,
label: 'registrations:groups:create',
namespace: @group,
user: current_user
)
redirect_to new_users_sign_up_project_path(namespace_id: @group.id, trial: helpers.in_trial_during_signup_flow?, trial_onboarding_flow: true) redirect_to new_users_sign_up_project_path(namespace_id: @group.id, trial: helpers.in_trial_during_signup_flow?, trial_onboarding_flow: true)
else else
render action: :new render action: :new
......
...@@ -22,8 +22,6 @@ module Registrations ...@@ -22,8 +22,6 @@ module Registrations
@project = Project.new(namespace: @group) @project = Project.new(namespace: @group)
combined_registration_experiment.track(:view_new_group_action) combined_registration_experiment.track(:view_new_group_action)
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:render, label: 'registrations:groups:new', user: current_user)
end end
def create def create
......
...@@ -21,18 +21,6 @@ class TrialRegistrationsController < RegistrationsController ...@@ -21,18 +21,6 @@ class TrialRegistrationsController < RegistrationsController
private private
# This is called from within the RegistrationsController#create action and is
# given the newly created user.
def after_request_hook(user)
super
return unless user.persisted?
e = experiment(:trial_registration_with_reassurance, actor: user)
e.track(:create_user, label: 'trial_registrations:create', user: user)
e.publish_to_database
end
def set_redirect_url def set_redirect_url
target_url = new_trial_url(params: request.query_parameters) target_url = new_trial_url(params: request.query_parameters)
......
...@@ -21,13 +21,9 @@ class TrialsController < ApplicationController ...@@ -21,13 +21,9 @@ class TrialsController < ApplicationController
feature_category :purchase feature_category :purchase
def new def new
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:render, label: 'trials:new', user: current_user)
end end
def select def select
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:render, label: 'trials:select', user: current_user)
end end
def create_lead def create_lead
...@@ -227,9 +223,6 @@ class TrialsController < ApplicationController ...@@ -227,9 +223,6 @@ class TrialsController < ApplicationController
@result = GitlabSubscriptions::ApplyTrialService.new.execute(apply_trial_params) @result = GitlabSubscriptions::ApplyTrialService.new.execute(apply_trial_params)
if @result&.dig(:success) if @result&.dig(:success)
experiment(:trial_registration_with_reassurance, actor: current_user)
.track(:apply_trial, label: 'trials:apply', namespace: @namespace, user: current_user)
experiment(:combined_registration, user: current_user).track(:create_trial) experiment(:combined_registration, user: current_user).track(:create_trial)
if discover_group_security_flow? if discover_group_security_flow?
......
...@@ -5,39 +5,25 @@ ...@@ -5,39 +5,25 @@
= render "layouts/one_trust" = render "layouts/one_trust"
= render "layouts/google_tag_manager_body" = render "layouts/google_tag_manager_body"
- registration_form_content = capture do
.signup-page
= render 'devise/shared/signup_box',
url: trial_registrations_path,
button_text: _('Continue'),
show_omniauth_providers: social_signin_enabled?,
omniauth_providers_placement: :top
= render 'devise/shared/sign_in_link'
%p.gl-text-center
= s_('InProductMarketing|Want to host GitLab on your servers?')
= link_to s_('InProductMarketing|Start a Self-Managed trial'), 'https://about.gitlab.com/free-trial/#selfmanaged/', data: { track_action: 'click_link', track_label: 'start_self-managed_trial' }
.row .row
- experiment(:trial_registration_with_reassurance, actor: current_user) do |e| .col-lg-6.gl-display-none.gl-lg-display-flex.gl-flex-direction-column.gl-align-items-center.gl-justify-content-start
- if e.should_track? .gl-w-28
%span{ data: { track_action: :render, track_experiment: :trial_registration_with_reassurance } } = render 'reassurances'
.col-md-6.offset-md-3.offset-lg-0
%h2.gl-lg-display-none.gl-mb-3.gl-mt-0.gl-text-gray-800
= s_('InProductMarketing|Free 30-day trial')
%p.gl-lg-display-none.gl-font-lg.gl-text-gray-800
= s_('InProductMarketing|No credit card required.')
- e.use do .signup-page
.col-md-6.offset-md-3 = render 'devise/shared/signup_box',
%h2.gl-text-center.gl-pb-5.gl-my-0 url: trial_registrations_path,
= _('Start a Free Ultimate Trial') button_text: _('Continue'),
= registration_form_content show_omniauth_providers: social_signin_enabled?,
omniauth_providers_placement: :top
- e.try do = render 'devise/shared/sign_in_link'
.col-lg-6.gl-display-none.gl-lg-display-flex.gl-flex-direction-column.gl-align-items-center.gl-justify-content-start
.gl-w-28
= render 'reassurances'
.col-md-6.offset-md-3.offset-lg-0
%h2.gl-lg-display-none.gl-mb-3.gl-mt-0.gl-text-gray-800
= s_('InProductMarketing|Free 30-day trial')
%p.gl-lg-display-none.gl-font-lg.gl-text-gray-800
= s_('InProductMarketing|No credit card required.')
= registration_form_content %p.gl-text-center
= s_('InProductMarketing|Want to host GitLab on your servers?')
= link_to s_('InProductMarketing|Start a Self-Managed trial'), 'https://about.gitlab.com/free-trial/#selfmanaged/', data: { track_action: 'click_link', track_label: 'start_self-managed_trial' }
---
name: trial_registration_with_reassurance
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61639
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/281028
milestone: '14.1'
type: experiment
group: group::conversion
default_enabled: false
...@@ -92,19 +92,6 @@ RSpec.describe Registrations::GroupsController do ...@@ -92,19 +92,6 @@ RSpec.describe Registrations::GroupsController do
context 'with redirection to projects page' do context 'with redirection to projects page' do
it { is_expected.to redirect_to(new_users_sign_up_project_path(namespace_id: group.id, trial: false, trial_onboarding_flow: true)) } it { is_expected.to redirect_to(new_users_sign_up_project_path(namespace_id: group.id, trial: false, trial_onboarding_flow: true)) }
end end
it 'tracks an event for the trial_registration_with_reassurance experiment', :experiment do
stub_experiments(trial_registration_with_reassurance: :control)
expect(experiment(:trial_registration_with_reassurance)).to track(
:apply_trial,
user: user,
namespace: group,
label: 'registrations:groups:create'
).with_context(actor: user).on_next_instance
post_create
end
end end
context 'when failing to apply trial' do context 'when failing to apply trial' do
......
...@@ -80,22 +80,6 @@ RSpec.describe TrialRegistrationsController do ...@@ -80,22 +80,6 @@ RSpec.describe TrialRegistrationsController do
expect(User.last).not_to be_confirmed expect(User.last).not_to be_confirmed
end end
context 'when the trial_registration_with_reassurance experiment is active', :experiment do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it 'tracks a "create_user" event & records the actor to the database', :aggregate_failures do
expect(experiment(:trial_registration_with_reassurance)).to track(
:create_user,
user: an_instance_of(User),
label: 'trial_registrations:create'
).with_context(actor: an_instance_of(User)).on_next_instance
expect { post_create }.to change { ExperimentSubject.count }
end
end
context 'derivation of name' do context 'derivation of name' do
it 'sets name from first and last name' do it 'sets name from first and last name' do
post_create post_create
......
...@@ -47,22 +47,6 @@ RSpec.describe TrialsController, :saas do ...@@ -47,22 +47,6 @@ RSpec.describe TrialsController, :saas do
response response
end end
context 'when the trial_registration_with_reassurance experiment is active', :experiment do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it 'tracks a "render" event' do
expect(experiment(:trial_registration_with_reassurance)).to track(
:render,
user: user,
label: 'trials:new'
).with_context(actor: user).on_next_instance
get_new
end
end
it 'calls record_experiment_user for the experiments' do it 'calls record_experiment_user for the experiments' do
get_new get_new
end end
...@@ -323,22 +307,6 @@ RSpec.describe TrialsController, :saas do ...@@ -323,22 +307,6 @@ RSpec.describe TrialsController, :saas do
it_behaves_like 'an authenticated endpoint' it_behaves_like 'an authenticated endpoint'
it_behaves_like 'a dot-com only feature' it_behaves_like 'a dot-com only feature'
context 'when the trial_registration_with_reassurance experiment is active', :experiment do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it 'tracks a "render" event' do
expect(experiment(:trial_registration_with_reassurance)).to track(
:render,
user: user,
label: 'trials:select'
).with_context(actor: user).on_next_instance
get_select
end
end
end end
describe '#apply' do describe '#apply' do
...@@ -369,23 +337,6 @@ RSpec.describe TrialsController, :saas do ...@@ -369,23 +337,6 @@ RSpec.describe TrialsController, :saas do
it { is_expected.to redirect_to("/#{namespace.path}?trial=true") } it { is_expected.to redirect_to("/#{namespace.path}?trial=true") }
context 'when the trial_registration_with_reassurance experiment is active', :experiment do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it 'tracks an "apply_trial" event' do
expect(experiment(:trial_registration_with_reassurance)).to track(
:apply_trial,
user: user,
namespace: namespace,
label: 'trials:apply'
).with_context(actor: user).on_next_instance
post_apply
end
end
it 'calls tracking event for combined_registration experiment', :experiment do it 'calls tracking event for combined_registration experiment', :experiment do
expect(experiment(:combined_registration)).to track(:create_trial).on_next_instance expect(experiment(:combined_registration)).to track(:create_trial).on_next_instance
......
...@@ -50,22 +50,6 @@ RSpec.shared_examples "Registrations::GroupsController GET #new" do ...@@ -50,22 +50,6 @@ RSpec.shared_examples "Registrations::GroupsController GET #new" do
expect(assigns(:group).visibility_level).to eq(Gitlab::CurrentSettings.default_group_visibility) expect(assigns(:group).visibility_level).to eq(Gitlab::CurrentSettings.default_group_visibility)
end end
context 'when the trial_registration_with_reassurance experiment is active', :experiment do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it 'tracks a "render" event' do
expect(experiment(:trial_registration_with_reassurance)).to track(
:render,
user: user,
label: 'registrations:groups:new'
).with_context(actor: user).on_next_instance
get :new
end
end
context 'user without the ability to create a group' do context 'user without the ability to create a group' do
let(:user) { create(:user, can_create_group: false) } let(:user) { create(:user, can_create_group: false) }
......
...@@ -12,49 +12,10 @@ RSpec.describe 'trial_registrations/new.html.haml' do ...@@ -12,49 +12,10 @@ RSpec.describe 'trial_registrations/new.html.haml' do
subject { render && rendered } subject { render && rendered }
describe 'trial_registration_with_reassurance experiment', :experiment do it { is_expected.not_to have_content(_('Start a Free Ultimate Trial')) }
context 'when the experiment is enabled' do it { is_expected.to have_content(s_('InProductMarketing|Free 30-day trial')) }
let(:variant) { :control } it { is_expected.to have_content(s_('InProductMarketing|No credit card required.')) }
it { is_expected.to have_selector('img[alt$=" logo"]') }
before do
stub_experiments(trial_registration_with_reassurance: variant)
end
context 'when in the control' do
it { is_expected.to have_content(_('Start a Free Ultimate Trial')) }
it { is_expected.not_to have_content(s_('InProductMarketing|Free 30-day trial')) }
it { is_expected.not_to have_content(s_('InProductMarketing|No credit card required.')) }
it { is_expected.not_to have_selector('img[alt$=" logo"]') }
end
context 'when in the candidate' do
let(:variant) { :candidate }
it { is_expected.not_to have_content(_('Start a Free Ultimate Trial')) }
it { is_expected.to have_content(s_('InProductMarketing|Free 30-day trial')) }
it { is_expected.to have_content(s_('InProductMarketing|No credit card required.')) }
it { is_expected.to have_selector('img[alt$=" logo"]') }
end
end
describe 'tracking page-render using a frontend event' do
context 'when the experiment should be tracked, like when it is enabled' do
before do
stub_experiments(trial_registration_with_reassurance: :control)
end
it { is_expected.to have_selector('span[data-track-action="render"]') }
end
context 'when the experiment should not be tracked, like when it is disabled' do
before do
stub_feature_flags(trial_registration_with_reassurance: false)
end
it { is_expected.not_to have_selector('span[data-track-action="render"]') }
end
end
end
it { is_expected.to have_content(s_('InProductMarketing|Want to host GitLab on your servers?')) } it { is_expected.to have_content(s_('InProductMarketing|Want to host GitLab on your servers?')) }
it { is_expected.to have_link(s_('InProductMarketing|Start a Self-Managed trial'), href: 'https://about.gitlab.com/free-trial/#selfmanaged/') } it { is_expected.to have_link(s_('InProductMarketing|Start a Self-Managed trial'), href: 'https://about.gitlab.com/free-trial/#selfmanaged/') }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment