abdalla / react-hotjar

Small component to implement Hotjar into your react application
MIT License
165 stars 32 forks source link

Add new Hotjar APIs #32

Closed andrewda closed 2 years ago

andrewda commented 2 years ago

Hello :wave:

This PR adds two new Hotjar APIs: event and stateChange. See documentation for these two functions here! For all API calls, we now also check to make sure Hotjar has been initialized to avoid "window.hj is not defined" error messages.

Additionally, this fixes the identify API added in https://github.com/abdalla/react-hotjar/pull/28.