hotjar-snippet.js 620 B

123456789101112131415
  1. // tracking code from https://help.hotjar.com/hc/en-us/articles/115009336727-How-to-Install-Your-Hotjar-Tracking-Code
  2. export const initializeHotjar = (hotjarId, hotjarVersion) =>
  3. (function (h, o, t, j, a, r) {
  4. h.hj =
  5. h.hj ||
  6. function () {
  7. ;(h.hj.q = h.hj.q || []).push(arguments)
  8. }
  9. h._hjSettings = { hjid: hotjarId, hjsv: hotjarVersion }
  10. a = o.getElementsByTagName('head')[0]
  11. r = o.createElement('script')
  12. r.async = 1
  13. r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv
  14. a.appendChild(r)
  15. })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=')