Skip to content

Commit edb669e

Browse files
author
Pablo Vieira
committed
feat(analytics): add hotjar tracking
1 parent d1942a0 commit edb669e

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ branch: master
2727

2828
ga_tracking_code: UA-34825674-1
2929

30+
hj_id: 527097
31+
3032
default_image: https://s.gravatar.com/avatar/80fc0ea8a3a2161074feb3725901d093?s=200
3133

3234
# Posts

_config_local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ title: Pablo Vieira [local]
22

33
url: "http://localhost:4000"
44

5-
# disable google analytics
5+
# disable analytics
66
ga_tracking_code:
7+
8+
hj_id:

_includes/analytics.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@
1111
</script>
1212
<!-- Google Analytics end -->
1313
{% endif %}
14+
15+
{% if site.hj_id %}
16+
<!-- Hotjar Tracking Code for www.pv8.io -->
17+
<script>
18+
(function(h,o,t,j,a,r){
19+
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
20+
h._hjSettings={hjid:{{ site.hj_id }},hjsv:6};
21+
a=o.getElementsByTagName('head')[0];
22+
r=o.createElement('script');r.async=1;
23+
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
24+
a.appendChild(r);
25+
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
26+
</script>
27+
{% endif %}

0 commit comments

Comments
 (0)