mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
chore: only track analytics on hexdocs
This commit is contained in:
parent
5aed668c68
commit
84a3bcf37b
1 changed files with 8 additions and 1 deletions
9
mix.exs
9
mix.exs
|
@ -96,7 +96,14 @@ defmodule Ash.MixProject do
|
|||
before_closing_head_tag: fn type ->
|
||||
if type == :html do
|
||||
"""
|
||||
<script defer data-domain="ashhexdocs" src="https://plausible.io/js/script.js"></script>
|
||||
<script>
|
||||
if (location.hostname === "hexdocs") {
|
||||
var script = document.createElement("script");
|
||||
script.src = "https://plausible.io/js/script.js";
|
||||
script.setAttribute("defer", "defer")
|
||||
script.setAttribute("data-domain", "ashhexdocs")
|
||||
}
|
||||
</script>
|
||||
"""
|
||||
end
|
||||
end,
|
||||
|
|
Loading…
Reference in a new issue