Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hotjar/browser

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hotjar/browser - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

CHANGELOG.md

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

### 1.0.6 (2022-05-30)
### 1.0.5 (2021-12-08)

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

3

dist/index.d.ts

@@ -0,4 +1,5 @@

import type { InitOpts } from './utils';
declare type UserInfo = Record<string | number, string | number | Date | boolean>;
declare const Hotjar: {
init: (hotjarId: number, hotjarVersion: number) => boolean;
init: (hotjarId: number, hotjarVersion: number, opts?: InitOpts | undefined) => boolean;
event: (actionName: string) => boolean;

@@ -5,0 +6,0 @@ identify: (userId: string | null, userInfo: UserInfo) => boolean;

@@ -1,2 +0,2 @@

const r=()=>"undefined"!=typeof window,t=()=>!(!r()||!window.hj),e=(t,...e)=>{if(r()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},n=(r,e)=>{if(!((r,t)=>{try{const e=document.getElementById(t)||document.createElement("script");return e.id=t,e.innerText=r,e.crossOrigin="anonymous",document.head.appendChild(e),!0}catch(r){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${r},hjsv:${e}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script")||!t())throw Error("Failed to initialize Hotjar tracking script.")},o={init:(r,t)=>{try{return n(r,t),!0}catch(r){return console.error("Error:",r),!1}},event:r=>{try{return e("event",r),!0}catch(r){return console.error("Error:",r),!1}},identify:(r,t)=>{try{return e("identify",r,t),!0}catch(r){return console.error("Error:",r),!1}},stateChange:r=>{try{return e("stateChange",r),!0}catch(r){return console.error("Error:",r),!1}},isReady:t};export default o;
const r=()=>"undefined"!=typeof window,t=()=>!(!r()||!window.hj),e=(t,...e)=>{if(r()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},n=(r,e,n)=>{if(!((r,t)=>{try{const e=document.getElementById(t)||document.createElement("script");return e.id=t,e.innerText=r,e.crossOrigin="anonymous",document.head.appendChild(e),!0}catch(r){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${r},hjsv:${e},hjdebug:${(null==n?void 0:n.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script")||!t())throw Error("Failed to initialize Hotjar tracking script.")},o={init:(r,t,e)=>{try{return n(r,t,e),!0}catch(r){return console.error("Error:",r),!1}},event:r=>{try{return e("event",r),!0}catch(r){return console.error("Error:",r),!1}},identify:(r,t)=>{try{return e("identify",r,t),!0}catch(r){return console.error("Error:",r),!1}},stateChange:r=>{try{return e("stateChange",r),!0}catch(r){return console.error("Error:",r),!1}},isReady:t};export default o;
//# sourceMappingURL=index.esm.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=()=>"undefined"!=typeof window,t=()=>!(!r()||!window.hj),e=(t,...e)=>{if(r()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},n=(r,e)=>{if(!((r,t)=>{try{const e=document.getElementById(t)||document.createElement("script");return e.id=t,e.innerText=r,e.crossOrigin="anonymous",document.head.appendChild(e),!0}catch(r){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${r},hjsv:${e}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script")||!t())throw Error("Failed to initialize Hotjar tracking script.")},o={init:(r,t)=>{try{return n(r,t),!0}catch(r){return console.error("Error:",r),!1}},event:r=>{try{return e("event",r),!0}catch(r){return console.error("Error:",r),!1}},identify:(r,t)=>{try{return e("identify",r,t),!0}catch(r){return console.error("Error:",r),!1}},stateChange:r=>{try{return e("stateChange",r),!0}catch(r){return console.error("Error:",r),!1}},isReady:t};exports.default=o;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=()=>"undefined"!=typeof window,t=()=>!(!r()||!window.hj),e=(t,...e)=>{if(r()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},n=(r,e,n)=>{if(!((r,t)=>{try{const e=document.getElementById(t)||document.createElement("script");return e.id=t,e.innerText=r,e.crossOrigin="anonymous",document.head.appendChild(e),!0}catch(r){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${r},hjsv:${e},hjdebug:${(null==n?void 0:n.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script")||!t())throw Error("Failed to initialize Hotjar tracking script.")},o={init:(r,t,e)=>{try{return n(r,t,e),!0}catch(r){return console.error("Error:",r),!1}},event:r=>{try{return e("event",r),!0}catch(r){return console.error("Error:",r),!1}},identify:(r,t)=>{try{return e("identify",r,t),!0}catch(r){return console.error("Error:",r),!1}},stateChange:r=>{try{return e("stateChange",r),!0}catch(r){return console.error("Error:",r),!1}},isReady:t};exports.default=o;
//# sourceMappingURL=index.js.map
declare type HotjarCommand = 'event' | 'identify' | 'stateChange';
export declare type InitOpts = {
debug?: boolean;
};
export interface WindowWithHotjar extends Window {

@@ -7,3 +10,3 @@ hj?: (method: HotjarCommand, ...data: unknown[]) => void;

export declare const executeHotjarCommand: (command: HotjarCommand, ...args: unknown[]) => void;
export declare const initScript: (hotjarId: number, hotjarVersion: number) => void;
export declare const initScript: (hotjarId: number, hotjarVersion: number, opts?: InitOpts | undefined) => void;
export {};
{
"name": "@hotjar/browser",
"version": "1.0.5",
"version": "1.0.6",
"description": "Bring Hotjar directly to your application",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -27,2 +27,7 @@ # @hotjar/browser

Hotjar.init(siteId, hotjarVersion);
// Initializing with `debug` option:
Hotjar.init(siteId, hotjarVersion, {
debug: true
});
```

@@ -29,0 +34,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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