plausible / plausible-tracker

Frontend library to interact with Plausible Analytics
https://github.com/plausible/plausible-tracker
MIT License
214 stars 46 forks source link

Porperty 'location' doesn't exist #48

Open Jackyang-SS opened 2 years ago

Jackyang-SS commented 2 years ago

Versions

react-native: 0.66 plausible-tracker: 0.3.8

Describe the bug

When I call the function "trackEvent" and "trackPageview", android and ios will show the error like below:

ERROR ReferenceError: Property 'location' doesn't exist

This error is located at: in App in RCTView (at View.js:32) in View (at AppContainer.js:92) in RCTView (at View.js:32) in View (at AppContainer.js:119) in AppContainer (at renderApplication.js:43) in test(RootComponent) (at renderApplication.js:60), js engine: hermes

Anyone met this problem and how to solve it ?

Jackyang-SS commented 1 year ago

I manually changed something in the tracker.js like set status value to url which used the "location" (where the errors come from), then it changed to 'document' is not exist. so I did try to previous version, the previous versions are all the same like this version ? Any solution and any one how to use it successfully ?

chohra-med commented 1 year ago

Facing the same issue with RN0.71.6, and plausible-tracker:0.3.8

Daniel15 commented 11 months ago

It looks like this library is only built for usage in a browser at the moment.