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

Configure Tinylytics

  1. Add your Obsidian Publish site to your Tinylytics account.
  2. View your tracking code. It should look similar to this:
<script src="https://tinylytics.app/embed/{your embed code}" defer></script>

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 `src` value with your own unique site code.
  4. Save and publish the publish.js file to your Obsidian Publish site!
  5. Open your Tinylytics page and refresh your Obsidian Publish page. Tinylytics should recognize an active visitor to the site.
let script = document.createElement("script");
script.type = "text/javascript";
script.defer = true;
script.src = "[tinylytics.app/embed/YOU...](https://tinylytics.app/embed/YOUR_UNIQUE_SITE_CODE.js)";

More documentation can be found on the Tinylytics site.

✴️ Also on Micro.blog ✍️ Email