analytics/lib/plausible_web/templates/layout/_tracking.html.eex
Tatsuyuki Ishi d39fbc48c2
Disable self-tracking with self hosting (#907)
* Disable self-tracking with self hosting

* Update CHANGELOG.md
2021-04-02 13:31:30 +03:00

5 lines
331 B
Elixir

<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %>
<script async defer src="<%="#{plausible_url()}/js/plausible.js"%>"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
<% end %>