Months before social-media company Snap Inc. publicly disclosed slowing user growth, rival Facebook Inc. already knew.

Late last year, Facebook employees used an internal database of a sampling of mobile users’ activity to observe that usage of Snap’s flagship app, Snapchat, wasn’t growing as quickly as before, people familiar with the matter said. They saw that the shift occurred after Facebook’s Instagram app launched Stories, a near-replica of a Snapchat feature of the same name.

...