>>16441They purchase data and use browser cookies to correlate data people put on to the internet and construct mostly accurate profiles based on the metadata that seems to be connected.
So for example if you use the same emails for amazon and youtube and then watch certain videos or buy certain products their system uses the data from those views and purchases, notices they're both connected to the same email address, and then constructs a marketing profile based on the accurate assumption that the same person is behind both accounts and the purchasing/viewing patterns therein.