mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Add page view counter
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
{{- if .Site.Config.Services.GoogleAnalytics.ID }}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||
<script>
|
||||
<script async>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
@@ -24,4 +24,10 @@
|
||||
{{- if gt (len $val) 0 }}
|
||||
<script src="{{ $val }}"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Site.Params.goatCounter }}
|
||||
<script data-goatcounter="https://{{ .Site.Params.goatCounter }}/count"
|
||||
data-goatcounter-settings='{"path": "{{ .RelPermalink }}"}'
|
||||
async src="//gc.zgo.at/count.js"></script>
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user