Rapid technological advances in advertising have enabled firms to better target those consumers most likely to buy their products. While more efficient than traditional methods, targeted advertising may significantly limit product market competition. We propose a model of demand as a network, where heterogenous consumers dynamically become “aware” of differentiated products, expanding their choice sets and improving on their possible matches thanks to advertising. As networks become denser, customer misallocation decreases due to better sorting. However, though more intensive targeting can efficiently sort with fewer network connections, it also increases market power by segmenting consumers. We calibrate the model to the United States over a period of time which saw a rapid rise in digital advertising. We find that this rise led to substantially better consumer-firm matches. However, if the targeting technology had not improved during this period, markups would have been lower and welfare higher despite worse sorting.