abdalla / react-hotjar

Small component to implement Hotjar into your react application
MIT License
165 stars 32 forks source link

Cannot read properties of undefined (reading 'site_id') #67

Open Nickfis opened 5 months ago

Nickfis commented 5 months ago

Not sure exactly what happened, but on our site we now often get the error Cannot read properties of undefined (reading 'site_id'), which in the stack trace looks like a hotjar error:

Screenshot 2024-03-14 at 10 30 36
t.g [as send](c/hotjar)

Is this a known issue? I've tried updating to version 6.2, but that hasn't changed things. Right now we only initalize hotjar and do nothing else:

import { hotjar } from "react-hotjar";
hotjar.initialize(id, version);

Let me know if you want me to give you any additional info as it's quite scarce so far, but I just wanted to know whether this is a known issue (quick googling couldn't find anything).

sergei-lobanov commented 4 months ago

Same issue

abdalla commented 4 months ago

Hey guys, I'm pressed for time to maintain the lib, could someone open a PR with the fix?