moritzsternemann / vue-plausible

Plausible Analytics Vue.js Plugin and NuxtJS Module
MIT License
120 stars 8 forks source link

Domain attribute incorrectly adds https:// preventing plausible from receving events #14

Closed blackspike closed 2 years ago

blackspike commented 2 years ago

Hi, weird issue with nuxt integration – I've set the domain attribute to the bare domain 'spike.news' but the plausible post has 'https://' added to it which stops plausible from tracking the domain?

image image

You can see it on the live site https://spike.news/ – any ideas? I've tried with and without module options in nuxt.config.js with same results. Many thanks!

moritzsternemann commented 2 years ago

Hey @blackspike! I couldn't reproduce your issue with a quick test. It would be awesome if you could send me a minimum example where this behavior occurs. Also it might be interesting what browser you are using 🤔

blackspike commented 2 years ago

omg I am a moron!!! I'd previously set the plausible domain in the publicRuntimeConfig config and that was overriding it. Sorry to have wasted your time and thanks for the great plugin!

  // Dotenv
  publicRuntimeConfig: {
    plausible: {
      domain: 'https://spike.news/',
    },
  },