Obsidian Publish allows adding JavaScript, which means you can add a Plausible Analytics tracking code to your site.

Configure Plausible Analytics

  1. Create your Obsidian Publish site in your Plausible Analytics account.
  2. View your tracking code.

Configure Obsidian Publish

  1. Create a file named publish.js in the root of your Obsidian vault. Create this file from file explorer, not from within Obsidian!
  2. Copy the below script to the publish.js file.
  3. Update the with your Obsidian Publish URL.
  4. Update Your Plausible JavaScript URL with the JavaScript URL that Plausible Analytics provides to you.
  5. Save and publish the publish.js file to your Obsidian Publish site!
  6. Open your Plausible Analytics page and refresh your Obsidian Publish page. Plausible Analytics should recognize an active visitor to the site.