How to track external link clicks on micro.blog using Plausible Analytics

micro.blog has a plugin for Plausible Analytics that allows you see your blog stats. It’s simple to setup: just add your blog’s domain name in the plugin’s settings and in your Plausible account. But what it doesn’t let you do is track which external links were clicked on your blog. Here’s how you can have that.

Part 1: Setting up micro.blog

  • On your micro.blog Dashboard, go to Design > Edit Custom Themes > Plausible Analytics

  • Click the file named layouts/partials/plausible.html

The code in the file reads the following by default:

<script async defer data-domain="&#123;&#123; .Site.Params.blog_domain }}" src="https://plausible.io/js/plausible.js"></script>

Replace the code with:

<script async defer data-domain="&#123;&#123; .Site.Params.blog_domain }}" src="https://plausible.io/js/plausible.outbound-links.js"></script>

Save your changes by clicking Update Template.

Part 2: Setting up Plausible

From your Plausible Dashboard, go to the Settings page of your micro.blog site.

  • Click on Goals > Add goal > Custom Event

  • Enter the exact text: Outbound Link: Click

  • Click Add goal


That’s it. You’ll now be able to see which links on your micro.blog site have been clicked.