The solution is not entirely a technological one. There are societal issues at play here, too. However, there are some technical steps that can be taken to help minimize the invasion of your privacy and reduce the amount of tracking and profiling being done. Browsers offer limited control over cookies. With this setting, your browser accepts all cookies sent to you.
Web bugs are more difficult and, in fact, are nearly impossible to manage.
Yet, with image filtering tools, you can attempt to keep your browser from receiving some of the more obvious web bugs. However, these filtering tools tend to interfere with advertising that you may wish to receive. So, they are not the perfect solution. To protect yourself further, turn all scripting OFF in your web and email browsers. However, with scripting OFF you'll find many sites don't work properly.