mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
chore: only gather analytics on hexdocs
This commit is contained in:
parent
d0e901b759
commit
07fd9920ab
1 changed files with 9 additions and 1 deletions
10
mix.exs
10
mix.exs
|
@ -118,7 +118,15 @@ defmodule AshPostgres.MixProject do
|
||||||
before_closing_head_tag: fn type ->
|
before_closing_head_tag: fn type ->
|
||||||
if type == :html do
|
if type == :html do
|
||||||
"""
|
"""
|
||||||
<script defer data-domain="ashhexdocs" src="https://plausible.io/js/script.js"></script>
|
<script>
|
||||||
|
if (location.hostname === "hexdocs.pm") {
|
||||||
|
var script = document.createElement("script");
|
||||||
|
script.src = "https://plausible.io/js/script.js";
|
||||||
|
script.setAttribute("defer", "defer")
|
||||||
|
script.setAttribute("data-domain", "ashhexdocs")
|
||||||
|
document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue