Closed alvarlagerlof closed 2 years ago
Hi @alvarlagerlof,
That's because you are including the script in development mode. I don't think there is a way to tell the plausible script to disable logging apart from disabling it (which happens by default in development mode). You can enable the trackLocalhost
prop to get rid of the warning (but the events will be sent to the server) as described in this answer.
Let me know if that helps.
Right, didn't realize it was their script doing that. Tracking localhost would make the stats off so not going to do that. Is there a way to disable the whole thing in localhost?
Hi @alvarlagerlof,
Sorry for the late reply.
I don't know of a way to disable this on localhost. I don't know if nextjs exposes some kind of config variable with the domain. If that were the case you could pass the enabled
property to PlausibleProvider
checking that. But again, I am not sure that's possible.
I see. It's okay. Just a minor nitpick.
I am getting a bunch of
WARNING Ignoring Event: localhost
that end up showing up in my build due to my setup. CoudPlausibleProvider
have some kind of prop to disable logging?