aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2023-05-23 23:52:40 +0300
committerValentin Popov <valentin@popov.link>2023-05-23 23:52:40 +0300
commite4f1c69aed4239494333c3eed67137d1d282ed4c (patch)
treeb24783411d11f663197d08b1f6aa07af650ddd52
parent171f2fa1944ec9e12d54a7a29d110d844de3830a (diff)
downloadpopov.link-e4f1c69aed4239494333c3eed67137d1d282ed4c.tar.xz
popov.link-e4f1c69aed4239494333c3eed67137d1d282ed4c.zip
Added a new user counter
-rw-r--r--templates/base.html2
-rw-r--r--templates/includes/counter.html5
2 files changed, 6 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html
index 43437c8..a9edbde 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -32,7 +32,7 @@
{% block content %}{% endblock %}
</article>
- <script async data-goatcounter="https://stats.popov.link/count" src="/stats.js"></script>
+ {% include 'includes/counter.html' %}
</body>
</html> \ No newline at end of file
diff --git a/templates/includes/counter.html b/templates/includes/counter.html
new file mode 100644
index 0000000..3467b6f
--- /dev/null
+++ b/templates/includes/counter.html
@@ -0,0 +1,5 @@
+{% set url = current_url | default(value='/') %}
+
+{% if url is not containing('.onion') %}
+<script async data-website-id="c3d1c4c4-3d33-4523-8829-90eb352fc3aa" src="https://analytics.umami.is/script.js"></script>
+{% endif %} \ No newline at end of file