Add Tinylytics script to Obsidian Publish

Eric Gregorich

If you use Obsidian Publish to host your Digital Garden and want a simple and privacy-focused analytics solution to track how people view your site, then this is for you. Tinylytics is a privacy-focused and straightforward analytics service.

  1. Create a file named publish.js in your root directory.
  2. Add the following script to the file.
  3. Update the script with your Tinylytics embed code.
  4. Publish the file!
var tinylyticsScript = document.createElement('script');
tinylyticsScript.defer = true;
tinylyticsScript.src = 'tinylytics.app/embed/YOU... document.head.appendChild(tinylyticsScript);