This week's Economist newspaper has a long and detailed special report on advertising and technology. It goes into great detail about how marketing people collect personal information from web surfers and from users of mobile apps.
Most of us here are probably familiar with the general concepts involved, but the sheer scale of it might come as a surprise. If you are at all interested in this - whether from a marketing viewpoint or one of personal privacy - I recommend that you read the whole thing.
(I don't how long the report will remain available on their site. If you are really interested, you might prefer to purchase the issue in question from the Amazon Kindle store.)