From a3aede73f9f274b02d76b43c55bbd45327fbad36 Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Thu, 18 Nov 2021 11:18:04 +0200 Subject: [PATCH] Let staging track itself --- .../templates/layout/_tracking.html.eex | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/plausible_web/templates/layout/_tracking.html.eex b/lib/plausible_web/templates/layout/_tracking.html.eex index 1aeb0fbfa..ce432ef51 100644 --- a/lib/plausible_web/templates/layout/_tracking.html.eex +++ b/lib/plausible_web/templates/layout/_tracking.html.eex @@ -1,10 +1,17 @@ -<%= if Application.get_env(:plausible, :environment) == "prod" && !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %> - - - -<% end %> +<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %> + <%= if Application.get_env(:plausible, :environment) == "prod" do %> + + + + <% end %> -<%= if Application.get_env(:plausible, :environment) == "dev" do %> - - + <%= if Application.get_env(:plausible, :environment) == "staging" do %> + + + <% end %> + + <%= if Application.get_env(:plausible, :environment) == "dev" do %> + + + <% end %> <% end %>