How websites track you across the internet
Ads follow you around because websites and advertisers use tracking cookies and similar tools to record what you do online. When you visit a website, it drops a small file on your computer that remembers you were there. Later, when you visit a completely different website, that second site can read the cookie and know you came from the first one. Advertisers buy this information and use it to show you ads related to what you looked at.
This tracking happens whether you buy something or not. You can browse a pair of shoes on one site, leave without purchasing, and then see ads for those exact shoes on your email, social media, and news websites for weeks. The shoe company didn't follow you — the tracking code did.
The system works because most websites use the same handful of ad networks. Google, Facebook, Amazon, and a few others have code embedded on millions of websites. That code reports back to them every time you visit, building a profile of your interests, location, and browsing habits. They sell access to that profile to advertisers who want to reach people like you.
Key Takeaways
- Tracking cookies are small files that websites place on your computer to remember your visits and share that information with advertisers.
- The same ad networks operate across thousands of different websites, so they can track you from site to site even when you think you're in separate places.
- Your browsing history, searches, and purchases create a profile that advertisers buy to show you targeted ads.
- You can reduce tracking by clearing cookies, using private browsing mode, or installing browser extensions that block trackers.
- Different browsers and devices have different built-in privacy settings that limit how much tracking happens by default.
First-party cookies versus third-party cookies
Not all cookies are the same. A first-party cookie is placed by the website you are actually visiting. Amazon puts a cookie on your computer when you go to Amazon.com so it can remember your shopping cart and login information. That cookie only talks to Amazon, and it serves a real purpose — without it, you would have to log in every time you refreshed the page.
A third-party cookie is placed by someone other than the website you are on. You visit a news site, but an ad network's code runs in the background and drops a cookie on your computer. That cookie reports to the ad network, not to the news site. Third-party cookies are what enable the tracking across different websites. They are the ones that follow you around.
Most browsers have started blocking third-party cookies by default. Chrome, Firefox, Safari, and Edge all have settings that prevent these cross-site trackers from working. However, advertisers have moved to other methods — like fingerprinting and pixel tags — that accomplish the same goal without relying on cookies.
Pixels, fingerprinting, and other tracking methods
A tracking pixel is a tiny invisible image, usually just one pixel in size, that is embedded in a website or email. When you load the page or open the email, your browser downloads the pixel, and that download tells the advertiser you were there. Pixels don't require cookies and work even if you have cookies turned off. They are commonly used in emails to track whether you opened a message.
Browser fingerprinting is a newer technique that doesn't rely on cookies at all. Instead, it collects information about your device: your browser type, operating system, screen resolution, installed fonts, and timezone. This combination of details is unique enough to identify you across websites without storing anything on your computer. Fingerprinting is harder to block because it doesn't involve files you can delete.
Advertisers also use login tracking. If you log into Facebook, Google, or another major service, those companies can track you across the web even on sites where you never log in. They recognize your device and connect your activity to your account. This is why logging out of social media can reduce the ads you see.
What data is collected and how it is used
Advertisers collect far more than just your browsing history. They track your location, the device you use, the time of day you browse, how long you spend on each page, what you search for, what you buy, and what you look at but don't buy. They note your age range, gender, income level (estimated from your neighborhood and purchases), and interests. Over time, this builds a detailed profile of who you are and what you want.
This data is sold to advertisers in the form of audience segments. An advertiser doesn't buy your individual profile — they buy access to thousands of people who match a description like "women aged 25 to 40 who searched for running shoes in the last 30 days." The ad network handles the matching and shows the ad only to people in that segment.
Some of this data is also sold to data brokers, companies that specialize in buying and selling personal information. They combine tracking data with public records, purchase history, and other sources to build even more complete profiles. These profiles are then sold to insurance companies, employers, lenders, and other businesses that want to know about you.
How to reduce tracking on your devices
The simplest step is to clear your cookies regularly. In most browsers, you can do this through Settings or Preferences. Look for Privacy or History, then select the option to clear cookies and browsing data. This removes the files that advertisers use to recognize you, though new ones will be created the moment you visit a website that uses tracking.
Use private browsing mode (called Incognito in Chrome, Private in Firefox and Safari) when you don't want your activity recorded. Private mode doesn't store cookies, history, or login information after you close the window. However, it doesn't hide your activity from your internet service provider or the websites you visit — it only hides it from other programs on your computer.
Install a tracker-blocking extension in your browser. Tools like uBlock Origin, Privacy Badger, and Ghostery block many tracking pixels and third-party cookies before they load. These extensions are free and work in the background. Be aware that some websites may not function properly if you block too much, and you may need to temporarily disable the extension on sites you trust.
Check your browser's built-in privacy settings. Safari has Intelligent Tracking Prevention, Firefox has Enhanced Tracking Protection, and Chrome has Privacy Sandbox settings. These features limit what trackers can do, though they don't eliminate tracking entirely. Turning these on is usually the default, but you can make them stricter in Settings.
Privacy settings on social media and search engines
Google and Facebook collect tracking data through their own services and through code they place on other websites. You can limit this by adjusting your privacy settings on their platforms. In Google, go to myactivity.google.com to see what Google knows about you and delete activity. You can also turn off ad personalization so Google stops using your activity to target ads, though you will still see ads — they just won't be based on your interests.
On Facebook, go to Settings and Privacy, then Ad Preferences. You can see the categories Facebook has assigned to you and remove them. You can also limit which apps and websites can share data with Facebook by adjusting your app permissions. These settings don't stop Facebook from collecting data, but they reduce how much of it is used to target ads.
Search engines like DuckDuckGo and Startpage don't track your searches or build profiles. Switching to one of these as your default search engine removes one major source of tracking data. However, you will still be tracked by ad networks on websites you visit — changing your search engine alone won't stop that.
What you cannot control
Even with all these protections in place, some tracking will still happen. Your internet service provider can see which websites you visit, and some ISPs sell this information to advertisers. Your mobile phone's operating system (iOS or Android) collects location data and shares it with apps and advertisers. Websites you log into directly can track you on their own sites and sell that data to third parties.
Fingerprinting is difficult to block completely because it doesn't rely on files you can delete. Some extensions can spoof your fingerprint (make your device look different than it actually is), but this can break website functionality. The most effective defense is to use a VPN, which hides your real IP address and location, though this doesn't stop fingerprinting based on your browser settings.
Ultimately, some level of tracking is built into how the internet works. The goal of these tools is to reduce tracking to a level you are comfortable with, not to eliminate it entirely. The more protections you use, the less data advertisers can collect — but there is no setting that makes you completely invisible.
Frequently Asked Questions
Can websites see what I do on other websites?
Not directly. A website can only see activity on its own domain. However, ad networks and trackers embedded on multiple websites can see your activity across all of them. This is why the same ads follow you from site to site — the ad network sees you on all of them, even though each individual website does not.
Does using a VPN stop ads from following me?
A VPN hides your IP address and location from websites and your internet service provider, which reduces some tracking. However, it does not stop cookies, pixels, or fingerprinting. Advertisers can still recognize you if you log into an account or if they use browser fingerprinting. A VPN is one layer of privacy, not a complete solution.
Why do I see ads for things I only talked about, not searched for?
Microphones on your device are not constantly recording you for advertisers — that is a common misconception. What is actually happening is that you searched for something on one device, talked about it on another, or the advertiser made an educated guess based on your profile. Coincidences also feel more noticeable than they actually are.
If I delete my cookies, will the ads stop?
Deleting cookies removes one tracking method, but advertisers will use others like pixels and fingerprinting. You will also get new cookies the moment you visit a website that uses tracking. Deleting cookies helps, but it is most effective when combined with other privacy tools like tracker blockers and private browsing mode.
Do I have to accept cookies when a website asks?
In Europe and some other regions, websites are required to ask for permission before placing tracking cookies. You can usually click "Reject" or "Decline" instead of "Accept." However, some websites make the reject button harder to find or make it seem like you must accept. You always have the right to refuse, though some sites may limit your access if you do.