Changes to the emails as discussed (#3540)
* Update over_limit.html.eex * Update dashboard_locked.html.eex * Update dashboard_locked.html.eex * Update over_limit.html.eex * Update dashboard_locked.html.eex * fix tests * stop querying owned_site_ids three times ... when querying for billing cycles. Adds an optional `owned_site_ids` argument to the `usage_cycle` function. * add penultimate billing cycle info to emails This commit also refactors some code and adds unit tests to email templates * use delimit_integer instead of large_number_format ... to display usage with exact numbers such as 1,099,999 instead of 1M * add penultimate cycle date ranges and linebreaks --------- Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com> Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>pull/3595/head^2 r2023.12.06-274
parent
615b6aef7d
commit
0b00762591
@ -1,18 +1,15 @@
|
||||
Last week we sent a reminder that your traffic has exceeded your Plausible Analytics subscription tier. As we haven't heard from you, we've now locked your stats so they're no longer accessible.
|
||||
Last week we sent a reminder that your site traffic has exceeded the limits of your Plausible Analytics subscription tier for two consecutive months. Since we haven't received a response, we've had to temporarily lock access to your stats.
|
||||
<br /><br />
|
||||
Your subscription is still active, we're still counting your stats and haven't deleted any of your data but as you have outgrown your subscription tier, we kindly ask you to upgrade to accommodate your new traffic levels. We will unlock your dashboard immediately after your account has been upgraded to the appropriate tier.
|
||||
Your subscription is still active, we're still counting your stats and haven't deleted any of your data but as you have outgrown your subscription tier, we kindly ask you to upgrade to match your new traffic levels. Upon upgrading to a suitable tier, your dashboard access will be immediately restored.
|
||||
<br /><br />
|
||||
During the last billing cycle (<%= PlausibleWeb.TextHelpers.format_date_range(@usage.last_cycle.date_range) %>), your account recorded <%= PlausibleWeb.AuthView.delimit_integer(@usage.last_cycle.total) %> billable pageviews. In the billing cycle before that (<%= PlausibleWeb.TextHelpers.format_date_range(@usage.penultimate_cycle.date_range) %>), the usage was <%= PlausibleWeb.AuthView.delimit_integer(@usage.penultimate_cycle.total) %> billable pageviews. Note that billable pageviews include both standard pageviews and custom events. In your <%= link("account settings", to: plausible_url() <> PlausibleWeb.Router.Helpers.auth_path(PlausibleWeb.Endpoint, :user_settings)) %>, you'll find an overview of your usage and limits.
|
||||
<br /><br />
|
||||
In the last billing cycle (<%= date_format(@last_cycle.first) %> to <%= date_format(@last_cycle.last) %>), your account has used <%= PlausibleWeb.StatsView.large_number_format(@usage) %> billable pageviews.
|
||||
<%= if @suggested_plan == :enterprise do %>
|
||||
This is more than our standard plans, so please reply back to this email to get a quote for your volume.
|
||||
Your usage exceeds our standard plans, so please reply back to this email for a tailored quote.
|
||||
<% else %>
|
||||
Based on that we recommend you select a <%= @suggested_plan.volume %>/mo plan.
|
||||
<br /><br />
|
||||
<a href="https://plausible.io/settings">Click here</a> to go to your account settings. You can upgrade your subscription tier by clicking the 'Change plan' link.
|
||||
<%= link("Click here to upgrade your subscription", to: plausible_url() <> Plausible.Billing.upgrade_route_for(@user)) %>. We recommend you upgrade to the <%= @suggested_plan.volume %>/mo plan. The new charge will be prorated to reflect the amount you have already paid and the time until your current subscription is supposed to expire.
|
||||
<% end %>
|
||||
<br /><br />
|
||||
The new charge will be prorated to reflect the amount you have already paid and the time until your current subscription is supposed to expire.
|
||||
<br /><br />
|
||||
Do you have questions or need help with anything? Just reply to this email and we'll gladly help.
|
||||
Do you have questions or need help with anything? Just reply to this email. We're here to help!
|
||||
<br /><br />
|
||||
Thanks for understanding and for being a Plausible subscriber!
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
Automated notice about an enterprise account that has gone over their limits. <br /><br />
|
||||
|
||||
Customer email: <%= @user.email %><br />
|
||||
Last billing cycle: <%= date_format(@last_cycle.first) %> to <%= date_format(@last_cycle.last) %><br >
|
||||
Pageview Usage: <%= PlausibleWeb.StatsView.large_number_format(@usage) %> billable pageviews<br />
|
||||
Last billing cycle: <%= PlausibleWeb.TextHelpers.format_date_range(@pageview_usage.last_cycle.date_range) %><br >
|
||||
Last cycle pageview usage: <%= PlausibleWeb.AuthView.delimit_integer(@pageview_usage.last_cycle.total) %> billable pageviews<br />
|
||||
Penultimate billing cycle: <%= PlausibleWeb.TextHelpers.format_date_range(@pageview_usage.penultimate_cycle.date_range) %><br >
|
||||
Penultimate cycle pageview usage: <%= PlausibleWeb.AuthView.delimit_integer(@pageview_usage.penultimate_cycle.total) %> billable pageviews<br />
|
||||
Site usage: <%= @site_usage %> / <%= @site_allowance %> allowed sites<br />
|
||||
|
||||
@ -1,20 +1,17 @@
|
||||
Thanks for being a Plausible Analytics subscriber!
|
||||
<br /><br />
|
||||
This is a notice that your traffic has exceeded your subscription tier. Congrats on all that traffic!
|
||||
This is a friendly reminder that your traffic has exceeded your subscription tier for two consecutive months. Congrats on all that traffic!
|
||||
<br /><br />
|
||||
To keep having access to your stats, we require you to upgrade your account to accommodate your new traffic levels. If you do not upgrade your account within the next 7 days, we will lock your stats and they won't be accessible.
|
||||
To maintain uninterrupted access to your stats, we kindly ask you to upgrade your account to match your new traffic levels. Please note, if your account isn't upgraded within the next 7 days, access to your stats will be temporarily locked.
|
||||
<br /><br />
|
||||
During the last billing cycle (<%= PlausibleWeb.TextHelpers.format_date_range(@usage.last_cycle.date_range) %>), your account recorded <%= PlausibleWeb.AuthView.delimit_integer(@usage.last_cycle.total) %> billable pageviews. In the billing cycle before that (<%= PlausibleWeb.TextHelpers.format_date_range(@usage.penultimate_cycle.date_range) %>), your account used <%= PlausibleWeb.AuthView.delimit_integer(@usage.penultimate_cycle.total) %> billable pageviews. Note that billable pageviews include both standard pageviews and custom events. In your <%= link("account settings", to: plausible_url() <> PlausibleWeb.Router.Helpers.auth_path(PlausibleWeb.Endpoint, :user_settings)) %>, you'll find an overview of your usage and limits.
|
||||
<br /><br />
|
||||
In the last billing cycle (<%= date_format(@last_cycle.first) %> to <%= date_format(@last_cycle.last) %>), your account has used <%= PlausibleWeb.StatsView.large_number_format(@usage) %> billable pageviews.
|
||||
<%= if @suggested_plan == :enterprise do %>
|
||||
This is more than our standard plans, so please reply back to this email to get a quote for your volume.
|
||||
Your usage exceeds our standard plans, so please reply back to this email for a tailored quote.
|
||||
<% else %>
|
||||
Based on that we recommend you select a <%= @suggested_plan.volume %>/mo plan.
|
||||
<br /><br />
|
||||
You can upgrade your subscription using our self-serve platform. The new charge will be prorated to reflect the amount you have already paid and the time until your current subscription is supposed to expire.
|
||||
<br /><br />
|
||||
<a href="https://plausible.io/settings">Click here</a> to go to your account settings. You can upgrade your subscription tier by clicking the 'Change plan' link.
|
||||
<%= link("Click here to upgrade your subscription", to: plausible_url() <> Plausible.Billing.upgrade_route_for(@user)) %>. We recommend you upgrade to the <%= @suggested_plan.volume %>/mo plan. The new charge will be prorated to reflect the amount you have already paid and the time until your current subscription is supposed to expire.
|
||||
<% end %>
|
||||
<br /><br />
|
||||
Do you have questions or need help with anything? Just reply to this email and we'll gladly help.
|
||||
Do you have questions or need help with anything? Just reply to this email. We're here to help!
|
||||
<br /><br />
|
||||
Thanks again for using our product and for your support!
|
||||
|
||||
Loading…
Reference in New Issue