Analytics protocol

Still need to add tests, but that'll be done after the release?