analytics/lib/plausible_web/templates/layout/_tracking.html.eex
2021-05-19 16:53:29 +03:00

6 lines
458 B
Elixir

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