Add Heatlytics to your site

One script for websites, and an SDK for React Native and Expo apps.

Website

  1. Copy the snippet with your environment’s key.
  2. Paste it before the closing head tag.
  3. Open your site. The visit appears in Recordings.
<script>
  (function (w, host, key) {
    w.heatlytics = w.heatlytics || { q: [] }
    ;['init', 'identify', 'setUserProperties', 'event', 'optIn', 'optOut', 'abort', 'getSessionId'].forEach(function (n) {
      w.heatlytics[n] = w.heatlytics[n] || function () { w.heatlytics.q.push([n, [].slice.call(arguments)]) }
    })
    w.heatlytics.init({ key: key, host: host })
  })(window, 'https://app.heatlytics.io', 'hl_pub_YOUR_KEY')
</script>
<script async src="https://app.heatlytics.io/sdk/heatlytics-<version>.min.js" integrity="sha384-<hash>" crossorigin="anonymous"></script>
Your key
Each environment has its own, under Settings, Install.
The host
Where Heatlytics runs. Allow it for scripts and connections if you use a Content Security Policy.
Async
The script is under 40 KB gzipped and doesn’t hold up your page.
Integrity hash
The browser refuses the script if its bytes ever change. The bundle uses no eval.

From there it records sessions for replay, heatmaps and frustration signals, and captures clicks, inputs, form submits and page changes on its own.

React Native and Expo

Sends sessions, screens, custom events and users to the same place as your website data, where they appear under Events, Users, Pages, Flows, Funnels and Reports. Needs React Native 0.72 or newer.

What it doesn’t do. It doesn’t record the screen, so there’s no session replay, no automatic tap capture and no heatmaps for apps. The package isn’t published on npm yet: ask us about access when you request a demo.

import * as Heatlytics from '@heatlytics/sdk-react-native'

Heatlytics.init({ key: 'hl_pub_YOUR_KEY', host: 'https://app.heatlytics.io' })
Heatlytics.screen('Home')
Heatlytics.identify('user-123')
Heatlytics.event('booking_paid', { amount: 250 })

What each one does

ScriptMobile SDK
Sessions, users and custom eventsYesYes
Pages or screensYesYes
Consent: optIn, optOut and abortYesYes
Clicks captured automaticallyYesNo
Session replayYesNo
HeatmapsYesNo

There are no ready-made integrations with other products yet.

Need your key?

Keys come with an account, and accounts start with a demo. Tell us about your site and we’ll get you set up.

Request a demo