This article outlines how I use a pre-commit hook and cog to keep my blog stats updated automatically.
print("https://mathspp.com")