Skip to content

Commit

Permalink
feat: updates documentation and corrects the case of the hotjar id const
Browse files Browse the repository at this point in the history
  • Loading branch information
henk-badenhorst committed Jun 28, 2024
1 parent 0c3bd3a commit e7ee7ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ app.mount("#app");

### id:

Your Hotjar Site ID is a required parameter with a type of number. You can find this ID at insights.hotjar.com under tracking.
Your Hotjar Site ID is a required parameter, this can be of type string or number. You can find this ID [here](insights.hotjar.com) under tracking.

```js
id: 12345678
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default {
}

if (isHotjarOptionsValid(options) && isVueVersionValid(app)) {
const HotjarId = typeof options.id === 'string' ? parseInt(options.id) : options.id;
new Hotjar(HotjarId, options.snippetVersion, options.isProduction);
const hotjarId = typeof options.id === 'string' ? parseInt(options.id) : options.id;
new Hotjar(hotjarId, options.snippetVersion, options.isProduction);
if (window.hj) {
app.config.globalProperties.$hj = window.hj;
app.config.globalProperties.$hjSettings = window._hjSettings;
Expand Down

0 comments on commit e7ee7ec

Please sign in to comment.