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

github.com/themefisher/academia-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Brorsson <mats@embeinnovation.com>2020-12-10 12:06:19 +0300
committerMats Brorsson <mats@embeinnovation.com>2020-12-10 12:06:19 +0300
commitbd7e3f20a49797e510af178d567c9ccd78151ae9 (patch)
tree6f98af636de6d32d01a53436ce7274df470299ff
parentf4d5eba11eb87ca180bde088483d2a8c339e5431 (diff)
added support for MS clarity
-rw-r--r--exampleSite/config/_default/params.toml3
-rw-r--r--layouts/partials/site_head.html9
2 files changed, 12 insertions, 0 deletions
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index 9c7a0e9..57cec4a 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -1,6 +1,9 @@
# SITE SETUP
# Documentation: https://sourcethemes.com/academic/
+# marketing
+microsoft_clarity = ""
+
# Color theme.
# Choose from `default`, `ocean`, `forest`, `dark`, `apogee`, `1950s`, `coffee`, `cupcake`, `strawberry`.
color_theme = "default"
diff --git a/layouts/partials/site_head.html b/layouts/partials/site_head.html
index dd8b409..e3d0ea2 100644
--- a/layouts/partials/site_head.html
+++ b/layouts/partials/site_head.html
@@ -118,6 +118,15 @@
{{ end }}
{{ if not site.IsServer }}
+ {{ if site.Params.microsoft_clarity }}
+ <script type="text/javascript">
+ (function(c,l,a,r,i,t,y){
+ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
+ t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
+ y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
+ })(window, document, "clarity", "script", "{{ site.Params.microsoft_clarity }}");
+ </script>
+ {{ end }}
{{ if site.GoogleAnalytics }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;