Scams and Privacy Habits

Understanding Tracking Cookies and Online Ads

Learn in general terms how websites follow browsing for advertising, what cookies do, and the choices visitors may have to limit tracking.

On this page
  1. Why ads sometimes seem to follow you
  2. What a cookie is
  3. How tracking supports advertising
  4. Beyond cookies
  5. Choices you may have
  6. Trade-offs to be aware of
  7. Ads and safety
  8. A simple starting point

Why ads sometimes seem to follow you

You look at a product once, and for days afterward similar items appear in adverts on other sites. This is rarely a coincidence. Much of the advertising on the web is shaped by data about what people read, search for and click on, and cookies are one of the best-known ways that data is collected.

Understanding the basics can make this feel less mysterious and helps you choose how much tracking you are comfortable with.

A cookie is a small piece of data that a website asks your browser to store. When you return, the browser sends it back. Many cookies are ordinary and useful. They can keep you signed in, remember items in a shopping basket, or store a language preference. Without them, many sites would not work as expected.

Cookies are often described by who sets them and how long they last.

  • First-party cookies are set by the site you are visiting. They are commonly used for logins, preferences and basic measurement of how the site is used.
  • Third-party cookies are set by a different domain, often one providing advertising or embedded content on the page. Because the same third party can appear on many sites, it may be able to recognize the same browser across them.
  • Session cookies disappear when you close the browser, while persistent cookies remain for a set period.

A tracking cookie is simply a cookie used to recognize you over time or across sites, often to build an interest profile for advertising or measurement.

How tracking supports advertising

In general terms, an advertising system may combine several signals: pages visited, searches, products viewed, approximate location, device type, and sometimes information you gave when you signed up. Advertisers can use this to show ads they believe are relevant, or to show you an item you have already looked at again, which is often called retargeting.

Many sites are funded this way, which is one reason much online content is free. At the same time, the profiles involved can be detailed, and some people are uncomfortable with that. Both views are reasonable.

Beyond cookies

Cookies are not the only method. Because browsers and rules have changed over time, the industry has used other techniques too. In general terms these include:

  • identifiers tied to a mobile device or app
  • small invisible images or scripts, sometimes called pixels, that report that a page or email was viewed
  • browser and device characteristics that, combined, can make a browser recognizably distinctive, sometimes called fingerprinting
  • logging in: when you are signed in to a service, your activity there can be linked to your account

Because of this, clearing cookies reduces some tracking but not necessarily all of it.

Choices you may have

What is available depends on your browser, your device and the laws where you live.

Consent banners. Many sites show a notice asking you to accept or manage cookies. Where choices are offered, you can often decline non-essential cookies or adjust categories. The wording and layout of these notices vary, and it is worth reading the options rather than clicking the first button. The site-owner side of this is described in cookie consent.

Browser settings. Browsers commonly let you block third-party cookies, clear stored data, or delete cookies when you close the browser. Some include extra tracking protections. Blocking everything can break some sites, so you may need to adjust.

Private browsing. This mode usually stops the browser keeping your history and cookies after the session, but it does not hide your activity from the sites you visit, your employer or your network provider.

Advertising settings. Many services let you view or adjust the interests they associate with you, limit personalized ads, or reset an advertising identifier on a phone. Tools differ by service.

Signals and opt-outs. Some browsers can send a request asking sites not to track you. Honoring that request is not guaranteed.

Extensions. Content blockers can reduce ads and trackers, though they vary in quality and need to be chosen with care, since an extension can itself see your browsing.

Less data in the first place. Being selective about accounts, permissions and the details you provide gives trackers less to link. Reviewing privacy settings on accounts you use helps, and it is worth understanding what personal data is.

Trade-offs to be aware of

Reducing tracking can mean more generic ads, more consent prompts, and the occasional site that does not work properly. It does not stop advertising, only makes it less targeted. Blocking also affects site owners who rely on advertising or on basic measurement of visitors; the plain statistics described in website analytics do not always require invasive tracking. You can reasonably decide where your line falls.

Ads and safety

Not every ad is trustworthy. Some adverts lead to misleading offers or fake pages, and a tracking-shaped ad that mirrors something you just looked at can feel more convincing than it should. Be careful with unexpected offers, particularly those asking for payment or downloads, and apply the same caution you would to any unsolicited message.

A simple starting point

If you want to take modest steps, try this: review your browser’s cookie and tracking settings, decline non-essential cookies when a banner gives you the option, check the advertising controls on the accounts you use most, and clear stored data from time to time. Revisit the settings occasionally, since browsers, laws and services keep changing.

The complete guide to scams and privacy habits

Spotting Online Scams and Staying Calm
Read the guide

Keep exploring

Guides from other topics

All topics →