Apple and Google may be intensifying privacy concerns by tracking where and when people use their mobile phones—but the true future of consumer surveillance is taking shape inside the cellphones at a weather-stained apartment complex in Cambridge, Mass.

For almost two years, Alex Pentland at the Massachusetts Institute of Technology has tracked 60 families living in campus quarters via sensors and software on their smartphones—recording their movements, relationships, moods, health, calling habits and spending. In this wealth...