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
Improve approaching accept_traffic_until e-mail (#3660)
hq173923404b07f
diff --git a/lib/plausible_web/email.ex b/lib/plausible_web/email.exindex fd1c7300a5..113ba25f16 100644--- a/lib/plausible_web/email.ex+++ b/lib/plausible_web/email.ex@@ -358,7 +358,7 @@ defmodule PlausibleWeb.Email do|> to(user.email)|> tag("drop-traffic-warning-first")|> subject("We'll stop counting your stats")- |> render("approaching_accept_traffic_until.html", time: "next week")+ |> render("approaching_accept_traffic_until.html", time: "next week", user: user)enddef approaching_accept_traffic_until_tomorrow(user) dodiff --git a/lib/plausible_web/templates/email/approaching_accept_traffic_until.html.heex b/lib/plausible_web/templates/email/approaching_accept_traffic_until.html.heexindex f5e12414ad..88e2f71e6f 100644--- a/lib/plausible_web/templates/email/approaching_accept_traffic_until.html.heex+++ b/lib/plausible_web/templates/email/approaching_accept_traffic_until.html.heex@@ -1,8 +1,7 @@You used to have an active account with Plausible Analytics, a simple, lightweight, open source and privacy-first Google Analytics alternative.-+<br /><br />We've noticed that you're still sending us stats so we're writing to inform you that we'll stop accepting stats from your sites <%= @time %>. We're an independent, bootstrapped service and we don't sell your data, so this will reduce our server costs and help keep us sustainable.--If you'd like to continue counting your site stats in a privacy-friendly way, please+<br /><br /> If you'd like to continue counting your site stats in a privacy-friendly way, please<a href={plausible_url()}>login to your Plausible account</a> and start a subscription.-+<br /><br />Do you have any questions or need help with anything? Just reply to this email and we'll gladly help.diff --git a/test/plausible_web/email_test.exs b/test/plausible_web/email_test.exsindex fc52753c48..9a23e06120 100644--- a/test/plausible_web/email_test.exs+++ b/test/plausible_web/email_test.exs@@ -247,13 +247,14 @@ defmodule PlausibleWeb.EmailTest dodescribe "approaching accept_traffic_until" dotest "renders first warning" do- user = build(:user)+ user = build(:user, name: "John Doe")%{html_body: body, subject: subject} =PlausibleWeb.Email.approaching_accept_traffic_until(user)assert subject == "We'll stop counting your stats"assert body =~ plausible_link()+ assert body =~ "Hey John,"assert body =~"We've noticed that you're still sending us stats so we're writing to inform you that we'll stop accepting stats from your sites next week."