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

vue-hotjar-next

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-hotjar-next - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

typing.d.ts

2

index.js

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

(()=>{"use strict";var e={39:(e,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Hotjar=void 0;o.Hotjar=function(e,o,n){var t,i,r,s;n?(t=window,i=document,t.hj=t.hj||function(){(t.hj.q=t.hj.q||[]).push(arguments)},t._hjSettings={hjid:e,hjsv:o},r=i.getElementsByTagName("head")[0],(s=i.createElement("script")).async=1,s.src="https://static.hotjar.com/c/hotjar-"+t._hjSettings.hjid+".js?sv="+t._hjSettings.hjsv,r.appendChild(s)):console.log("%c 🔥 HotJar Tracking Disabled 🔥","color: #fff; background: #35495d; font-size: 14px; border-radius: 5px; padding: 10px 5px; margin: 20px 0;")}},861:(e,o)=>{function n(e){return new Promise((function(o,n){e?"number"!=typeof e?n("Hotjar option site id is of type "+typeof e+" and should a number"):o("valid"):n("Hotjar Tracking ID is not defined")}))}function t(e){return new Promise((function(o,n){"boolean"!=typeof e?n("Hotjar option isProduction is of type "+typeof e+" and should a boolean"):o("valid")}))}Object.defineProperty(o,"__esModule",{value:!0}),o.validateVueVersion=o.validateHotjarOptions=o.snippetVersion=o.isProduction=o.id=void 0,o.id=n,o.isProduction=t,o.snippetVersion=function(e){return new Promise((function(o,n){"number"!=typeof e?n("Hotjar option snippetVersion is of type "+typeof e+" and should a number"):o("valid")}))},o.validateHotjarOptions=function(e){return new Promise((function(o,i){Promise.all([n(e.id),t(e.isProduction)]).then((function(){o(!0)})).catch((function(e){console.error(e),i(!1)}))}))},o.validateVueVersion=function(e){return new Promise((function(o,n){"3"===e[0]?o(!0):(console.error("This plugin detected Vue version "+e+" but requires Vue 3.x.x"),n(!1))}))}}},o={};function n(t){var i=o[t];if(void 0!==i)return i.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,n),r.exports}n(39),n(861)})();
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(self,(function(){return(()=>{"use strict";var e={39:(e,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Hotjar=void 0;o.Hotjar=function(e,o,t){var n,i,r,s;t?(n=window,i=document,n.hj=n.hj||function(){(n.hj.q=n.hj.q||[]).push(arguments)},n._hjSettings={hjid:e,hjsv:o},r=i.getElementsByTagName("head")[0],(s=i.createElement("script")).async=1,s.src="https://static.hotjar.com/c/hotjar-"+n._hjSettings.hjid+".js?sv="+n._hjSettings.hjsv,r.appendChild(s)):console.log("%c 🔥 HotJar Tracking Disabled 🔥","color: #fff; background: #35495d; font-size: 14px; border-radius: 5px; padding: 10px 5px; margin: 20px 0;")}},861:(e,o)=>{function t(e){return new Promise((function(o,t){e?"number"!=typeof e?t("Hotjar option site id is of type "+typeof e+" and should a number"):o("valid"):t("Hotjar Tracking ID is not defined")}))}function n(e){return new Promise((function(o,t){"boolean"!=typeof e?t("Hotjar option isProduction is of type "+typeof e+" and should a boolean"):o("valid")}))}Object.defineProperty(o,"__esModule",{value:!0}),o.validateVueVersion=o.validateHotjarOptions=o.snippetVersion=o.isProduction=o.id=void 0,o.id=t,o.isProduction=n,o.snippetVersion=function(e){return new Promise((function(o,t){"number"!=typeof e?t("Hotjar option snippetVersion is of type "+typeof e+" and should a number"):o("valid")}))},o.validateHotjarOptions=function(e){return new Promise((function(o,i){Promise.all([t(e.id),n(e.isProduction)]).then((function(){o(!0)})).catch((function(e){console.error(e),i(!1)}))}))},o.validateVueVersion=function(e){return new Promise((function(o,t){"3"===e[0]?o(!0):(console.error("This plugin detected Vue version "+e+" but requires Vue 3.x.x"),t(!1))}))}}},o={};function t(n){var i=o[n];if(void 0!==i)return i.exports;var r=o[n]={exports:{}};return e[n](r,r.exports,t),r.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0});var o=t(39),i=t(861),r={install:function(e,t){var n=t.id,r=t.snippetVersion,s=void 0===r?6:r,a=t.isProduction,d=void 0===a||a;i.validateHotjarOptions({id:n,snippetVersion:s,isProduction:d})&&i.validateVueVersion(e.version)&&new o.Hotjar(n,s,d)}};e.default=r})(),n})()}));
{
"name": "vue-hotjar-next",
"version": "1.1.0",
"version": "1.2.0",
"description": "Vue 3 Hotjar plugin",
"main": "index.js",
"typings": "typing.d.ts",
"files": [
"/"
"*"
],
"types": "index.d.ts",
"repository": {

@@ -11,0 +11,0 @@ "type": "git",

<p align="center">
<img width="350" src="https://i.imgur.com/0QaBxJ9.png">
<img width="350" src="https://i.imgur.com/wLrKYPj.png">
<br>

@@ -13,4 +13,5 @@ <br>

This is a VueJs plugin that will allow you to easily add Hotjar to any Vue project.
This is a Vue 3.x.x plugin that will allow you to easily add Hotjar to any Vue project.
## Install

@@ -22,6 +23,48 @@

*Instructions to be added shortly...*
Start using it in your Vue application.
## Supported Vue Versions
```js
import { createApp } from 'vue'
import App from './App.vue'
import VueHotjar from 'vue-hotjar-next'
* Vue ^3.0.0
const app = createApp(App);
app.use(VueHotjar, {
id: 12345678,
isProduction: true,
snippetVersion: 6
});
app.mount("#app");
```
## Parameters
### 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.
```js
id: 12345678
```
### isProduction:
If you would like to disable or enable tracking this parameter is of type boolean. It is advised to bind your Node ENV variable. This is an optional parameter and will default to `true` if not defined.
```js
isProduction: true
```
### snippetVersion:
This optional parameter that will default to the latest Hotjar Snippet version. Currently, it will default to version `6`. This parameter is of type number.
```js
snippetVersion: 6
```
## Vue Compatibility
This plugin is specifically intended for use with Vue version 3. If you are using Vue version 2 please see [vue-hotjar](https://www.npmjs.com/package/vue-hotjar).
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