Skip to content
Know.itKnow.it
Create an animated lesson
On request

This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.

How do online ads target you?

TechnologyLesson on requestFree to read

Quick answer

Online ads target you by tracking your browsing through cookies and pixels, building a profile of your interests, and then auctioning ad space to advertisers in real time. The highest bidder wins the right to show you an ad tailored to that profile, all within milliseconds.

Online ads target you by tracking your activity across websites, then using that data to place you in audience segments that advertisers bid to reach in real time. The entire process runs on cookies, pixels, and auction systems that exchange your behavioural signals for ad space.

Step by step

  1. You visit a website that contains ad slots and tracking scripts.
  2. A cookie is placed in your browser, assigning a unique identifier to your device.
  3. Tracking pixels record your behaviour—pages viewed, clicks, time spent—and send this data to ad networks.
  4. Ad networks combine this data with other sources to build a detailed interest profile about you.
  5. When you load another page with ads, an auction runs: advertisers bid to show you an ad based on your profile.
  6. The winning ad is displayed, and the network logs the impression to improve future targeting.

Key things to understand

  1. When you visit a site, small files called cookies are stored in your browser, recording a unique ID that identifies your device.
  2. Advertisers embed tracking pixels—tiny invisible images—on pages to log when you view content, what you click, and how long you stay.
  3. This data feeds into a profile that sorts you into interest categories, such as 'frequent traveller' or 'technology enthusiast'.
  4. When a page loads an ad slot, an automated auction runs in milliseconds: advertisers bid based on your profile and the page context.
  5. The winning bid's ad is displayed, and the entire cycle repeats across sites, refining the profile with each new interaction.

Labelled diagram

  1. Visit website

    You load a page that includes ad slots and hidden tracking code.

  2. Cookie placed

    A small file stores a unique ID in your browser to recognise you later.

  3. Behaviour logged

    Pixels record what you click, view, and how long you stay.

  4. Profile built

    Ad networks combine data to infer your interests and demographics.

  5. Auction runs

    Advertisers bid in real time to show you an ad based on your profile.

  6. Ad displayed

    The highest bidder's ad appears, and the cycle continues.

How an ad gets targeted to you

Real-world examples

  • After searching for flights to Tokyo on a travel site, you see ads for hotels in Tokyo on a news website.
  • A fitness brand shows you ads for running shoes on social media because you frequently visit running blogs.
  • You browse a cooking recipe, and later see ads for kitchen appliances on a completely different site.
  • A car manufacturer targets ads to users who have recently visited auto review sites, identified through tracking pixels.

Common mistake

✗ Myth: Online ads target you only based on the website you are currently visiting.

✓ Fact: Targeting usually relies on your browsing history across many sites, not just the current page. Ad networks track you over time to build a detailed profile, so an ad on a news site may be based on your earlier activity elsewhere.

People also ask

How do advertisers track me online?
Advertisers track you using cookies, tracking pixels, and device fingerprints. Cookies store a unique ID in your browser; pixels log your visits and actions; fingerprints combine details like your browser version and screen size. These methods link your activity across sites, allowing advertisers to build a profile without knowing your real name.
What is retargeting in online ads?
Retargeting shows you ads for products or services you previously viewed but did not buy. When you visit a site, a cookie records that visit. Later, as you browse other pages, ad networks recognise the cookie and display ads for those same products, aiming to bring you back to complete a purchase.
Are online ads based on my microphone?
There is no reliable evidence that mainstream apps secretly listen through your microphone to target ads. Most targeting comes from browsing data and cookies. Coincidences can occur because advertisers track your interests broadly, and you may notice ads that match things you discussed but had also searched for or seen online.
Can I stop online ads from targeting me?
You can limit targeting by adjusting browser privacy settings to block third-party cookies, using ad blockers, or opting out of personalised ads on platforms. However, ads may still appear—they just become less relevant because they rely on context rather than your history.
Do advertisers know my name and address?
Usually not directly. Most targeting uses pseudonymous IDs linked to browsing behaviour. Personal details like your name are only connected if you voluntarily provide them, such as by logging into a site or filling a form that shares data with ad partners.
Why do I see ads for things I already bought?
This happens because tracking systems may not immediately register your purchase, or they continue showing ads to everyone in a similar audience segment. It can also be a deliberate strategy to encourage repeat purchases or related items.
What is real-time bidding?
Real-time bidding is the automated auction that happens each time an ad slot loads. Advertisers submit bids in milliseconds based on your profile, and the highest bidder's ad appears. It allows advertisers to target specific audiences instantly across many websites.

Part of the guide: How the Internet Works →