Privacy preserving data collection and analysis