FORTUNE -- Let's say you're one of the millions of Facebook users who logs into the site for a minute to reconnect with friends. Maybe you're taking a break from a big project at work, or settling in for an evening of couch surfing. Maybe, sadly, you have cancer, diabetes, or some other ailment. That's when you first notice it: A Facebook ad looking for people to take part in a clinical trial -- in your age range, with your illness, living in your town.
So how did Facebook know your medical secrets? They didn't -- until you clicked on the ad and told them.
In the last two years, companies like Acurian, a patient recruitment firm that supplies clinical trials with participants, have discovered an inexpensive way to find new patients with social network ads. Their methods are not at all nefarious -- they're not scanning users' status updates or monitoring the links they post.
Instead, the Horshan, Penn.-based company buys demographic placements that match the requirements of the medical studies it is looking to fill. From there, coincidence, curiosity, and a hunger for cures have compelled millions of Facebook users to click through the ad and fill out a qualifying questionnaire.
"If you really think about Facebook, it's the ultimate narcissist canvas," says Scott Connor, Acurian's vice president of marketing. "People are putting up -- of their own volition -- personal information in terms of their age, their location, their level of education. I honestly think there's a very small amount of the [Facebook] population that's concerned about privacy, because the entity wouldn't be as big as it was if that were the case."
Considering the uproar associated with privacy and Facebook, Acurian's results are surprising -- even to Connor. According to him, 20% of the patients the company contributes to a study come from social networking, with 70% coming from its database of 65 million pre-qualified patients, and 10% from traditional media (typically broadcast and newspaper ads).
Google (GOOG, Fortune 500) ads make up only a minuscule amount of the mix; search advertising has performed so poorly, that Acurian now only buys those ads if a client specifically requests it. "For every 10 contributions I get from my other online sources, I get one from Google," says Connor.
"We're putting ads out there that ask very personal questions, and people are clicking through," he says. "As strange as that may seem, and as much fervor as there is about privacy, I have not seen the spigot turning off in terms of people being interested."
A survey of Acurian's patients revealed that travel distance to the clinical trial site -- not compensation, amount of doctor visits, or possible side effects -- was the most important factor for people in deciding to participate in a medical research study. So, social networks' ability to deliver users segmented by gender, age, and location -- the three primary variables Acurian uses to find matches for its trials -- has been a boon for patient recruitment.
"The beauty from a Facebook and Myspace standpoint is that they've got aggregation of people, and they've got the contextual ability to serve messaging based on a user's profile," says Connor. "Based on just those three top-level targeting abilities, we can get specific enough in our targeting to be worthwhile and to be much more effective than Google."
Calculating exactly how much more effective it is takes a bit of accounting, as Acurian buys ads in a pay-per-click model and sells patients in a cost-per-acquisition scheme. "From click to pre-qualified referral, cost effectiveness is definitely leaning towards social networking by a factor of anywhere from two to five times," says Connor. "It's a newer space, the targeting is better, and it's not as saturated as keyword." Specifically comparing Facebook ads to Google ads, Connor says the former outperforms the latter by four to one.
To be fair to search advertising, another big part of Acurian's success is that it's managed to set up financially favorable deals elsewhere. For example, a couple years after the company's 1998 launch, it inked agreements with data aggregators to get exclusive clinical trial access to a stockpile of user profiles, which helped turn its organically grown, in-house database into the collection of 65 million health records it is today.
Then, when the company started buying enough online ad volume, it negotiated with online health networks to move from a cost-per-impression system to a much more favorable cost-per-acquisition model.
Two years ago, Acurian was not even in this arena -- demonstrating how substantial its current 20% stake is. Also, in a recent clinical trial focusing on incontinence (an issue that primarily affects older patients), 29% of participants attracted via social networking.
Meanwhile, studies of two disorders that affect a wider age range got 45% of their participants from social networks. "When you've got a broad age range, where therapeutically there isn't a skew toward one end of the age spectrum or another, e-recruitment seems to have a broader appeal and a broader capability of recruiting patients," says Connor.
According to Connor, about $2.3 billion per year is allocated to patient recruitment services, and the market is growing around 15% annually. Acurian's database is still the best bang for the company's buck, but that's only because of its size. "E-recruitment is, the majority of the time, on par with or better than direct mail," says Connor. "What it doesn't give me is all the volume that I need." Lucky for Acurian, Facebook is adding more than 700,000 new users every day.