If you only initialize Hotjar conditionally based certain criteria (e.g. only on a production environment), you need to check it's been initialized before using the module elsewhere in the codebase, otherwise it will throw an error. This adds a helper function to make that check.
If you only initialize Hotjar conditionally based certain criteria (e.g. only on a production environment), you need to check it's been initialized before using the module elsewhere in the codebase, otherwise it will throw an error. This adds a helper function to make that check.