diff --git a/ee/app/helpers/ee/users_helper.rb b/ee/app/helpers/ee/users_helper.rb index 7e1859a53751f7234770e72a7fe5a129e3df1bb7..763577bdfcfe0e2206c5d4b0c23e1d52d7ee1c2c 100644 --- a/ee/app/helpers/ee/users_helper.rb +++ b/ee/app/helpers/ee/users_helper.rb @@ -7,7 +7,7 @@ module EE end def trials_link_url - new_trial_registration_path + new_trial_registration_path(glm_source: 'gitlab.com', glm_content: 'top-right-dropdown') end def user_badges_in_admin_section(user) diff --git a/ee/app/views/groups/security/discover/show.html.haml b/ee/app/views/groups/security/discover/show.html.haml index 1b796059c9ecb225e01e91ffdadea195f79fc9e4..6387844bcbc4f0f4f4700a12e0b743d98d2cfa2d 100644 --- a/ee/app/views/groups/security/discover/show.html.haml +++ b/ee/app/views/groups/security/discover/show.html.haml @@ -3,4 +3,4 @@ - linkFeedback = 'https://gitlab.com/gitlab-org/growth/ui-ux/issues/25' - linkUpgrade = group_billings_path(@group.root_ancestor) -#js-security-discover-app{ data: { group: { id: @group.id, name: @group.name }, link: { main: new_trial_registration_path, secondary: linkUpgrade, feedback: linkFeedback } } } +#js-security-discover-app{ data: { group: { id: @group.id, name: @group.name }, link: { main: new_trial_registration_path(glm_source: 'gitlab.com', glm_content: 'discover-group-security'), secondary: linkUpgrade, feedback: linkFeedback } } } diff --git a/ee/app/views/projects/security/discover/show.html.haml b/ee/app/views/projects/security/discover/show.html.haml index 371265c2cf62009cef910ff01c77ee35223abbb7..f83d78164f4d3bf0abc58b10b42ef9ff589d6d20 100644 --- a/ee/app/views/projects/security/discover/show.html.haml +++ b/ee/app/views/projects/security/discover/show.html.haml @@ -3,4 +3,4 @@ - linkFeedback = 'https://gitlab.com/gitlab-org/growth/ui-ux/issues/25' - linkUpgrade = @project.personal? ? profile_billings_path(@project.group) : group_billings_path(@project.root_ancestor) -#js-security-discover-app{ data: { project: { id: @project.id, name: @project.name }, link: { main: new_trial_registration_path, secondary: linkUpgrade, feedback: linkFeedback } } } +#js-security-discover-app{ data: { project: { id: @project.id, name: @project.name }, link: { main: new_trial_registration_path(glm_source: 'gitlab.com', glm_content: 'discover-project-security'), secondary: linkUpgrade, feedback: linkFeedback } } } diff --git a/ee/app/views/shared/_gold_trial_callout_content.html.haml b/ee/app/views/shared/_gold_trial_callout_content.html.haml index 953beb522c3d1406befa7e1fc71f29edca064573..af98a9f1f5af02d58289792b9698158de2dcdfca 100644 --- a/ee/app/views/shared/_gold_trial_callout_content.html.haml +++ b/ee/app/views/shared/_gold_trial_callout_content.html.haml @@ -13,7 +13,7 @@ %p.mb-0 %span= _('Try all GitLab has to offer for 30 days.') %span.d-none.d-sm-inline= _('No credit card required.') - = link_to _('Start your trial'), new_trial_registration_path, class: "btn btn-primary mt-2 mt-sm-0 #{button_css_class}", target: '_blank' + = link_to _('Start your trial'), new_trial_registration_path(glm_source: 'gitlab.com', glm_content: 'gold-callout'), class: "btn btn-primary mt-2 mt-sm-0 #{button_css_class}", target: '_blank' - if is_dismissable %button.btn.btn-default.close.js-close{ type: 'button', diff --git a/ee/app/views/shared/billings/_billing_plan_header.html.haml b/ee/app/views/shared/billings/_billing_plan_header.html.haml index f9a62a420188873648578821caffd2132ad924f3..3881145a00d3460beec19cdcb1a30304f614e82c 100644 --- a/ee/app/views/shared/billings/_billing_plan_header.html.haml +++ b/ee/app/views/shared/billings/_billing_plan_header.html.haml @@ -29,4 +29,5 @@ = render 'shared/billings/trial_status', namespace: namespace - if namespace.eligible_for_trial? - %p= link_to 'Start your free trial', new_trial_registration_path, class: 'btn btn-primary' + - glm_content = namespace_for_user?(namespace) ? 'user-billing' : 'group-billing' + %p= link_to 'Start your free trial', new_trial_registration_path(glm_source: 'gitlab.com', glm_content: glm_content), class: 'btn btn-primary' diff --git a/ee/spec/features/trial_registrations/signin_spec.rb b/ee/spec/features/trial_registrations/signin_spec.rb index 7f65849935e717839dc1de0195b854cf1ef5de61..009bf9ff22777571ec34bd65527798eeacbb20ad 100644 --- a/ee/spec/features/trial_registrations/signin_spec.rb +++ b/ee/spec/features/trial_registrations/signin_spec.rb @@ -11,7 +11,7 @@ describe 'Trial Sign In' do end it 'logs the user in' do - visit(new_trial_registration_path) + visit(new_trial_registration_path(glm_source: 'any-source', glm_content: 'any-content')) within('div#login-pane') do fill_in 'user_login', with: user.email