Closed gambolputty closed 3 years ago
Hey @gambolputty!
When you call Plausible()
like in you snippet, a new instance of the plausible tracker is created with the default settings.
The event duplication is then caused by having two instances of the tracker, one with your apiHost
, created by the Nuxt module and configured in nuxt.config.js
. The second instance is initialized by the call in your layout file.
If you want to access the plausible tracker instance in any of you components, including layouts, I suggest to use the properties explained in the Usage section of the README.
My mistake. Thanks for clarifying! Will close this issue now.
Hello!
In my Nuxt app the request to
/api/event
is emitted twice. The first request is targeted at my custom host defined in theapiHost
property innuxt.config.js
(self-hosted Plausible instance). The second one is sent tohttps://plausible.io/api/event
. Is this intentional?This code is executed in my layout file when mounted: