📈 chore(stats): prevent non-demo sites from using demo GoatCounter
This commit is contained in:
parent
5d6cd7a7cf
commit
ad03bd274c
@ -3,6 +3,8 @@
|
|||||||
{% set self_hosted_url = config.extra.analytics.self_hosted_url | default(value="") %}
|
{% set self_hosted_url = config.extra.analytics.self_hosted_url | default(value="") %}
|
||||||
|
|
||||||
{% if analytics_service == "goatcounter" %}
|
{% if analytics_service == "goatcounter" %}
|
||||||
|
{# Prevent non-demo sites from using the demo analytics account #}
|
||||||
|
{% if self_hosted_url == "https://tabi-stats.osc.garden" and config.base_url == "https://welpo.github.io/tabi" or self_hosted_url != "https://tabi-stats.osc.garden" %}
|
||||||
<script async
|
<script async
|
||||||
{% if self_hosted_url %}
|
{% if self_hosted_url %}
|
||||||
data-goatcounter="{{ self_hosted_url ~ '/count' }}"
|
data-goatcounter="{{ self_hosted_url ~ '/count' }}"
|
||||||
@ -12,6 +14,7 @@
|
|||||||
src="https://gc.zgo.at/count.js"
|
src="https://gc.zgo.at/count.js"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
></script>
|
></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% elif analytics_service == "umami" %}
|
{% elif analytics_service == "umami" %}
|
||||||
<script async defer
|
<script async defer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user