Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Do not track header

Uku Tahtd366dee08aaf
diff --git a/lib/plausible_web/email.ex b/lib/plausible_web/email.ex
index c525f1b9b0..106142d81a 100644
--- a/lib/plausible_web/email.ex
+++ b/lib/plausible_web/email.ex
@@ -3,7 +3,7 @@ defmodule PlausibleWeb.Email do
import Bamboo.PostmarkHelper
def activation_email(user, link) do
- new_email()
+ base_email()
|> to(user.email)
|> from("Uku Taht <[email protected]>")
|> tag("activation-email")
@@ -12,7 +12,7 @@ defmodule PlausibleWeb.Email do
end
def welcome_email(user) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("welcome-email")
@@ -21,7 +21,7 @@ defmodule PlausibleWeb.Email do
end
def create_site_email(user) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("create-site-email")
@@ -30,7 +30,7 @@ defmodule PlausibleWeb.Email do
end
def site_setup_help(user, site) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("help-email")
@@ -39,7 +39,7 @@ defmodule PlausibleWeb.Email do
end
def site_setup_success(user, site) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("setup-success-email")
@@ -48,7 +48,7 @@ defmodule PlausibleWeb.Email do
end
def check_stats_email(user) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("check-stats-email")
@@ -57,7 +57,7 @@ defmodule PlausibleWeb.Email do
end
def password_reset_email(email, reset_link) do
- new_email()
+ base_email()
|> to(email)
|> from("Uku Taht <[email protected]>")
|> tag("password-reset-email")
@@ -66,7 +66,7 @@ defmodule PlausibleWeb.Email do
end
def trial_one_week_reminder(user) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("trial-one-week-reminder")
@@ -75,7 +75,7 @@ defmodule PlausibleWeb.Email do
end
def trial_upgrade_email(user, day, pageviews) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("trial-upgrade-email")
@@ -84,7 +84,7 @@ defmodule PlausibleWeb.Email do
end
def trial_over_email(user) do
- new_email()
+ base_email()
|> to(user)
|> from("Uku Taht <[email protected]>")
|> tag("trial-over-email")
@@ -95,7 +95,7 @@ defmodule PlausibleWeb.Email do
def feedback(from, text) do
from = if from == "", do: "[email protected]", else: from
- new_email()
+ base_email()
|> from("[email protected]")
|> put_param("ReplyTo", from)
@@ -105,11 +105,16 @@ defmodule PlausibleWeb.Email do
end
def weekly_report(email, site, assigns) do
- new_email()
+ base_email()
|> to(email)
|> from("Plausible Insights <[email protected]>")
|> tag("weekly-report")
|> subject("#{assigns[:name]} report for #{site.domain}")
|> render("weekly_report.html", Keyword.put(assigns, :site, site))
end
+
+ defp base_email() do
+ new_email()
+ |> put_param("TrackOpens", false)
+ end
end