Every day millions of students at college in America log onto Facebook. Like any other fan of the site they update their status, message each other, upload and tag photos, and link to their friends.

What they are not aware of is that they are being monitored by researchers, who are almost overwhelmed by the amount of data they can gather about tastes, preferences and relationships.

Sociologists at the University of California, Los Angeles (UCLA), and Harvard University in the United States are using the social networking site for academic research.

"We're harvesting information from Facebook. We have all the information on an entire class of students. We are gathering that data and transforming it into a dataset that can be easily used for all kinds of analysis" said Andreas Wimmer, professor of Sociology at UCLA.

The social sites help map who knows whom and what they do

"It's a wealth of data on who relates to whom, and who becomes friends with whom, that is quite unprecedented. Compared to the usual survey data it's a huge leap forward in terms of the precision with which relationships are recorded," he said.

Facebook users can set privacy controls, to limit who can see their profiles. But researchers say that currently most of the students they are looking at haven't chosen to make their sites private, and therefore they are knowingly making details of their lives public.

"There's just a phenomenal amount of work being done that takes advantage of what I would call this passive, massive, data collection effort" said Professor Nicholas Christakis from Harvard University.

He told the Digital Planet programme on the BBC World service that as well as Facebook, scientists are gathering data from all sorts of online activity.

"There are lots of people who are taking advantage of the fact that we leave digital traces nowadays. People have been mining all kinds of data. For example they've been looking at telephone networks, instant messaging networks, blog postings. Some people have machine-readings of hundreds of millions of blog entries.

The research could help spot students who are at risk

"There is even a website that tries to track how people are feeling in different parts of the world - looking at whether there are there hotspots of sadness, anger or happiness in different areas" he continued.

Facebook is particularly useful to sociologists because of the way members accurately record relationships. Friends can add applications to compare tastes in everything from films to music to books. That can help researchers establish whether people tend to form relationships with others who are similar to themselves.

The study looking at the entire class of students is scheduled to run for four years. Early results are helping to shed light on how people make friends.

"If you look at the entire picture of who is hanging out with whom - or what are the principles of group formation in this college, then you see that the most important thing is co-residence, who people who have been thrown together with in the same dorm" said Prof Wimmer.

"It seems that since this 'opportunity' structure matters so much, what this college and a lot of others are doing, is mixing people from different backgrounds - racial, social-economic etc - in their dorms and their residences. It really helps to establish ties across these various divides."

Longer term the researchers believe the increased understanding of the way relationships form could help identify students who aren't fitting in, and who are perhaps at a greater risk of suicide.