feat: add analytics support for GoatCounter (#1526)
This commit is contained in:
parent
1a01c35e52
commit
90693ff95e
4 changed files with 17 additions and 1 deletions
|
@ -34,7 +34,7 @@
|
|||
- Built-in Search
|
||||
- Atom Feeds
|
||||
- PWA
|
||||
- Google Analytics
|
||||
- Google Analytics / GoatCounter
|
||||
- SEO & Performance Optimization
|
||||
|
||||
## Documentation
|
||||
|
|
|
@ -52,6 +52,9 @@ google_site_verification: # fill in to your verification string
|
|||
google_analytics:
|
||||
id: # fill in your Google Analytics ID
|
||||
|
||||
goatcounter:
|
||||
id: # fill in your Goatcounter ID
|
||||
|
||||
# Prefer color scheme setting.
|
||||
#
|
||||
# Note: Keep empty will follow the system prefer color by default,
|
||||
|
|
8
_includes/goatcounter.html
Normal file
8
_includes/goatcounter.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<!-- GoatCounter -->
|
||||
|
||||
<script
|
||||
data-goatcounter="https://{{ site.goatcounter.id }}.goatcounter.com/count"
|
||||
async
|
||||
src="https://gc.zgo.at/count.js"
|
||||
></script>
|
||||
|
|
@ -105,4 +105,9 @@
|
|||
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
||||
{% include google-analytics.html %}
|
||||
{% endif %}
|
||||
|
||||
<!-- GoatCounter -->
|
||||
{% if site.goatcounter.id != empty and site.goatcounter.id %}
|
||||
{% include goatcounter.html %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue