What targeted advertising actually is
Most websites and apps are free to use because someone pays for the space around the content. Advertisers pay more when their message is likely to reach a person who cares about it, and targeted advertising is the set of methods used to make that guess. It is less about reading your mind than about sorting people into groups and matching those groups to ads.
There are two broad approaches. Contextual targeting looks at the page: an article about hiking boots gets an ad for a tent, whoever is reading it. Behavioral targeting looks at the person: if your device has been seen on hiking sites, you may see a tent ad on an unrelated page. The first needs no information about you. The second depends on tracking over time.
How a site recognizes you
To treat a visitor as the same person from one visit to the next, a system needs an identifier. Several are in common use.
- Cookies. A cookie is a small text file a site asks your browser to store. A first-party cookie is set by the site you are visiting and is often used for logins and shopping carts. A third-party cookie is set by another domain, such as an ad network, whose code is embedded in the page. Because the same network appears on many sites, it can recognize your browser across all of them. What cookies and trackers do in more detail is covered in the piece on tracking cookies, and browsers differ in how they treat them.
- Mobile advertising identifiers. Phones and tablets have a resettable ID that apps can use for advertising. Your phone settings usually let you reset it or limit its use.
- Logins and email addresses. When you sign in, a company can link activity on its own site, app and sometimes partner sites to your account.
- Fingerprinting. Some scripts combine details such as screen size, fonts, language and browser version into a pattern that may be fairly distinctive without storing anything on your device. This is harder for ordinary users to see or clear.
How profiles are built
A profile is a collection of labels attached to an identifier. The labels may be simple (visited a travel site, searched for running shoes) or inferred (probably interested in fitness, probably in a certain age range). Inferences are guesses, and they can be wrong or out of date, which is why people sometimes see ads for something they bought last week.
Data can come from several places: the advertiser’s own site, the publisher’s audience data, the app you used, and sometimes outside companies. How data brokers collect and sell information describes that last group. Location is another input; the way location tracking on phones works matters because places you visit can suggest interests. App permissions on your phone decide which apps can see some of this in the first place.
How an ad slot is sold
When you load a page with ads, the empty slots are often sold in the fraction of a second before the page finishes appearing. A simplified version of the process, usually called real-time bidding:
- The page asks an ad server to fill a slot, passing along limited information such as the page topic, the device type and an identifier.
- A supply-side platform, working for the publisher, offers the slot to an ad exchange.
- The exchange sends a bid request to demand-side platforms, which act for advertisers.
- Each platform checks whether the visitor matches any of its campaigns and decides how much to bid.
- The highest bid typically wins, and that advertiser’s creative is shown.
Not every sale works this way. Some deals are agreed in advance between a publisher and an advertiser at a fixed price, and big platforms that run their own ad systems keep much of the process in-house. The key idea is that your attention is sold per impression, and each impression can be priced differently depending on who the system thinks you are.
Measuring and following up
Advertisers want to know if an ad worked, so systems count impressions, clicks and sometimes later actions like purchases. Retargeting is a common result: if you looked at an item but did not buy, you may be shown it again elsewhere. Frequency caps are meant to limit repeats, though they do not always work across different networks.
Measurement is imperfect. A purchase that follows an ad view may have happened anyway, and different tools often credit the same sale to different ads. Reported results should be read with some caution.
What users can do
You cannot see every step, but you have some control.
- Review settings in the major accounts you use, which often include an ad personalization option.
- Adjust browser privacy settings and consider blocking third-party cookies where your browser supports it.
- Reset or limit the advertising ID on your phone.
- Read privacy policies for the sections on sharing and advertising, even if you only skim headings.
- Remember that private browsing mainly keeps history off your device; it does not stop sites from seeing your visit.
None of this removes advertising. It mostly changes how closely ads are matched to you, and contextual ads can still appear. Rules about consent and data use vary by country and change over time, so what applies to you depends on where you live. For a wider view of the subject, online privacy explains the trade-offs of sharing data in everyday use, and the way recommendation algorithms choose videos and posts shares some of the same logic as ad matching.
Why it matters
Understanding the mechanics makes a few things less mysterious. Ads that seem uncannily accurate are usually the result of ordinary matching on a few signals, not a microphone listening in; it is easy to see how a search, a location visit and a login can add up. And since the whole system rests on collecting and combining data, the amount you share is the one lever that is reliably yours. Targeting is neither purely sinister nor purely helpful: it funds a lot of free content while also concentrating a lot of personal information in many hands.