New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-use-hotjar

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use-hotjar - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.0.11](https://github.com/olavoparno/react-use-hotjar/compare/v1.0.10...v1.0.11) (2021-03-08)
### [1.0.10](https://github.com/olavoparno/react-use-hotjar/compare/v1.0.9...v1.0.10) (2021-02-23)

@@ -7,0 +9,0 @@

4

dist/index.d.ts
declare type TUseHotjar = {
initHotjar: (hotjarId: string, hotjarVersion: string, logCallback?: () => void) => boolean;
identifyHotjar: (userId: string, userInfo: string | unknown, logCallback?: () => void) => boolean;
initHotjar: (hotjarId: number, hotjarVersion: number, logCallback?: (...data: unknown[]) => void) => boolean;
identifyHotjar: (userId: string, userInfo: string | unknown, logCallback?: (...data: unknown[]) => void) => boolean;
};
export declare function useHotjar(): TUseHotjar;
export default useHotjar;
{
"name": "react-use-hotjar",
"version": "1.0.10",
"version": "1.0.11",
"description": "Adds Hotjar capabilities as custom hooks",

@@ -5,0 +5,0 @@ "author": "Olavo Parno",

@@ -9,2 +9,4 @@ <img align="right" alt="traffic" src="https://pv-badge.herokuapp.com/total.svg?repo_id=olavoparno-react-use-hotjar"/>

[Preview-me](https://codesandbox.io/s/react-use-hotjar-dkcjp)
---

@@ -17,2 +19,3 @@

- [Documentation](#documentation)
- [Contributors](#contributors)
- [License](#license)

@@ -45,3 +48,3 @@

initHotjar(1234567, 6, myCustomLogger);
});
}, [initHotjar]);

@@ -52,3 +55,3 @@ return <App />;

- Identifying Users (Use it wherever user's information is available. Send __stringified__ preferably so that error handling is at this level.)
- Identifying Users (Use it wherever user's information is available. Send **stringified** preferably so that error handling is at this level.)

@@ -68,6 +71,3 @@ ```tsx

identifyHotjar(
id,
informationStringified
);
identifyHotjar(id, informationStringified);
};

@@ -83,2 +83,9 @@ };

- An object with the following keys:
| key | description | arguments | example |
| -------------- | ------------------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| initHotjar | Initialize method | (hotjarId: number, hotjarVersion: number, loggerCallback?: console[method]) | (1933331, 6, console.info) |
| identifyHotjar | User identify API method | (userId: string, userInfo: json object, loggerCallback?: console[method]) | ('abcde-12345-12345', JSON.stringify({name:"Olli",surname:"Parno",address:"Streets of Tomorrow"}), console.log) |
- initHotjar()

@@ -101,11 +108,8 @@

1. `userId`: Unique user's identification as string
2. `userInfo`: Stringfied user info of key-value pairs (note this must not be so long and deep according to [docs](https://help.hotjar.com/hc/en-us/articles/360033640653-Identify-API-Reference)) (Please note: __The Identify API is only available to Business plan customers.__)
2. `userInfo`: Stringfied user info of key-value pairs (note this must not be so long and deep according to [docs](https://help.hotjar.com/hc/en-us/articles/360033640653-Identify-API-Reference)) (Please note: **The Identify API is only available to Business plan customers.**)
3. `logCallback`: Optional callback for logging wether Hotjar identified user or not
```tsx
identifyHotjar: (
userId: string,
userInfo: string,
logCallback?: () => void
) => boolean;
identifyHotjar: (userId: string, userInfo: string, logCallback?: () => void) =>
boolean;
```

@@ -115,2 +119,25 @@

## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://olavoparno.github.io"><img src="https://avatars1.githubusercontent.com/u/7513162?v=4?s=70" width="70px;" alt=""/><br /><sub><b>Olavo Parno</b></sub></a><br /><a href="#ideas-olavoparno" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/olavoparno/react-use-hotjar/commits?author=olavoparno" title="Code">💻</a> <a href="https://github.com/olavoparno/react-use-hotjar/commits?author=olavoparno" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/gianpietro1"><img src="https://avatars.githubusercontent.com/u/10046142?v=4?s=70" width="70px;" alt=""/><br /><sub><b>Gianpietro Lavado</b></sub></a><br /><a href="https://github.com/olavoparno/react-use-hotjar/commits?author=gianpietro1" title="Documentation">📖</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
---
## License

@@ -117,0 +144,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc