diff --git a/lib/plausible_web/controllers/stats_controller.ex b/lib/plausible_web/controllers/stats_controller.ex
index 149ca599d..5b8a5c44d 100644
--- a/lib/plausible_web/controllers/stats_controller.ex
+++ b/lib/plausible_web/controllers/stats_controller.ex
@@ -363,14 +363,11 @@ defmodule PlausibleWeb.StatsController do
end
defp is_dbip() do
- is_or_nil =
- if Application.get_env(:plausible, :is_selfhost) do
- if type = Plausible.Geo.database_type() do
- String.starts_with?(type, "DBIP")
- end
- end
-
- !!is_or_nil
+ on_full_build do
+ true
+ else
+ String.starts_with?(Plausible.Geo.database_type(), "DBIP")
+ end
end
defp title(%{path_info: ["plausible.io"]}, _) do
diff --git a/lib/plausible_web/templates/auth/activate.html.eex b/lib/plausible_web/templates/auth/activate.html.heex
similarity index 98%
rename from lib/plausible_web/templates/auth/activate.html.eex
rename to lib/plausible_web/templates/auth/activate.html.heex
index 789c97d94..cce619150 100644
--- a/lib/plausible_web/templates/auth/activate.html.eex
+++ b/lib/plausible_web/templates/auth/activate.html.heex
@@ -27,10 +27,10 @@
- Check your spam folder
- <%= link("Send a new code", class: "underline text-indigo-600", to: "/activate/request-code", method: :post) %> to <%= @conn.assigns[:current_user].email %>
- <%= if Application.get_env(:plausible, :is_selfhost) do %>
- - Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 underline" ) %>
- <% else %>
+ <%= if full_build?() do %>
- Contact us if the problem persists
+ <% else %>
+ - Ask on our <%= link("community-supported forum", to: "https://github.com/plausible/analytics/discussions", class: "text-indigo-600 underline" ) %>
<% end %>
diff --git a/lib/plausible_web/templates/email/google_analytics_import.html.eex b/lib/plausible_web/templates/email/google_analytics_import.html.heex
similarity index 97%
rename from lib/plausible_web/templates/email/google_analytics_import.html.eex
rename to lib/plausible_web/templates/email/google_analytics_import.html.heex
index a99c2f91a..5c3246809 100644
--- a/lib/plausible_web/templates/email/google_analytics_import.html.eex
+++ b/lib/plausible_web/templates/email/google_analytics_import.html.heex
@@ -27,7 +27,7 @@
If all of the above is fine, please try to do the import once again. Sometimes the Google Analytics API just randomly returns empty data. It's intermittent and random. Trying to do the import again may return what you need.
- <%= if !Application.get_env(:plausible, :is_selfhost) do %>
+ <%= if full_build?() do %>
Please reply to this email to let us know if you're still experiencing issues with the import.
<% end %>
diff --git a/lib/plausible_web/views/email_view.ex b/lib/plausible_web/views/email_view.ex
index 786efb537..e2c6db164 100644
--- a/lib/plausible_web/views/email_view.ex
+++ b/lib/plausible_web/views/email_view.ex
@@ -1,4 +1,5 @@
defmodule PlausibleWeb.EmailView do
+ use Plausible
use PlausibleWeb, :view
def plausible_url do