Add image fallback when user has disabled javascript

This commit is contained in:
Gabriel Augendre 2021-01-06 16:29:55 +01:00
parent 87ff32cbc9
commit f2981d2d0f
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

View file

@ -7,8 +7,8 @@
</script>
{% endif %}
{% compress js inline %}
{% if goatcounter_domain is not None %}
{% if goatcounter_domain is not None %}
{% compress js inline %}
<script>
window.goatcounter = {
endpoint: 'https://{{ goatcounter_domain }}/count',
@ -16,6 +16,10 @@
}
</script>
<script async defer src="{% static "vendor/goatcounter.js" %}"></script>
{% endif %}
{% endcompress %}
{% endcompress %}
<noscript>
<img src="https://{{ goatcounter_domain }}/count?p={{ request.get_full_path }}"
alt="GoatCounter tracking pixel">
</noscript>
{% endif %}
{% endif %}