hotjar / hotjar-js

Bring Hotjar directly to your application
https://hotjar.github.io/hotjar-js/
MIT License
49 stars 8 forks source link

Add Support for Events API #9

Closed bobbyg603 closed 2 years ago

bobbyg603 commented 3 years ago

We would prefer to use this package instead of the generated script tag via the site. Unfortunately, there is no formal support for adding events in this package that matches the Events API doc on the hotjar site.

Workaround is to import executeHotjarCommand from utils (awkward) and override the provided type to use the 'event' command (also awkward).

Are there any plans to improve support in this SDK? It would be a much nicer experience in web apps than the current auto-generated old-school script tag...

Thanks!

arrwhidev commented 2 years ago

@bobbyg603 Your MR has been merged and published to npm (v1.0.4).

Thank you for raising & implementing this change, and thanks for using Hotjar!

bobbyg603 commented 2 years ago

@arrwhidev thank you for merging this change! hotjar has been great so far, thanks for your support!