How we ensure credible analytics on Dropbox mobile apps

This post details the development of a framework for ensuring credible user analytics on Dropbox mobile apps. The framework is built on three pillars: Intentional (aligning analytics with business questions), Credible (using snapshot testing with instrumented UI tests to validate analytics events and attributes), and Discoverable (making insights accessible). A key technical contribution is the use of textual snapshot testing, where collected analytics events are serialized to JSON and compared against expected outputs. The post provides an example of an Android UI test using `SnapshotRule` to verify specific events and attributes, including handling non-idempotent fields by excluding them from direct value comparison while ensuring their presence. The results highlight the discovery of double-logged events and the improvement of error logging by using enums instead of localized error messages.