If you want to use it for family tree research you basically have to go to the companies that have the largest databases, because that's where you'll find familial matches (e.g. 23andme and AncestryDNA).
23andme has a better track record of refusing governmental requests than AncestryDNA.
In terms of genetic information sharing, none of the providers shares non-anonymized data. 23andme allows an opt-out for sharing anonymized data.
You can also do the tests pseudo-anonymously, while they ask you to provide your real name, etc. you don't actually have to do so. You can purchase a test kit at a retail store for cash and register online with a fake name if you wish to do so.