Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Avoid suggesting plan for trials switching to enterprise plans (#3282)
Vini Brasil48b02c139640
diff --git a/lib/plausible_web/templates/email/trial_upgrade_email.html.eex b/lib/plausible_web/templates/email/trial_upgrade_email.html.eexindex dad5ab4d50..65ec109ece 100644--- a/lib/plausible_web/templates/email/trial_upgrade_email.html.eex+++ b/lib/plausible_web/templates/email/trial_upgrade_email.html.eex@@ -1,12 +1,12 @@Thanks for exploring Plausible, a simple and privacy-friendly alternative to Google Analytics. Your free 30-day trial is ending <%= @day %>, but you can keep using Plausible by upgrading to a paid plan.<br /><br />In the last month, your account has used <%= PlausibleWeb.AuthView.delimit_integer(@usage) %> billable pageviews<%= if @custom_events > 0, do: " and custom events in total", else: "" %>.-<%= if @usage <= 10_000_000 do %>+<%= 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.+<% else %>Based on that we recommend you select the <%= @suggested_plan.volume %>/mo plan.<br /><br /><%= link("Upgrade now", to: "#{plausible_url()}/billing/upgrade") %><br /><br />Have a question, feedback or need some guidance? Just reply to this email to get in touch!-<% else %>-This is more than our standard plans, so please reply back to this email to get a quote for your volume.<% end %>diff --git a/test/workers/send_trial_notifications_test.exs b/test/workers/send_trial_notifications_test.exsindex 768c38a7bd..19842b4b18 100644--- a/test/workers/send_trial_notifications_test.exs+++ b/test/workers/send_trial_notifications_test.exs@@ -206,5 +206,13 @@ defmodule Plausible.Workers.SendTrialNotificationsTest doemail = PlausibleWeb.Email.trial_upgrade_email(user, "today", {20_000_000, 0})assert email.html_body =~ "please reply back to this email to get a quote for your volume"end++ test "does not suggest a plan when user is switching to an enterprise plan" do+ user = insert(:user)+ insert(:enterprise_plan, user: user, paddle_plan_id: "enterprise-plan-id")++ email = PlausibleWeb.Email.trial_upgrade_email(user, "today", {10_000, 0})+ assert email.html_body =~ "please reply back to this email to get a quote for your volume"+ endendend