https://rwxr.me/posts/build-your-own-posthog-part-1/