We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 115d315 commit 5e434dcCopy full SHA for 5e434dc
src/runtime/plugin.client.ts
@@ -1,6 +1,7 @@
1
import type {} from 'nuxt/app'
2
import { defineNuxtPlugin, useRuntimeConfig } from '#imports'
3
import { createPlausibleTracker } from '@barbapapazes/plausible-tracker'
4
+import { withLeadingSlash } from 'ufo'
5
6
export default defineNuxtPlugin({
7
name: 'plausible',
@@ -14,7 +15,7 @@ export default defineNuxtPlugin({
14
15
...options,
16
logIgnored: options.logIgnoredEvents,
17
domain: options.domain || window.location.hostname,
- apiHost: options.proxy ? options.proxyBaseEndpoint : options.apiHost,
18
+ apiHost: options.proxy ? withLeadingSlash(options.proxyBaseEndpoint) : options.apiHost,
19
})
20
21
return {
0 commit comments