0.0.2 • Published 3 years ago

hotjar-loader v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

hotjar-loader

Async loader for the Hotjar JS API written in typescript with promises.

This package makes no changes to the functionality of the Hotjar JS API, it merely provides an easy way to load it asynchronously and then execute calls against the API in a Typescript project.

Installation

$ npm install --save hotjar-loader

Usage

import { Hotjar, Loader } from 'hotjar-loader';

const loader = new Loader(yourHjid, yourHjsv);
loader.load().then((hotjar: Hotjar) => {
  hotjar.identify(userId);
});

The API only supports the identify call, which is documented here