I track web analytics on a number of websites I manage (mostly related to nimib) and also for some website related to Nim ecosystem (website, scinim, ...). I like to use for this plausible analytics which is very easy to use, privacy friendly (compliant with GDPR without needing cookies), and I also like how Uku and Marko are building a sustainable open source business.
A feature I like a lot of plausible is the fact that you can make the analytics dashboard public 👀 so everybody can actually see the statistics on the site I am tracking. I feel this is particularly apt for open source projects. I am not aware of other websites having this approach, if you do please let me know.
Here below are all the sites for which I have set up public analytics:
note that on wordle-it
website statistics are tracked randomly once every N pageviews (N currently 40).
Use the following nim script (and update it):
import std / [strformat, strutils]
# used to update
let data = [
("nim-lang.org", "", "github.com/nim-lang/website"), # default plausible
("conf.nim-lang.org", "", "github.com/nim-lang/conf.nim-lang.org"),
("scinim.github.io/getting-started", "", ""), # default github pages
("pietroppeter.github.io/nimib", "", ""),
("pietroppeter.github.io/nimibook", "", ""),
("pietroppeter.github.io/nblog", "", ""),
("pietroppeter.github.io/adventofnim", "", ""),
("pietroppeter.github.io/p5nim", "", ""),
("pietroppeter.github.io/wordle-it", "", ""),
# not sure why I need this special case for plausible url (maybe some plausible misconfiguration):
("par-le.github.io/gioco", "plausible.io/par-le.github.io", ""),
("py4ai.com", "", "github.com/pietroppeter/py4ai"),
("pietroppeter.github.io/blog", "", ""),
]
var result = """
| # | 🌍 site | 📈 analytics | 💻 repository |
|---|---|---|---|
"""
for i, row in data:
let
site = row[0]
plausible = if row[1].len > 0: row[1] else: "plausible.io/" & site.replace("/", "%2F")
repo = if row[2].len > 0: row[2] else: "github.com/" & site.replace(".github.io", "")
result.add &"|{i+1}.|[{site}](https://{site})|[{plausible}](https://{plausible})|[{repo}](https://{repo})|\n"
echo result
You can opt out with standard ad-blocking or with a simple command in browser console, see https://plausible.io/docs/excluding-localstorage