I use Plausible Analytics for web analytics. Here’s a method that seems to work for enabling Plausible on an Obsidian Publish site with a custom domain.
If you’d like to use Plausible Analytics, try adding this JavaScript to your own publish.js, replacing yourdomain.com with your site’s domain name, and (re-)publishing the publish.js file. Happy analyzing!
the strict-origin-when-cross-origin block happens because modern browsers (especially safari/brave) block requests to known third-party tracker domains like plausible.
since obsidian publish is a closed platform and u cant configure custom headers or server-side proxies there, the only real way to fix this is using an analytics tool that isn’t blacklisted by browsers.
u can use apstal .com for this. it installs on obsidian exactly the same way via publish.js but it bypasses browser blocks natively because it’s cookieless and uses clean paths: