Javascript Error (Illegal Invocation & Cannot Read Properties of Undefined)

Topic summary

A Shopify store owner discovered JavaScript errors appearing in Microsoft Clarity analytics recordings on February 29, 2024. The errors include \

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hey there.

I have my site connected to Microsoft Clarity for analytics.

And today on 02/29/24, looking at the recordings; it showed me I have some Javascript errors on my website.

Illegal Invocation & Cannot Read Properties of Undefined (reading ‘dataset’)

Now, when i see the recordings (it was only 4 recordings that it happened on)

the users were on a linux device apparently. Mobile & Desktop. I have attached the screenshots.

And also looking at the recording, it seems it’s coming from the t-shirt product.

Seems the user came from FB directly to the t-shirt product, never clicked or scrolled anything on the page

But somehow it showed me that error.

Unless, it was on the user’s end directly.

i added the link to my website below & I also added the link of the t-shirt product as well.

I am honestly not a coder or developer nor do I have a developer or anything.

So, not sure how major that issue can be or if there’s a way to fix it.

Would appreciate the help..

g3xfitness.com (main website)

https://g3xfitness.com/products/g3x-flexfit-quickdry-muscle-t-shirt (t shirt link)

I’m having exactly the same issues for multiple of our clients. Can’t figure out what to fix unfortunately..