Commit b6b69f91 authored by David Kim's avatar David Kim

Merge branch 'add-admin-track-to-onboarding-emails' into 'master'

Add admin_verify track to in-product marketing emails

See merge request gitlab-org/gitlab!67147
parents e8e7fb3c 67b920db
......@@ -42,6 +42,8 @@ class Groups::EmailCampaignsController < Groups::ApplicationController
'https://about.gitlab.com/free-trial/'
when :team, :team_short
group_group_members_url(group)
when :admin_verify
project_settings_ci_cd_path(group.projects.first, ci_runner_templates: true, anchor: 'js-runners-settings')
end
end
......
......@@ -21,7 +21,8 @@ module Users
team: 3,
experience: 4,
team_short: 5,
trial_short: 6
trial_short: 6,
admin_verify: 7
}, _suffix: true
scope :without_track_and_series, -> (track, series) do
......
......@@ -18,8 +18,13 @@ module Namespaces
completed_actions: [:git_write],
incomplete_actions: [:trial_started]
},
admin_verify: {
interval_days: [3],
completed_actions: [:git_write],
incomplete_actions: [:pipeline_created]
},
verify: {
interval_days: [3, 7, 12],
interval_days: [4, 8, 13],
completed_actions: [:git_write],
incomplete_actions: [:pipeline_created]
},
......@@ -114,6 +119,8 @@ module Namespaces
user.can?(:start_trial, group)
when :team, :team_short
user.can?(:admin_group_member, group)
when :admin_verify
user.can?(:admin_group, group)
when :experience
true
end
......
---
key_path: counts.in_product_marketing_email_admin_verify_0_cta_clicked
name: "count_clicks_on_the_first_email_of_the_admin_verify_track_for_in_product_marketing_emails"
description: Total clicks on the admin_verify track's first email
product_section: growth
product_stage: growth
product_group: group::activation
product_category: onboarding
value_type: number
status: implemented
milestone: "14.2"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67147
time_frame: all
data_source: database
data_category: Optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
---
key_path: counts.in_product_marketing_email_admin_verify_0_sent
name: "count_sent_first_email_of_the_admin_verify_track_for_in_product_marketing_emails"
description: Total sent emails of the admin_verify track's first email
product_section: growth
product_stage: growth
product_group: group::activation
product_category: onboarding
value_type: number
status: implemented
milestone: "14.2"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67147
time_frame: all
data_source: database
data_category: Optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
......@@ -2470,6 +2470,34 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
### `counts.in_product_marketing_email_admin_verify_0_cta_clicked`
Total clicks on the admin_verify track's first email
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210729140021_in_product_marketing_email_admin_verify_0_cta_clicked.yml)
Group: `group::activation`
Data Category: `Optional`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `counts.in_product_marketing_email_admin_verify_0_sent`
Total sent emails of the admin_verify track's first email
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210729140423_in_product_marketing_email_admin_verify_0_sent.yml)
Group: `group::activation`
Data Category: `Optional`
Status: `implemented`
Tiers: `free`, `premium`, `ultimate`
### `counts.in_product_marketing_email_create_0_cta_clicked`
Total clicks on the create track's first email
......
# frozen_string_literal: true
module Gitlab
module Email
module Message
module InProductMarketing
class AdminVerify < Base
def subject_line
s_('InProductMarketing|Create a custom CI runner with just a few clicks')
end
def tagline
nil
end
def title
s_('InProductMarketing|Spin up an autoscaling runner in GitLab')
end
def subtitle
s_('InProductMarketing|Use our AWS cloudformation template to spin up your runners in just a few clicks!')
end
def body_line1
''
end
def body_line2
''
end
def cta_text
s_('InProductMarketing|Create a custom runner')
end
def progress
super(track_name: 'Admin')
end
end
end
end
end
end
......@@ -16947,6 +16947,12 @@ msgstr ""
msgid "InProductMarketing|Code owners and required merge approvals are part of the paid tiers of GitLab. You can start a free 30-day trial of GitLab Ultimate and enable these features in less than 5 minutes with no credit card required."
msgstr ""
msgid "InProductMarketing|Create a custom CI runner with just a few clicks"
msgstr ""
msgid "InProductMarketing|Create a custom runner"
msgstr ""
msgid "InProductMarketing|Create a project in GitLab in 5 minutes"
msgstr ""
......@@ -17145,6 +17151,9 @@ msgstr ""
msgid "InProductMarketing|Sometimes you're not ready to make a full transition to a new tool. If you're not ready to fully commit, %{mirroring_link} gives you a safe way to try out GitLab in parallel with your current tool."
msgstr ""
msgid "InProductMarketing|Spin up an autoscaling runner in GitLab"
msgstr ""
msgid "InProductMarketing|Start a GitLab Ultimate trial today in less than one minute, no credit card required."
msgstr ""
......@@ -17238,6 +17247,9 @@ msgstr ""
msgid "InProductMarketing|Use GitLab CI/CD"
msgstr ""
msgid "InProductMarketing|Use our AWS cloudformation template to spin up your runners in just a few clicks!"
msgstr ""
msgid "InProductMarketing|Used by more than 100,000 organizations from around the globe:"
msgstr ""
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Email::Message::InProductMarketing::AdminVerify do
let_it_be(:group) { build(:group) }
let_it_be(:user) { build(:user) }
let(:series) { 0 }
subject(:message) { described_class.new(group: group, user: user, series: series)}
describe 'public methods' do
it 'returns value for series', :aggregate_failures do
expect(message.subject_line).to eq 'Create a custom CI runner with just a few clicks'
expect(message.tagline).to be_nil
expect(message.title).to eq 'Spin up an autoscaling runner in GitLab'
expect(message.subtitle).to eq 'Use our AWS cloudformation template to spin up your runners in just a few clicks!'
expect(message.body_line1).to be_empty
expect(message.body_line2).to be_empty
expect(message.cta_text).to eq 'Create a custom runner'
expect(message.logo_path).to eq 'mailers/in_product_marketing/admin_verify-0.png'
end
describe '#progress' do
subject { message.progress }
before do
allow(Gitlab).to receive(:com?).and_return(is_gitlab_com)
end
context 'on gitlab.com' do
let(:is_gitlab_com) { true }
it { is_expected.to eq('This is email 1 of 1 in the Admin series.') }
end
context 'not on gitlab.com' do
let(:is_gitlab_com) { false }
it { is_expected.to include('This is email 1 of 1 in the Admin series', Gitlab::Routing.url_helpers.profile_notifications_url) }
end
end
end
end
......@@ -1363,6 +1363,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
"in_product_marketing_email_team_short_0_cta_clicked" => -1,
"in_product_marketing_email_trial_short_0_sent" => -1,
"in_product_marketing_email_trial_short_0_cta_clicked" => -1,
"in_product_marketing_email_admin_verify_0_sent" => -1,
"in_product_marketing_email_admin_verify_0_cta_clicked" => -1,
"in_product_marketing_email_verify_0_sent" => -1,
"in_product_marketing_email_verify_0_cta_clicked" => -1,
"in_product_marketing_email_verify_1_sent" => -1,
......@@ -1406,6 +1408,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
"in_product_marketing_email_team_short_0_cta_clicked" => 0,
"in_product_marketing_email_trial_short_0_sent" => 0,
"in_product_marketing_email_trial_short_0_cta_clicked" => 0,
"in_product_marketing_email_admin_verify_0_sent" => 0,
"in_product_marketing_email_admin_verify_0_cta_clicked" => 0,
"in_product_marketing_email_verify_0_sent" => 1,
"in_product_marketing_email_verify_0_cta_clicked" => 0,
"in_product_marketing_email_verify_1_sent" => 0,
......
......@@ -39,21 +39,22 @@ RSpec.describe Namespaces::InProductMarketingEmailsService, '#execute' do
using RSpec::Parameterized::TableSyntax
where(:track, :interval, :actions_completed) do
:create | 1 | { created_at: frozen_time - 2.days }
:create | 5 | { created_at: frozen_time - 6.days }
:create | 10 | { created_at: frozen_time - 11.days }
:team_short | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days }
:trial_short | 2 | { created_at: frozen_time - 3.days, git_write_at: frozen_time - 3.days }
:verify | 3 | { created_at: frozen_time - 4.days, git_write_at: frozen_time - 4.days }
:verify | 7 | { created_at: frozen_time - 8.days, git_write_at: frozen_time - 8.days }
:verify | 12 | { created_at: frozen_time - 13.days, git_write_at: frozen_time - 13.days }
:trial | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days, pipeline_created_at: frozen_time - 2.days }
:trial | 5 | { created_at: frozen_time - 6.days, git_write_at: frozen_time - 6.days, pipeline_created_at: frozen_time - 6.days }
:trial | 10 | { created_at: frozen_time - 11.days, git_write_at: frozen_time - 11.days, pipeline_created_at: frozen_time - 11.days }
:team | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days, pipeline_created_at: frozen_time - 2.days, trial_started_at: frozen_time - 2.days }
:team | 5 | { created_at: frozen_time - 6.days, git_write_at: frozen_time - 6.days, pipeline_created_at: frozen_time - 6.days, trial_started_at: frozen_time - 6.days }
:team | 10 | { created_at: frozen_time - 11.days, git_write_at: frozen_time - 11.days, pipeline_created_at: frozen_time - 11.days, trial_started_at: frozen_time - 11.days }
:experience | 30 | { created_at: frozen_time - 31.days, git_write_at: frozen_time - 31.days }
:create | 1 | { created_at: frozen_time - 2.days }
:create | 5 | { created_at: frozen_time - 6.days }
:create | 10 | { created_at: frozen_time - 11.days }
:team_short | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days }
:trial_short | 2 | { created_at: frozen_time - 3.days, git_write_at: frozen_time - 3.days }
:admin_verify | 3 | { created_at: frozen_time - 4.days, git_write_at: frozen_time - 4.days }
:verify | 4 | { created_at: frozen_time - 5.days, git_write_at: frozen_time - 5.days }
:verify | 8 | { created_at: frozen_time - 9.days, git_write_at: frozen_time - 9.days }
:verify | 13 | { created_at: frozen_time - 14.days, git_write_at: frozen_time - 14.days }
:trial | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days, pipeline_created_at: frozen_time - 2.days }
:trial | 5 | { created_at: frozen_time - 6.days, git_write_at: frozen_time - 6.days, pipeline_created_at: frozen_time - 6.days }
:trial | 10 | { created_at: frozen_time - 11.days, git_write_at: frozen_time - 11.days, pipeline_created_at: frozen_time - 11.days }
:team | 1 | { created_at: frozen_time - 2.days, git_write_at: frozen_time - 2.days, pipeline_created_at: frozen_time - 2.days, trial_started_at: frozen_time - 2.days }
:team | 5 | { created_at: frozen_time - 6.days, git_write_at: frozen_time - 6.days, pipeline_created_at: frozen_time - 6.days, trial_started_at: frozen_time - 6.days }
:team | 10 | { created_at: frozen_time - 11.days, git_write_at: frozen_time - 11.days, pipeline_created_at: frozen_time - 11.days, trial_started_at: frozen_time - 11.days }
:experience | 30 | { created_at: frozen_time - 31.days, git_write_at: frozen_time - 31.days }
end
with_them do
......
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