How do advertisers show me custom ads?

Is your computer persuading you to buy stuff? See pictures of popular websites.

Let's say you're shopping online for shoes. After browsing a few stores for just the right pair, you surf over to an article on your favorite news site. There, like magic, an advertisement appears for the very same shoes you were admiring just moments ago. "That's funny," you tell yourself before clicking through to a weather site for the weekend forecast. Then, wedged between sunny Saturday and stormy Sunday, you see yet another ad for the shoes. You're not going crazy; you've just experienced the wonder of custom Internet advertising.

Targeted advertising has been part of the Internet experience since the late 1990s. Back then, companies tried to reach out to consumers online in much the same way they had on TV: by choosing ads that likely appealed to the broadest part of their audience. In other words, since fly fishing shows featured ads for rods and trips to Alaska, then so would fly fishing Web sites. Then, in the early 2000s, Internet advertising got a little smarter. Companies began using browsing habits and other data collected from users to make ads more personalized, and promotions for shoes and all kinds of other products and services began following people across the Web.

Today, custom Internet advertising is widespread, and the public is beginning to notice. According to a 2012 Pew Internet and American Life Project report, 59 percent of Internet users said they observed targeted advertising while surfing the Web [source: Purcell, Brenner, and Rainie]. Some activists see the practice as an invasion of privacy since it relies so heavily on the collection of personal information, but advertisers insist that it's harmless. So, which is it?