Tracking users is common on the web.
A web site can search for resources such as images and scripts on domains other than its own. This is called "cross-origin" or "cross-site loading" - and it's what makes the web so powerful. However, this feature also makes it possible to track users from one site to another. The famous cookies stored in the user's browser enable "cross-site tracking" and provide information about user behavior across the web to the owner of the cookie.
Smile, you're under watch !
What about social media?
Nowadays, no one is supposed to be unaware that on Facebook, when we "like" a certain group, follow a certain personality, look at a certain photo, visit a certain website, or go to a certain place, we provide precise information to better reveal our digital identity. Our online behavior allows them to know who we are, what we like. As a result, advertising is targeted to our tastes.
If Facebook's system is so effective, it is because it has mastered the collection and sorting of Metadata - the valuable data extracted from all collected data. These metadata allow for even finer analysis; who we are, who we write to, when, and how often. Who our recipients write to and so on.
Getting your hands on these metadata is the gold rush.
Facebook acquired Whatsapp in 2014. This acquisition gave it the metadata of all the users of this communication app, to better scrutinize them.