mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
Merge pull request #768 from nunocoracao/766---fix-analytics-partial
🐛 Fix and refactor analytics
This commit is contained in:
@@ -113,7 +113,6 @@ smartTOCHideUnfocusedChildren = true
|
|||||||
cardView = true
|
cardView = true
|
||||||
cardViewScreenWidth = false
|
cardViewScreenWidth = false
|
||||||
|
|
||||||
|
|
||||||
[firebase]
|
[firebase]
|
||||||
apiKey = "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY"
|
apiKey = "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY"
|
||||||
authDomain = "blowfish-21fff.firebaseapp.com"
|
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" }}
|
|
||||||
@@ -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 async src="https://www.googletagmanager.com/gtag/js?id={{ site.Config.Services.GoogleAnalytics.ID }}"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
@@ -6,5 +5,4 @@
|
|||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', '{{ site.Config.Services.GoogleAnalytics.ID }}');
|
gtag('config', '{{ site.Config.Services.GoogleAnalytics.ID }}');
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
|
||||||
@@ -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 */}}
|
{{/* Vendor */}}
|
||||||
{{ partial "vendor.html" . }}
|
{{ partial "vendor.html" . }}
|
||||||
{{/* Analytics */}}
|
{{/* Analytics */}}
|
||||||
{{ partial "analytics.html" .Site }}
|
{{ partial "analytics/main.html" .Site }}
|
||||||
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
|
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
|
||||||
{{ if templates.Exists "partials/extend-head.html" }}
|
{{ if templates.Exists "partials/extend-head.html" }}
|
||||||
{{ partialCached "extend-head.html" .Site }}
|
{{ partialCached "extend-head.html" .Site }}
|
||||||
|
|||||||
Reference in New Issue
Block a user