diff --git a/showcase/src/components/settings.js b/showcase/src/components/settings.js index bd14321..3e6a6a6 100644 --- a/showcase/src/components/settings.js +++ b/showcase/src/components/settings.js @@ -79,13 +79,17 @@ export default class Settings { insight(isWallpaperEngine, doNotTrack) { this.isWallpaperEngine = isWallpaperEngine - if (this.#isInsightInited) return + if (this.#isInsightInited || import.meta.env.MODE === 'development') return this.#isInsightInited = true this.#doNotTrack = doNotTrack if (this.#doNotTrack) return try { + const config = { + path: `/${import.meta.env.VITE_LINK}` + } + if (this.isWallpaperEngine) config.hostname = "file://wallpaperengine.local"; window.counterscale = { - q: [["set", "siteId", import.meta.env.VITE_INSIGHT_ID], ["trackPageview", {path: `/${import.meta.env.VITE_LINK}`}]], + q: [["set", "siteId", import.meta.env.VITE_INSIGHT_ID], ["trackPageview", config]], }; window.counterscaleOnDemandTrack(); } catch(e) {