Add analytics to the public API