mirror of
https://github.com/plausible/analytics.git
synced 2024-12-21 16:41:31 +03:00
18 lines
1.1 KiB
Elixir
18 lines
1.1 KiB
Elixir
<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %>
|
|
<%= if Application.get_env(:plausible, :environment) == "prod" do %>
|
|
<script defer src="https://plausible.io/test/js/script.beacon.js" data-api="https://plausible.io/test/api/event"></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 %>
|
|
|
|
<%= if Application.get_env(:plausible, :environment) == "staging" do %>
|
|
<script defer src="<%="#{plausible_url()}/js/plausible.js"%>"></script>
|
|
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
|
<% end %>
|
|
|
|
<%= if Application.get_env(:plausible, :environment) == "dev" do %>
|
|
<script defer src="<%="#{plausible_url()}/js/plausible.local.js"%>"></script>
|
|
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
|
<% end %>
|
|
<% end %>
|