Coder Social home page Coder Social logo

the-bugging / react-use-hotjar Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 6.0 3.51 MB

Adds Hotjar capabilities as custom hooks such as init, identify and stateChange

Home Page: https://www.npmjs.com/package/react-use-hotjar

License: MIT License

JavaScript 26.04% TypeScript 71.28% HTML 2.10% Shell 0.58%
custom-hooks hooks hotjar identifying-users react statechange typescript

react-use-hotjar's People

Contributors

ajayvarghese avatar allcontributors[bot] avatar gianpietro1 avatar luighiv avatar olavoparno avatar quentinluc avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-use-hotjar's Issues

Support "hjdebug" in Hotjar initiate function

Is your feature request related to a problem? Please describe.
I think it will be better if hotjar debug feature is included in this library. I don't see any option to enable it.

Describe the solution you'd like
Hotjar provides a debug feature that you can enable in the hotjar script. I think we can add that as a parameter to this function
More on Debug Feature here

Additional context
I am just curious why this is excluded in the library. Is there any particular reason?

Initialising hotjar after cookie consent

In nextjs, I have a cookie consent banner, where I want to initialize tracking (including hotjar), after an onClick.

However, it seems that with nextjs and hotjar, it needs to be initialized in useEffect(). Is there any way to initialize hotjar after an onclick event?

Broken sourcemaps add noise to create-react-app v5 output

Describe the bug

Broken sourcemaps add noise to create-react-app v5 output:

Compiled with warnings.

Failed to parse source map from '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/dependencies.ts' file: Error: ENOENT: no such file or directory, open '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/dependencies.ts'

Failed to parse source map from '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/index.ts' file: Error: ENOENT: no such file or directory, open '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/index.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

assets by status 9.52 KiB [cached] 2 assets
assets by status 1.49 MiB [emitted]
  assets by chunk 1.49 MiB (name: main)
    asset static/js/bundle.js 1.48 MiB [emitted] (name: main) 1 related asset
    asset main.77f586b74a9aca0e9655.hot-update.js 4.58 KiB [emitted] [immutable] [hmr] (name: main) 1 related asset
  assets by path *.json 699 bytes
    asset asset-manifest.json 671 bytes [emitted]
    asset main.77f586b74a9aca0e9655.hot-update.json 28 bytes [emitted] [immutable] [hmr]
  asset index.html 1.67 KiB [emitted]
Entrypoint main 1.49 MiB (1.51 MiB) = static/js/bundle.js 1.48 MiB main.77f586b74a9aca0e9655.hot-update.js 4.58 KiB 3 auxiliary assets
cached modules 1.37 MiB [cached] 107 modules
runtime modules 31.4 KiB 15 modules
./src/App.js 2.68 KiB [built] [code generated]

WARNING in ./node_modules/react-use-hotjar/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/dependencies.ts' file: Error: ENOENT: no such file or directory, open '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/dependencies.ts'
 @ ./src/App.js 8:0-41 14:2-11 63:10-19
 @ ./src/index.js 7:0-24 11:33-36

WARNING in ./node_modules/react-use-hotjar/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/index.ts' file: Error: ENOENT: no such file or directory, open '/path/cra-react-use-hotjar/node_modules/react-use-hotjar/src/index.ts'
 @ ./src/App.js 8:0-41 14:2-11 63:10-19
 @ ./src/index.js 7:0-24 11:33-36

2 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.69.0 compiled with 2 warnings in 136 ms

To Reproduce
Steps to reproduce the behavior:

  1. npx create-react-app cra-use-hotjar
  2. cd cra-use-hotjar
  3. npm i react-use-hotjar
  4. add useHotjar() to src/App.js
  5. npm start

Additional context
facebook/create-react-app#11767 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.