Skip to content

Commit b2e33ce

Browse files
talygurynneSpecc
andauthored
Add UTM to email links (#498)
* Localize email templates to Russian Translated all user-facing text in email templates from English to Russian, including subjects, button labels, and message bodies. Updated pluralization and formatting to use Russian language rules and improved consistency across all notification types. * Update workers/email/src/templates/emails/assignee/html.twig Co-authored-by: Peter <[email protected]> * Update text.twig * Update workers/email/src/templates/emails/sign-up/html.twig Co-authored-by: Peter <[email protected]> * Update text.twig * Update workers/email/src/templates/emails/payment-failed/html.twig Co-authored-by: Peter <[email protected]> * Update workers/email/src/templates/emails/payment-success/html.twig Co-authored-by: Peter <[email protected]> * Update text.twig * Update workers/email/src/templates/emails/events-limit-almost-reached/html.twig Co-authored-by: Peter <[email protected]> * Update wording in events limit notification emails Refined the message in both HTML and text templates for the 'events limit almost reached' email to clarify staying informed about all incidents. * Update assignee email templates wording Revised the message in both HTML and text email templates to clarify that the recipient is assigned as responsible for fixing a bug in the project, instead of just processing an event. * Update subject.twig * Update workers/email/src/templates/emails/days-limit-almost-reached/html.twig Co-authored-by: Peter <[email protected]> * Refine event email templates formatting Improved the formatting of the unsubscribe text in the HTML template by consolidating it into a single line. Updated the text template to conditionally display the event type with a colon only if it exists, enhancing clarity in event listings. * Update event-info.twig * Update workers/email/src/templates/emails/days-limit-almost-reached/html.twig Co-authored-by: Peter <[email protected]> * Update text.twig * Update workers/email/src/templates/emails/days-limit-almost-reached/subject.twig Co-authored-by: Peter <[email protected]> * Update workers/email/src/templates/emails/event/text.twig Co-authored-by: Peter <[email protected]> * Improve event type and title display in email templates Updated both HTML and text email templates to conditionally display the event type followed by the event title only if the type exists, improving clarity and formatting. * Update workers/email/src/templates/emails/events-limit-almost-reached/html.twig Co-authored-by: Peter <[email protected]> * Update text.twig * Update event email templates button and link text Changed the button label and link text from 'Просмотреть событие' to 'Просмотреть детали' in both HTML and text event email templates for improved clarity. * Update Russian email templates for events limit notice Improved the wording in both HTML and text versions of the 'events limit almost reached' email templates in Russian for better clarity and tone. * Update days-limit email templates with renewal info Added conditional messaging in both HTML and text email templates to inform users if their subscription will be auto-renewed or if they need to attach a card or pay manually, based on the presence of a subscription ID. * Update email templates branding and footer text Replaces 'Российский трекер ошибок' and 'Сделан в CodeX' with 'Мониторинг ошибок' in all email templates and layout. This unifies and simplifies the branding across all notification emails. * Fix placement of plan suspension notice in email templates Moved the warning about error monitoring suspension to appear only when appropriate in both HTML and text versions of the days-limit-almost-reached email. This ensures the message is shown in the correct context for users without an active subscription. * Unify unsubscribe text in email templates Standardized the wording of unsubscribe and notification preference instructions across all email templates for consistency and clarity. * Update Russian email templates wording and formatting Changed button labels from 'Просмотреть' to 'Смотреть' for consistency across assignee, event, and several-events templates. Improved formatting in events-limit-almost-reached and sign-up HTML templates by adding line breaks for better readability. * Prefill email in login link for sign-up email Updated the login button in the sign-up email template to include the email as a query parameter, allowing the login form to be prefilled for the user. * Update workers/email/src/templates/emails/assignee/html.twig Co-authored-by: Peter <[email protected]> * Prefill email in sign-up email login link Updated the login link in the sign-up email template to include the email as a query parameter, allowing the login form to be prefilled for new users. * Simplify days-limit-almost-reached email templates Removed conditional logic for subscription status in both HTML and text email templates. Now always informs the user that the subscription will be renewed in the specified number of days. * Update days-limit email templates with clearer renewal info Revised both HTML and text email templates to clarify the need to link a card for automatic renewal or pay for the next month manually. Added a warning that error monitoring will be suspended if the plan is not renewed. * Fix event type display when type is undefined in email templates Updated event email templates to use the default filter for event type, preventing display issues when the type is undefined or missing. This ensures consistent formatting in both HTML and text versions of event notification emails. * Refactor event type display in email templates Replaced inline ternary logic with Twig if statements for displaying event types in event email templates. This improves readability and consistency across HTML and text versions. * Update workspace invite subject variable name Changed the variable in the workspace invite email subject from 'name' to 'workspaceName' for improved clarity and consistency. * Remove duplicate event title block in email template Deleted a redundant table row displaying the event title and icon above the main event title block in the event email template to avoid duplicate information. * Update html.twig * fix some styles * Update backtrace.twig * Update event-info.twig * few more fixes * Update backtrace.twig * Update subject.twig * Add environment prefix to email sender name Non-production environments now include the environment name in the email sender name to help distinguish emails sent from staging or development. * Revert "Add environment prefix to email sender name" This reverts commit 29adaa6. * Add user email to sign-up email template variables Introduces an 'email' field to the sign-up template variables and updates the email template to use this value for the login button link. This ensures the correct email is prefilled in the login URL. * Add UTM parameters to email template links Appends UTM parameters to all actionable links in email templates for better tracking of user engagement from transactional emails. Each template now sets a relevant utm_campaign value, and links are updated accordingly in both HTML and text versions. * Fix typos and update payment instructions in email templates Corrected a typo in the renewal message and updated the payment settings instruction in both HTML and text versions of the days-limit-almost-reached email templates. --------- Co-authored-by: Peter <[email protected]>
1 parent aad4b02 commit b2e33ce

File tree

23 files changed

+62
-25
lines changed

23 files changed

+62
-25
lines changed

workers/email/src/templates/emails/assignee/html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
{% endblock %}
66

77
{% block content %}
8+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=assignee' %}
9+
810
<tr>
911
<td>
1012
<img src="{{ hostOfStatic }}/email/user-assigned-icon.png" width="32" height="32" hspace="3" style="display: block; vertical-align: middle; margin: 0 auto; margin-top: 23px;">
@@ -27,7 +29,7 @@
2729
{% include '../../components/event.twig' with daysRepeated, event %}
2830
<tr>
2931
<td style="padding-right: 20px;padding-left: 20px;padding-bottom: 40px;">
30-
{% set url = host ~ '/project/' ~ project._id ~ '/event/' ~ event._id ~ '/overview' %}
32+
{% set url = host ~ '/project/' ~ project._id ~ '/event/' ~ event._id ~ '/overview' ~ '?' ~ utmParams %}
3133
{% include '../../components/button.twig' with {href: url, label: 'Смотреть событие'} %}
3234
</td>
3335
</tr>

workers/email/src/templates/emails/assignee/text.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=assignee' %}
2+
13
{% if whoAssigned.name %}{{ whoAssigned.name | escape }}{% else %}{{ whoAssigned.email }}{% endif %} назначил вас ответственным за исправление ошибки в проекте «{{ project.name | escape }}»
24

35
{{ event.payload.title }}
@@ -6,7 +8,7 @@
68
{{ daysRepeated }} {{ pluralize_ru(daysRepeated, ['день', 'дня', 'дней']) }} повторяется
79
{{ event.usersAffected }} {{ pluralize_ru(event.usersAffected, ['пользователь', 'пользователя', 'пользователей']) }} затронуто
810

9-
Смотреть событие: {{ host }}/project/{{ project._id }}/event/{{ event._id }}/overview
11+
Смотреть событие: {{ host }}/project/{{ project._id }}/event/{{ event._id }}/overview?{{ utmParams }}
1012

1113
***
1214

workers/email/src/templates/emails/block-workspace/html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
{% endblock %}
66

77
{% block content %}
8+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=block-workspace' %}
9+
810
<tr>
911
<td>
1012
<img src="{{ hostOfStatic }}/email/low-balance-icon.png" width="32" height="32" hspace="3" style="display: block; vertical-align: middle; margin: 23px auto 0;">
@@ -39,7 +41,7 @@
3941
{% else %}
4042
{% set buttonLabel = 'Открыть настройки' %}
4143
{% endif %}
42-
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing', label: buttonLabel} %}
44+
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing' ~ '?' ~ utmParams, label: buttonLabel} %}
4345
</td>
4446
</tr>
4547
{% endblock %}

workers/email/src/templates/emails/block-workspace/text.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=block-workspace' %}
2+
13
Мониторинг ошибок остановлен
24

35
Вы больше не отслеживаете новые ошибки «{{ workspace.name | escape }}», потому что закончился лимит или срок действия тарифного плана
46

5-
Чтобы продолжить получать события, выберите подходящий тарифный план и продлите подписку в настройках оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing
7+
Чтобы продолжить получать события, выберите подходящий тарифный план и продлите подписку в настройках оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing?{{ utmParams }}
68

79
***
810

workers/email/src/templates/emails/blocked-workspace-reminder/html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
{% endblock %}
66

77
{% block content %}
8+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=blocked-workspace-reminder' %}
9+
810
<tr>
911
<td>
1012
<img src="{{ hostOfStatic }}/email/low-balance-icon.png" width="32" height="32" hspace="3" style="display: block; vertical-align: middle; margin: 23px auto 0;">
@@ -39,7 +41,7 @@
3941
{% else %}
4042
{% set buttonLabel = 'Открыть настройки' %}
4143
{% endif %}
42-
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing', label: buttonLabel} %}
44+
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing' ~ '?' ~ utmParams, label: buttonLabel} %}
4345
</td>
4446
</tr>
4547
{% endblock %}

workers/email/src/templates/emails/blocked-workspace-reminder/text.twig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
Требуется действие: мониторинг ошибок в {{ workspace.name }} не работает уже {{ daysAfterBlock }} {{ pluralize_ru(daysAfterBlock, ['день', 'дня', 'дней']) }}
1+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=blocked-workspace-reminder' %}
22

3-
Чтобы снова видеть актуальные события, выберите подходящий тарифный план и продлите подписку в настройках оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing
3+
Требуется действие: мониторинг ошибок в {{ workspace.name }} не работает уже {{ daysAfterBlock }} {{ pluralize_ru(daysAfterBlock, ['день', 'дня', 'дней']) }}
44

5+
Чтобы снова видеть актуальные события, выберите подходящий тарифный план и продлите подписку в настройках оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing?{{ utmParams }}
56
***
67

78
Хоук

workers/email/src/templates/emails/days-limit-almost-reached/html.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{% endblock %}
66

77
{% block content %}
8+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=days-limit-almost-reached' %}
89
<tr>
910
<td>
1011
<img src="{{ hostOfStatic }}/email/low-balance-icon.png" width="32" height="32" hspace="3" style="display: block; vertical-align: middle; margin: 23px auto 0;">
@@ -31,7 +32,7 @@
3132
</tr>
3233
<tr>
3334
<td style="padding-right: 20px; padding-left: 20px; padding-bottom: 40px;">
34-
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing', label: 'Перейти к настройкам'} %}
35+
{% include '../../components/button.twig' with {href: host ~ '/workspace/' ~ workspace._id ~ '/settings/billing' ~ '?' ~ utmParams, label: 'Перейти к настройкам'} %}
3536
</td>
3637
</tr>
3738
{% endblock %}

workers/email/src/templates/emails/days-limit-almost-reached/text.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=days-limit-almost-reached' %}
2+
13
{{ daysLeft | escape }} {{ pluralize_ru(daysLeft, ['день', 'дня', 'дней']) }} до окончания платного тарифа воркспейса «{{ workspace.name | escape }}».
24

35
Привяжите карту для автоматического продления тарифа в воркспейсе «{{ workspace.name | escape }}». Или оплатите следующий месяц разово.
46

57
Если план не продлить, то мониторинг ошибок будет приостановлен.
68

7-
Перейти к настройкам оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing
9+
Перейти к настройкам оплаты: {{ host }}/workspace/{{ workspace._id }}/settings/billing?{{ utmParams }}
810

911
***
1012

workers/email/src/templates/emails/event/html.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{% endblock %}
66

77
{% block content %}
8+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=event' %}
89

910
{% set event = events[0].event %}
1011
{% set daysRepeated = events[0].daysRepeated %}
@@ -55,7 +56,7 @@
5556

5657
<tr>
5758
<td style="padding-top: 30px;padding-right: 20px;padding-left: 20px;padding-bottom: 40px;">
58-
{% set eventURL = host ~ '/project/' ~ project._id ~ '/event/' ~ event._id %}
59+
{% set eventURL = host ~ '/project/' ~ project._id ~ '/event/' ~ event._id ~ '?' ~ utmParams %}
5960
{% include '../../components/button.twig' with {href: eventURL, label: 'Смотреть детали'} %}
6061
</td>
6162
</tr>

workers/email/src/templates/emails/event/text.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
{# Оставить как есть #}
88
{% endif %}
99

10+
{% set utmParams = 'utm_source=email&utm_medium=transactional&utm_campaign=event' %}
11+
1012
{{ newLabel }} в проекте «{{ project.name }}»
1113

1214
------------------------
@@ -23,7 +25,7 @@
2325

2426
Это событие произошло {{ event.totalCount }} {{ pluralize_ru(event.totalCount, ['раз', 'раза', 'раз']) }} за {{ daysRepeated }} {{ pluralize_ru(daysRepeated, ['день', 'дня', 'дней']) }}.
2527

26-
Смотреть детали: {{ host }}/project/{{ project._id }}/event/{{ event._id }}
28+
Смотреть детали: {{ host }}/project/{{ project._id }}/event/{{ event._id }}?{{ utmParams }}
2729

2830
***
2931

0 commit comments

Comments
 (0)