Companies like Nielsen use in-house technology that helps them track the viewing patterns of thousands of people. They pass this information on to the networks.