|
|
|
|
@ -2,9 +2,8 @@ defmodule PlausibleWeb.Tracker do
|
|
|
|
|
import Plug.Conn
|
|
|
|
|
use Agent
|
|
|
|
|
|
|
|
|
|
custom_script_name = Application.get_env(:plausible, :custom_script_name)
|
|
|
|
|
base_variants = ["hash", "outbound-links", "exclusions", "compat", "local"]
|
|
|
|
|
base_filenames = ["plausible", custom_script_name]
|
|
|
|
|
base_filenames = ["plausible", "script"]
|
|
|
|
|
|
|
|
|
|
# Generates Power Set of all variants
|
|
|
|
|
variants =
|
|
|
|
|
@ -35,7 +34,7 @@ defmodule PlausibleWeb.Tracker do
|
|
|
|
|
end)
|
|
|
|
|
|> Enum.reject(fn x -> x == nil end)
|
|
|
|
|
|> Enum.into(%{})
|
|
|
|
|
|> Map.put("plausible.js", ["analytics.js", "#{custom_script_name}.js"])
|
|
|
|
|
|> Map.put("plausible.js", ["analytics.js", "script.js"])
|
|
|
|
|
|
|
|
|
|
@templates files_available
|
|
|
|
|
@aliases aliases_available
|
|
|
|
|
|