jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.82k stars 2.47k forks source link

Using self hosted plausible for analytics doesn't work #1337

Closed DasDunkel closed 1 month ago

DasDunkel commented 1 month ago

Describe the bug When a self hosted plausible analytics instance is configured Quartz uses script.manual.js instead of script.js (automatic) This requires the site to manually trigger the view event, which Quartz seemingly doesn't do, meaning no analytics are collected at all

To Reproduce Configure analytics to use self hosted plausible, open generated website and look inside the head tags, you will see it loading https://plausible.example.com/script.manual.js instead of script.js

Expected behavior The automatic script should be loaded, or a config option should be added to specify a custom script path/URL like you did for GoatCounter, as plausible has multiple scripts that may be helpful in different use cases

Desktop (please complete the following information):

DasDunkel commented 1 month ago

After messing around further, it seems to have randomly started working(?)

If anyone else faces the same issue as me in the future, these are some of the things I did before it started working; Clear page data in your browser Clear cloudflare cache (if you use cloudflare) Ensure your configured domain includes the https://, for some reason it gets treated as a relative path instead of a domain if you forget this Get annoyed and make a issue on github, things usually fix themselves after you do this