While there is not just one thing that you can do to keep all your data private online; there is one mindset that will significantly increase the amount of privacy you obtain.
This mindset or tactic is compartmentalization. Separate everything as much as possible. From email to social media, to online shopping, it all needs to be isolated from each other.
Degrees of Separation:
1. The Desktop/Laptop Browser
You can use a different browser for each type of online activity with a good deal of success. However, I found this to be a huge hassle and often forgot what browser was for what sites. So instead, use Firefox and install their "Multi Account Containers" plugin. This allows you to set up sandboxes of types of sites or individual sites and force them to open in their correct sandbox. By doing this, you limit the amount of shared data between each site.