mirror of
https://github.com/plausible/analytics.git
synced 2024-12-29 20:42:01 +03:00
199206babc
* added the first version of dimensions extension * finished dimensions script extension + updated tracking to use it * script variants build
12 lines
860 B
Elixir
12 lines
860 B
Elixir
<%= if !Application.get_env(:plausible, :is_selfhost) && !@conn.assigns[:skip_plausible_tracking] do %>
|
|
<%= if Application.get_env(:plausible, :environment) in ["prod", "staging"] do %>
|
|
<script defer event-logged_in="<%= !!@conn.assigns[:current_user] %>" src="<%="#{plausible_url()}/js/script.dimensions.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 event-logged_in="<%= !!@conn.assigns[:current_user] %>" src="<%="#{plausible_url()}/js/plausible.local.dimensions.js"%>"></script>
|
|
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
|
<% end %>
|
|
<% end %>
|