For instance, when Google’s human relations department — which the company internally calls “People Operations” — discovered that it had a higher attrition rate among women than men, it immediately went to work figuring out why women were more likely to leave the company. Once the department discovered that its problems were primarily with pregnant women, it instituted a five-month maternity leave plan with full pay and benefits that also gave new mothers flexibility on when they could use their time off. Manjoo says that the policy has been “a winner for the company” that helped reduce “Google’s attrition rate for new mothers… down to the average rate for the rest of the firm.”

Manjoo says that such on-the-fly policy changes are common for Google’s People Operations, which relies on a “sophisticated employee-data tracking program, an effort to gain empirical certainty about every aspect of Google’s workers’ lives — not just the right level of pay and benefits but also such trivial-sounding details as the optimal size and shape of the cafeteria tables and the length of the lunch lines.” Given that Google has been trying hard to use the vast amount of data it has on users to tailor its services to them on an individual, personalized level, it’s hardly surprising that the company is using the same approach for maintaining workplace happiness.

“We have the luxury of being a data-driven company with people with the analytic chops who can do the math,” People Operations chief Laszlo Bock tells Manjoo. “We also have a large enough scale so that when we run experiments, they’re statistically valid.”