Every time you make a Google search, check your Gmail or watch a YouTube video, Google records your visit in its server logs. The logs contain your IP address, search terms, the date and time of the visit, and other information that can be used to identify you and your browsing habits. Google keeps these logs forever, basically, although it does promise to partially anonymize the logs after a period of time to protect your privacy. Google deletes part of your IP address after nine months and anonymizes cookie IDs that can be associated with your computer after 18 months.

Limitations

Although Google may remove some of your personal information from its server logs, it doesn't mean the information isn't kept in other places, particularly if you have a Google account. For example, if you're signed into Gmail while doing a search in another tab, Google saves your search history indefinitely unless you disable the Web History feature in your search settings.