Commit b7701234 authored by Nicolas Dular's avatar Nicolas Dular Committed by Gabriel Mazetto

Change unsubscribe language for email campaign

parent bb89a15b
......@@ -193,8 +193,12 @@ module InProductMarketingHelper
end
end
def in_product_marketing_progress(track, series)
def in_product_marketing_progress(track, series, format: nil)
if Gitlab.com?
s_('InProductMarketing|This is email %{series} of 3 in the %{track} series.') % { series: series + 1, track: track.to_s.humanize }
else
s_('InProductMarketing|This is email %{series} of 3 in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}.') % { series: series + 1, track: track.to_s.humanize, unsubscribe_link: unsubscribe_link(format) }
end
end
def footer_links(format: nil)
......@@ -220,11 +224,9 @@ module InProductMarketingHelper
s_('InProductMarketing|%{strong_start}GitLab Inc.%{strong_end} 268 Bush Street, #350, San Francisco, CA 94104, USA').html_safe % strong_options(format)
end
def unsubscribe(format: nil)
parts = [
s_('InProductMarketing|If you no longer wish to receive marketing emails from us,'),
s_('InProductMarketing|you may %{unsubscribe_link} at any time.') % { unsubscribe_link: unsubscribe_link(format) }
]
def unsubscribe(track, series, format: nil)
parts = Gitlab.com? ? unsubscribe_com(format) : unsubscribe_self_managed(track, series, format)
case format
when :html
parts.join(' ')
......@@ -235,6 +237,20 @@ module InProductMarketingHelper
private
def unsubscribe_com(format)
[
s_('InProductMarketing|If you no longer wish to receive marketing emails from us,'),
s_('InProductMarketing|you may %{unsubscribe_link} at any time.') % { unsubscribe_link: unsubscribe_link(format) }
]
end
def unsubscribe_self_managed(track, series, format)
[
s_('InProductMarketing|To opt out of these onboarding emails, %{unsubscribe_link}.') % { unsubscribe_link: unsubscribe_link(format) },
s_("InProductMarketing|If you don't want to receive marketing emails directly from GitLab, %{marketing_preference_link}.") % { marketing_preference_link: marketing_preference_link(track, series, format) }
]
end
def in_product_marketing_cta_text(track, series)
{
create: [
......@@ -314,9 +330,23 @@ module InProductMarketingHelper
def unsubscribe_link(format)
unsubscribe_url = Gitlab.com? ? '%tag_unsubscribe_url%' : profile_notifications_url
link(s_('InProductMarketing|unsubscribe'), unsubscribe_url, format)
end
def marketing_preference_link(track, series, format)
params = {
utm_source: 'SM',
utm_medium: 'email',
utm_campaign: 'onboarding',
utm_term: "#{track}_#{series}"
}
preference_link = "https://about.gitlab.com/company/preference-center/?#{params.to_query}"
link(s_('InProductMarketing|update your preferences'), preference_link, format)
end
def link(text, link, format)
case format
when :html
......
......@@ -166,6 +166,10 @@
= about_link('mailers/in_product_marketing', 'gitlab-logo-gray-rgb.png', 200)
%tr
%td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" }
%tr{ style: "background-color: #ffffff;" }
%td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" }
%p
= in_product_marketing_progress(@track, @series, format: :html).html_safe
%tr
%td{ bgcolor: "#ffffff", height: "auto", style: "max-width: 600px; width: 100%; text-align: center; height: 200px; padding: 25px 15px; mso-line-height-rule: exactly; min-height: 40px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;", valign: "middle", width: "100%" }
= in_product_marketing_logo(@track, @series)
......@@ -183,10 +187,6 @@
%tr
%td{ align: "center", style: "padding: 10px 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" }
.cta_link= cta_link(@track, @series, @group, format: :html)
%tr{ style: "background-color: #ffffff;" }
%td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" }
%p
= in_product_marketing_progress(@track, @series)
%tr{ style: "background-color: #ffffff;" }
%td{ align: "center", style: "padding:75px 20px 25px;" }
= about_link('', 'gitlab_logo.png', 80)
......@@ -202,4 +202,4 @@
%tr{ style: "background-color: #ffffff;" }
%td{ align: "left", style: "padding:20px 30px 20px 30px;" }
%span.footernav{ style: "color: #6e49cb; font-size: 14px; line-height: 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#424242;" }
= unsubscribe(format: :html).html_safe
= unsubscribe(@track, @series, format: :html).html_safe
......@@ -20,4 +20,4 @@
<%= address %>
<%= unsubscribe %>
<%= unsubscribe(@track, @series) %>
---
title: Change unsubscribe language for email campaign on self managed
merge_request: 59121
author:
type: changed
......@@ -16499,6 +16499,9 @@ msgstr ""
msgid "InProductMarketing|How to build and test faster"
msgstr ""
msgid "InProductMarketing|If you don't want to receive marketing emails directly from GitLab, %{marketing_preference_link}."
msgstr ""
msgid "InProductMarketing|If you no longer wish to receive marketing emails from us,"
msgstr ""
......@@ -16607,12 +16610,18 @@ msgstr ""
msgid "InProductMarketing|This is email %{series} of 3 in the %{track} series."
msgstr ""
msgid "InProductMarketing|This is email %{series} of 3 in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}."
msgstr ""
msgid "InProductMarketing|Ticketmaster decreased their CI build time by 15X"
msgstr ""
msgid "InProductMarketing|Tired of wrestling with disparate tool chains, information silos and inefficient processes? GitLab's CI/CD is built on a DevOps platform with source code management, planning, monitoring and more ready to go. Find out %{ci_link}."
msgstr ""
msgid "InProductMarketing|To opt out of these onboarding emails, %{unsubscribe_link}."
msgstr ""
msgid "InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}."
msgstr ""
......@@ -16691,6 +16700,9 @@ msgstr ""
msgid "InProductMarketing|unsubscribe"
msgstr ""
msgid "InProductMarketing|update your preferences"
msgstr ""
msgid "InProductMarketing|using a CI/CD template"
msgstr ""
......
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