Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ribice/kiss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatei-Marius Micu <micumatei@gmail.com>2021-03-04 22:52:01 +0300
committerMatei-Marius Micu <micumatei@gmail.com>2021-03-05 12:17:50 +0300
commit29caab09da12a461c41f400a702679a8d516697a (patch)
treef7cd11ccb6597b7c98b46918ecdf3430a98d957d
parentf061118086d776771c6a36d007a1c016966a1c46 (diff)
Add Hotjar support
-rw-r--r--README.md5
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/analytics/hotjar.html10
-rw-r--r--layouts/partials/footer.html4
4 files changed, 19 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6e26e05..ab807b9 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,9 @@ rootURL = "//matomo.example.com/"
[params.fathomAnalytics]
rootURL = "//fathom.example.com/"
+[params.hotjarAnalytics]
+hjid = 1
+
[taxonomies]
tag ="tags"
@@ -171,7 +174,7 @@ on demand loading:
```toml
[params.features]
-disqusOnDemand = true
+disqusOnDemand = true
```
## Single Page Configuration
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 178b63e..cfbe5e6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -61,4 +61,4 @@ rootURL = "//fathom.example.com/"
tag ="tags"
[blackfriday]
-hrefTargetBlank = true \ No newline at end of file
+hrefTargetBlank = true
diff --git a/layouts/partials/analytics/hotjar.html b/layouts/partials/analytics/hotjar.html
new file mode 100644
index 0000000..61e103c
--- /dev/null
+++ b/layouts/partials/analytics/hotjar.html
@@ -0,0 +1,10 @@
+<script>
+ (function(h,o,t,j,a,r){
+ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
+ h._hjSettings={hjid:'{{ .Site.Params.hotjarAnalytics.hjid }}',hjsv:6};
+ a=o.getElementsByTagName('head')[0];
+ r=o.createElement('script');r.async=1;
+ r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
+ a.appendChild(r);
+ })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
+</script>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 707adf1..9772654 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -15,5 +15,9 @@
{{ if .Site.Params.fathomAnalytics }}
{{- partial "analytics/fathom" . -}}
{{ end }}
+
+{{ if .Site.Params.hotjarAnalytics}}
+{{- partial "analytics/hotjar" . -}}
+{{ end }}
</body>
</html>