├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Pietro Peterlongo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # public analytics 2 | 3 | I track [web analytics](https://en.wikipedia.org/wiki/Web_analytics) on a number of websites I manage (mostly related to [nimib](https://github.com/pietroppeter/nimib)) 4 | and also for some website related to [Nim](https://nim-lang.org) ecosystem (website, scinim, ...). 5 | I like to use for this [plausible analytics](https://plausible.io) which is very easy to use, privacy friendly (compliant with GDPR without needing cookies), 6 | and I also like how Uku and Marko are [building a sustainable open source business](https://plausible.io/blog/open-source-saas). 7 | 8 | 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. 9 | 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. 10 | 11 | Here below are all the sites for which I have set up public analytics: 12 | 13 | | # | 🌍 site | 📈 analytics | 💻 repository | 14 | |---|---|---|---| 15 | |1.|[nim-lang.org](https://nim-lang.org)|[plausible.io/nim-lang.org](https://plausible.io/nim-lang.org)|[github.com/nim-lang/website](https://github.com/nim-lang/website)| 16 | |2.|[conf.nim-lang.org](https://conf.nim-lang.org)|[plausible.io/conf.nim-lang.org](https://plausible.io/conf.nim-lang.org)|[github.com/nim-lang/conf.nim-lang.org](https://github.com/nim-lang/conf.nim-lang.org)| 17 | |3.|[scinim.github.io/getting-started](https://scinim.github.io/getting-started)|[plausible.io/scinim.github.io%2Fgetting-started](https://plausible.io/scinim.github.io%2Fgetting-started)|[github.com/scinim/getting-started](https://github.com/scinim/getting-started)| 18 | |4.|[pietroppeter.github.io/nimib](https://pietroppeter.github.io/nimib)|[plausible.io/pietroppeter.github.io%2Fnimib](https://plausible.io/pietroppeter.github.io%2Fnimib)|[github.com/pietroppeter/nimib](https://github.com/pietroppeter/nimib)| 19 | |5.|[pietroppeter.github.io/nimibook](https://pietroppeter.github.io/nimibook)|[plausible.io/pietroppeter.github.io%2Fnimibook](https://plausible.io/pietroppeter.github.io%2Fnimibook)|[github.com/pietroppeter/nimibook](https://github.com/pietroppeter/nimibook)| 20 | |6.|[pietroppeter.github.io/nblog](https://pietroppeter.github.io/nblog)|[plausible.io/pietroppeter.github.io%2Fnblog](https://plausible.io/pietroppeter.github.io%2Fnblog)|[github.com/pietroppeter/nblog](https://github.com/pietroppeter/nblog)| 21 | |7.|[pietroppeter.github.io/adventofnim](https://pietroppeter.github.io/adventofnim)|[plausible.io/pietroppeter.github.io%2Fadventofnim](https://plausible.io/pietroppeter.github.io%2Fadventofnim)|[github.com/pietroppeter/adventofnim](https://github.com/pietroppeter/adventofnim)| 22 | |8.|[pietroppeter.github.io/p5nim](https://pietroppeter.github.io/p5nim)|[plausible.io/pietroppeter.github.io%2Fp5nim](https://plausible.io/pietroppeter.github.io%2Fp5nim)|[github.com/pietroppeter/p5nim](https://github.com/pietroppeter/p5nim)| 23 | |9.|[pietroppeter.github.io/wordle-it](https://pietroppeter.github.io/wordle-it)|[plausible.io/pietroppeter.github.io%2Fwordle-it](https://plausible.io/pietroppeter.github.io%2Fwordle-it)|[github.com/pietroppeter/wordle-it](https://github.com/pietroppeter/wordle-it)| 24 | |10.|[par-le.github.io/gioco](https://par-le.github.io/gioco)|[plausible.io/par-le.github.io](https://plausible.io/par-le.github.io)|[github.com/par-le/gioco](https://github.com/par-le/gioco)| 25 | |11.|[py4ai.com](https://py4ai.com)|[plausible.io/py4ai.com](https://plausible.io/py4ai.com)|[github.com/pietroppeter/py4ai](https://github.com/pietroppeter/py4ai)| 26 | |12.|[pietroppeter.github.io/blog](https://pietroppeter.github.io/blog)|[plausible.io/pietroppeter.github.io%2Fblog](https://plausible.io/pietroppeter.github.io%2Fblog)|[github.com/pietroppeter/blog](https://github.com/pietroppeter/blog)| 27 | 28 | note that on `wordle-it` website statistics are tracked randomly once every N pageviews (N currently 40). 29 | 30 | ## update table above 31 | 32 | Use the following nim script (and update it): 33 | 34 | ```nim 35 | import std / [strformat, strutils] 36 | 37 | # used to update 38 | let data = [ 39 | ("nim-lang.org", "", "github.com/nim-lang/website"), # default plausible 40 | ("conf.nim-lang.org", "", "github.com/nim-lang/conf.nim-lang.org"), 41 | ("scinim.github.io/getting-started", "", ""), # default github pages 42 | ("pietroppeter.github.io/nimib", "", ""), 43 | ("pietroppeter.github.io/nimibook", "", ""), 44 | ("pietroppeter.github.io/nblog", "", ""), 45 | ("pietroppeter.github.io/adventofnim", "", ""), 46 | ("pietroppeter.github.io/p5nim", "", ""), 47 | ("pietroppeter.github.io/wordle-it", "", ""), 48 | # not sure why I need this special case for plausible url (maybe some plausible misconfiguration): 49 | ("par-le.github.io/gioco", "plausible.io/par-le.github.io", ""), 50 | ("py4ai.com", "", "github.com/pietroppeter/py4ai"), 51 | ("pietroppeter.github.io/blog", "", ""), 52 | ] 53 | 54 | var result = """ 55 | | # | 🌍 site | 📈 analytics | 💻 repository | 56 | |---|---|---|---| 57 | """ 58 | for i, row in data: 59 | let 60 | site = row[0] 61 | plausible = if row[1].len > 0: row[1] else: "plausible.io/" & site.replace("/", "%2F") 62 | repo = if row[2].len > 0: row[2] else: "github.com/" & site.replace(".github.io", "") 63 | result.add &"|{i+1}.|[{site}](https://{site})|[{plausible}](https://{plausible})|[{repo}](https://{repo})|\n" 64 | echo result 65 | ``` 66 | 67 | ## opting out 68 | 69 | You can opt out with standard ad-blocking or with a simple command in browser console, see https://plausible.io/docs/excluding-localstorage 70 | --------------------------------------------------------------------------------