Savvy sites with a strong advertising focus understand that the direct collection of user data is an ongoing process based on a delicate equation of value and trust. They know that the key to direct information requests is to tie information requests to something of commensurate value to the user. If the site is providing a substantial free service such as email, for example, users generally feel that the site is within its rights to ask for some basic demographic information at the time of registration. They usually don't feel this way if the site is merely offering a service that implies limited commitment and lower value, such as search capabilities. So, your site's leverage in asking for and receiving user information is a function of what you provide back.
Timing is also a key consideration.
Experience shows that new users will exit your site in droves when faced with the prospect of filling out a lengthy registration form. In this situation, a track record and trust have been established, paving the way for a deeper relationship between the customer and the company. Another major way to obtain customer information is to infer it based on the user's behavior on your site or on other sites. We'll be talking a lot more about this, but, essentially, inference-based information requires a site to be able to track and analyze how a customer actually behaves. Where customers go on the site, how long they stay, what actions they take, where else they go on the web, and usage patterns over a period of time are all examples of trackable behaviors.