mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
fixed analytics
This commit is contained in:
parent
4ec5848594
commit
c49443d765
6 changed files with 13 additions and 14 deletions
|
@ -113,7 +113,6 @@ smartTOCHideUnfocusedChildren = true
|
|||
cardView = true
|
||||
cardViewScreenWidth = false
|
||||
|
||||
|
||||
[firebase]
|
||||
apiKey = "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY"
|
||||
authDomain = "blowfish-21fff.firebaseapp.com"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{{ with site.Params.fathomAnalytics.site }}
|
||||
{{ if isset $.Params.fathomAnalytics "domain" }}
|
||||
<script defer src="https://{{ $.Params.fathomAnalytics.domain }}/script.js" data-site="{{ . }}"></script>
|
||||
{{ else }}
|
||||
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* template "_internal/google_analytics.html" . */}}
|
||||
{{ partial "ga-analytics.html" }}
|
5
layouts/partials/analytics/fathom.html
Normal file
5
layouts/partials/analytics/fathom.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ if isset site.Params.fathomAnalytics "domain" }}
|
||||
<script defer src="https://{{ site.Params.fathomAnalytics.domain }}/script.js" data-site="{{ . }}"></script>
|
||||
{{ else }}
|
||||
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
|
||||
{{ end }}
|
|
@ -1,4 +1,3 @@
|
|||
{{ if site.Config.Services.GoogleAnalytics.ID }}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
@ -6,5 +5,4 @@
|
|||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ site.Config.Services.GoogleAnalytics.ID }}');
|
||||
</script>
|
||||
{{ end }}
|
||||
</script>
|
6
layouts/partials/analytics/main.html
Normal file
6
layouts/partials/analytics/main.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{{ with site.Params.fathomAnalytics.site }}
|
||||
{{ partial "analytics/fathom.html" }}
|
||||
{{ end }}
|
||||
{{ with site.Config.Services.GoogleAnalytics.ID }}
|
||||
{{ partial "analytics/ga.html" }}
|
||||
{{ end }}
|
|
@ -113,7 +113,7 @@
|
|||
{{/* Vendor */}}
|
||||
{{ partial "vendor.html" . }}
|
||||
{{/* Analytics */}}
|
||||
{{ partial "analytics.html" .Site }}
|
||||
{{ partial "analytics/main.html" .Site }}
|
||||
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
|
||||
{{ if templates.Exists "partials/extend-head.html" }}
|
||||
{{ partialCached "extend-head.html" .Site }}
|
||||
|
|
Loading…
Reference in a new issue