Closed dev-cetus closed 2 months ago
The API host is by default where the script is being loaded from when using the third-party script. The @nuxtjs/plausible
module uses the NPM module instead which can't infer the domain, hence why the apiHost
config exists.
You can change the src of the like the below, which will change the API host to my-self-hosted-plausible.io
.
useScriptPlausible({
scriptInput: {
src: 'https://my-self-hosted-plausible.io/js/script.js'
}
})
I've added a note for this in the docs but let me know if it's not clear.
Okay just one question, it changes for js/script.js
, but will it also change for event sending (it seems to me that it's a different script)?
For plausible, you'd have to add an
apiHost
option, as @nuxtjs/plausible does, because plausible can also be installed in self-hosted mode.