Skip to content

Commit 23aeb20

Browse files
Merge pull request #322 from Vincent-C/cloudflare_analytics_support
Add support for Cloudflare Web Analytics
2 parents d9c1fd0 + 8bd43aa commit 23aeb20

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
3232
- [Google Analytics](https://www.google.com/analytics/web/)
3333
- [Google Tag Manager](https://www.google.com/tagmanager/)
3434
- [Matomo Analytics (formerly Piwik)](https://matomo.org/)
35+
- [Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics/)
3536
- [Plausible](https://plausible.io/)
3637
- [StatusCake](https://www.statuscake.com/)
3738
- [Isso](https://posativ.org/isso/)

templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
{% include "partial/matomo.html" %}
183183
{% include 'partial/github.html' %}
184184
{% include 'partial/stork.html' %}
185+
{% include 'partial/cf_analytics.html' %}
185186

186187
{% block additional_js %}{% endblock %}
187188
</body>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% if CLOUDFLARE_WEB_ANALYTICS_TOKEN %}
2+
<script defer
3+
src='https://static.cloudflareinsights.com/beacon.min.js'
4+
data-cf-beacon='{"token": "{{ CLOUDFLARE_WEB_ANALYTICS_TOKEN }}"}'>
5+
</script>
6+
{% endif %}

0 commit comments

Comments
 (0)