I've heard about Ghostery, a browser extension/plugin that blocks web trackers. But according to this link it sells our data. Are add-ons and plugins open source in Firefox? Is there another alternative to Ghostery?
You can prevent Ghostery from selling your data by opting out of the Ghost Rank feature. The feature is opt-in, so if you didn't already opt in there is nothing you need to do. It is then safe for you to use.
Using a clone of Ghostery which is identical in every aspect except not having the Ghost Rank feature would make no practical difference from running Ghostery without opting in to Ghost Rank. If your intention is to actively punish Ghostery for their evil data trading by boycotting them, then you will achieve nothing. They already gain nothing from you commercially when you run Ghostery with Ghost Rank disabled. If anything you help them by uninstalling Ghostery because you no longer consume any of their resources.
But if you are really looking for an alternative option: the classical method is to edit your operating systems
hosts file and forward the hostnames of known trackers and advertising networks to
0.0.0.0. There are recommended blocklists available which you can find with a websearch (I can't vouch for their quality, so I won't recommend any specific ones). The advantage is that it doesn't just block advertisements in one web browser, but in all web browsers you have installed and in any other applications which might access these hosts for whatever reason. The drawback is that you will have to maintain your blocklist manually.
Another plugin worth mentioning is Privacy Badger. It's fairly new, but from the EFF, to which I would trust not to do any bad stuff.
It's also fairly intelligent since it's not using Blacklist which is always a race against tracker vendors, but uses an algorithm to determine what it should block. I'm using it and am pretty happy with it.
The only downside is: Companies can say the won't track and then Privacy Badger won't block them. The question is if the companies stick with their word, or if they will still try to track you. But you can always change the settings from Privacy Badger and it will never overwrite your own settings unless you switch back to default.
Edit: I've found the talk I heard at the CCCamp (VIDEO).
Another plugin worth mentioning is Request Policy (Continued). It blocks all requests to domain other than the one shown in the address bar. Directly after installation, some common third party domains are whitelisted.
It is probably harder to use than the other plugins, since many web pages do not work without adding some domains to the whitelist (e.g. the stackexchange network, they pull JS from Google). Also, some websites (e.g. Microsoft and Adobe) become utterly broken, I've yet to find whitelist-settings to make them work. But the plugin also speeds up many websites by blocking all the ads and other stuff you really need to see.
Since the website you are currently viewing can track you in any case, and the browser won't do requests to it when showing other pages, this seems like the optimum achievable in privacy (along with some cookie-settings and referer control).