Add HotJar on few pages.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 8 Feb 2019 10:28:45 +0000 (11:28 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 8 Feb 2019 10:28:45 +0000 (11:28 +0100)
src/catalogue/templates/catalogue/book_detail.html
src/catalogue/templates/catalogue/tagged_object_list.html
src/wolnelektury/templates/hotjar.html [new file with mode: 0644]
src/wolnelektury/templates/main_page.html

index 865aca2..ecae89e 100644 (file)
 
 {% block bodyid %}book-detail{% endblock %}
 
+{% block extrahead %}
+{{ block.super }}
+{% if request.path == '/katalog/lektura/pan-tadeusz/' %}
+{% include "hotjar.html" %}
+{% endif %}
+{% endblock %}
+
+
 {% block body %}
   {% include 'catalogue/book_wide.html' %}
 
index f4ba699..285af0a 100644 (file)
@@ -5,6 +5,15 @@
 
 {% block titleextra %}{% if tags %}{% title_from_tags tags %}{% elif list_type == 'gallery' %}{% trans "Gallery" %}{% elif list_type == 'audiobooks' %}{% trans "Audiobooks" %}{% else %}{% trans "Literature" %}{% endif %}{% endblock %}
 
+
+{% block extrahead %}
+{{ block.super }}
+{% if request.path == '/katalog/lektury/' or request.path == '/katalog/audiobooki/' %}
+{% include "hotjar.html" %}
+{% endif %}
+{% endblock %}
+
+
 {% block bodyid %}tagged-object-list{% endblock %}
 
 {% block body %}
diff --git a/src/wolnelektury/templates/hotjar.html b/src/wolnelektury/templates/hotjar.html
new file mode 100644 (file)
index 0000000..03d8e37
--- /dev/null
@@ -0,0 +1,11 @@
+<!-- Hotjar Tracking Code for www.wolnelektury.pl -->
+<script>
+    (function(h,o,t,j,a,r){
+        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
+        h._hjSettings={hjid:1162698,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>
index 7912c24..4a627e6 100755 (executable)
 {% block title %}{% trans "Wolne Lektury internet library" %}{% endblock %}
 {% block ogtitle %}{% trans "Wolne Lektury internet library" %}{% endblock %}
 
+{% block extrahead %}
+{{ block.super }}
+{% include "hotjar.html" %}
+{% endblock %}
+
 {% block body %}
   {% spaceless %}
     {% if cite %}