GoatCounter is a web counter.
There are two ways to run this: as hosted service starting at $3/month (free during initial beta!) or run it on your own server. Check out https://www.goatcounter.com for the hosted service and user documentation.
There's a live demo at https://arp242.goatcounter.com.
The current status is public beta, or "MVP" (Minimum Viable Product) to get feedback from others. That being sad, it should be stable and useful. It just doesn't have all the features I'd like it to have (yet).
Basically I quit my day job to try and make a living from creating open source software full-time (or free software, if you prefer). So supporting isn't just a nice way to say "thanks mate", it's directly supporting future development.
Privacy-aware; doesn't track users; doesn't need a GDPR notice.
Lightweight and fast; adds just 0.8KB of extra data to your site.
Easy; if you've been confused by the myriad of options and flexibility of Google Analytics and Matomo that you don't need then GoatCounter will be a breath of fresh air.
100% committed to open source; you can see exactly what the code does and make improvements.
Own your data; you can always export all data and cancel at any time.
Fast: can handle about 800 hits/second on a $5/month Linode VPS – which is also running hitch and varnish – using the default settings.
Self-contained binary: everything (including static assets) is in a single 5M statically compiled binary.
Running your own
You will need Go 1.10 or newer and a C compiler (for SQLite) or PostgreSQL.
Install it with:
$ git clone email@example.com:zgoat/goatcounter.git $ cd goatcounter $ go build ./cmd/goatcounter
This will put a self-contained binary at
goatcounter. You can optionally reduce the binary size a bit (from ~18M to ~5M) with
~/go/goatcounter. This will run a development environment on http://goatcounter.localhost:8081
The default is to use a SQLite database at
./db/goatcounter.sqlite3(will be created if it doesn't exist). See the
-dbconnectflag to customize this.
For a production environment run something like:
goatcounter \ -prod \ -sentry "https://...:...@sentry.io/..." \ -domain "goatcounter.com" \ -domainstatic "static.goatcounter.com" \ -smtp "smtp://localhost:25" \ "$@"
Use a proxy for https (e.g. Caddy); you'll need to forward
You can see the goathost repo for the server configuration of goatcounter.com, although that is just one way of running it.
Both SQLite and PostgreSQL are supported. SQLite should work well for the vast majority of people and is the recommended database engine. PostgreSQL will not be faster in most cases, and the chief reason for adding support in the first place is to support load balancing web requests over multiple servers.
To use it:
Create the database, unlike SQLite it's not done automatically:
$ createdb goatcounter $ psql goatcounter -c '\i db/schema.pgsql'
Optionally convert the SQLite database:
$ ./db/export-sqlite.sh ./db/goatcounter.sqlite3 | psql goatcounter
-dbconnect, for example:
$ goatcounter -pgsql -dbconnect 'user=goatcounter dbname=goatcounter sslmode=disable'
See the pq docs for more details on the connection string.