diff --git a/layouts/partials/css.html b/layouts/partials/css.html
index fc2f3c73a..04ffe2604 100644
--- a/layouts/partials/css.html
+++ b/layouts/partials/css.html
@@ -24,7 +24,7 @@
{{ end }}
-{{ if .IsDescendant (.GetPage "/docs") }}
+{{ if or (.IsDescendant (.GetPage "/docs")) (.InSection (.GetPage "/docs")) }}
{{ if not (eq . (.GetPage "/docs"))}}
{{ $folder := . }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index c6b75d948..791c63c7d 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -29,7 +29,7 @@
-{{ if .IsDescendant (.GetPage "/docs") }}
+{{ if or (.IsDescendant (.GetPage "/docs")) (.InSection (.GetPage "/docs")) }}
{{ end }}
@@ -83,17 +83,21 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-{{ if (and (.Site.Params.hotjarTracking) (.IsDescendant (.GetPage "/docs")) (eq .Site.Language.Lang "en")) }}
-
+{{ if eq .Site.Language.Lang "en" }}
+ {{ if .Site.Params.hotjarTracking }}
+ {{ if or (.IsDescendant (.GetPage "/docs")) (.InSection (.GetPage "/docs")) }}
+
+ {{ end }}
+ {{ end }}
{{ end }}