Commit 3cb25f06 authored by Alper Akgun's avatar Alper Akgun

Add glm_ query string parameters to trial URLs

Adds glm_source and glm_content query string parameters to in-app
trial urls for gitlab.com
parent c38bcf99
......@@ -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)
......
......@@ -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 } } }
......@@ -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 } } }
......@@ -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',
......
......@@ -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'
......@@ -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
......
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