diff --git a/lib/plausible_web/templates/layout/_tracking.html.eex b/lib/plausible_web/templates/layout/_tracking.html.eex
index e4bd69cd13..1aeb0fbfa5 100644
--- a/lib/plausible_web/templates/layout/_tracking.html.eex
+++ b/lib/plausible_web/templates/layout/_tracking.html.eex
@@ -1,5 +1,10 @@
-<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %>
+<%= 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, :environment) == "dev" do %>
+
+
+<% end %>
diff --git a/priv/tracker/js/analytics.js b/priv/tracker/js/analytics.js
index be4dc37b79..8b024ba0a9 100644
--- a/priv/tracker/js/analytics.js
+++ b/priv/tracker/js/analytics.js
@@ -1 +1 @@
-!function(){"use strict";var t,a=window.location,o=window.document,r=o.currentScript,s=r.getAttribute("data-api")||new URL(r.src).origin+"/api/event",l=window.localStorage.plausible_ignore;function w(t){console.warn("Ignoring Event: "+t)}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(a.hostname)||"file:"===a.protocol)return w("localhost");if(!(window.phantom||window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)){if("true"==l)return w("localStorage flag");var i={};i.n=t,i.u=a.href,i.d=r.getAttribute("data-domain"),i.r=o.referrer||null,i.w=window.innerWidth,e&&e.meta&&(i.m=JSON.stringify(e.meta)),e&&e.props&&(i.p=JSON.stringify(e.props));var n=new XMLHttpRequest;n.open("POST",s,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(i)),n.onreadystatechange=function(){4==n.readyState&&e&&e.callback&&e.callback()}}}function i(){t!==a.pathname&&(t=a.pathname,e("pageview"))}var n,p=window.history;p.pushState&&(n=p.pushState,p.pushState=function(){n.apply(this,arguments),i()},window.addEventListener("popstate",i));var d=window.plausible&&window.plausible.q||[];window.plausible=e;for(var u=0;u