Header bidding

Contextual advertising, explained for publishers who sell ads

What is contextual advertising, how do buyers target your pages by topic, and which signals should you send them? A plain 2026 guide for website publishers.

MH AdX card on contextual advertising, showing an article page whose topic decides which ad appears in the slot

Contextual advertising is showing ads based on the content of the page someone is reading, not on who they are or what they did before. A cooking article gets cookware ads, a car review gets car insurance ads. The page's topic, keywords and category decide the match, so no cross-site tracking is needed.

Here's why you should care as a publisher. A growing share of your visitors can't be tracked: Safari blocks cross-site cookies, Firefox walls them off, and many UK and EU readers say no on your consent banner. For all of them, the page is the main thing a buyer has to go on.

So the question isn't whether to "use" contextual advertising. Buyers already do it on your site. The question is whether your pages make it easy for them. This guide covers what it is, how it works in a real auction, and the signals you can send so buyers price your pages properly. If you'd rather have it set up for you, our header bidding service covers the auction side.

What is contextual advertising?

Contextual advertising matches an ad to the page, not to the person. The ad system looks at what the page is about and picks ads that fit that topic. That's the whole idea, and it's older than cookie-based targeting.

So when someone asks "what is contextual advertising?", the short answer is: ads chosen by the content around them.

Google's own How AdSense works page describes it in one line: "AdSense works by matching ads to your site based on your content and visitors." The "content" part of that sentence is contextual. The "visitors" part is personalized targeting, which needs data and, in many countries, consent.

You'll hear a few related terms used almost interchangeably:

  • Contextual targeting. The method: picking where an ad shows based on page content.
  • Contextual ads. The ads that win that way.
  • Keyword targeting. The simplest form, where a buyer targets pages that contain certain words.
  • Category or topic targeting. The buyer targets pages filed under a topic, such as "Food and Drink" or "Automotive".

From your side of the table, all four mean the same thing. Buyers are judging your page, so the page needs to be easy to judge.

How does contextual advertising work?

Contextual advertising works by turning your page into signals that travel with each ad request. Buyers read those signals, decide whether the topic fits their campaign, and bid. If the signals are vague or missing, they either guess or pass.

Here's what happens in a typical programmatic auction, step by step:

  1. Your page loads. Your ad tags fire, for example Google Publisher Tag (GPT) for Ad Manager or a Prebid.js wrapper for header bidding.
  2. The page gets classified. Some signals come from you, such as key-values, categories and keywords in your ad tags. Others come from crawlers your SSPs or buyers run, which read the URL, title and text and file the page under a topic.
  3. The signals go into the bid request. The request carries the page URL, the domain, any categories and keywords, and the slot size. In OpenRTB terms, much of this sits in the site object. Our guide to real time bidding auctions shows a full sample request.
  4. Buyers match their campaigns. A DSP running a cookware campaign looks for food pages. A brand with strict brand safety rules skips pages flagged as sensitive.
  5. The highest bid wins and the ad serves. The reader sees an ad that fits the article, whether or not anyone knows who they are. Our guide to how an ad auction picks the winner covers what "highest" really means once floors and direct campaigns join in.

The part most publishers miss is step 2. You don't control the buyer's crawler, but you do control what your own tags say and how clearly your page states its topic. A page titled "Quick weeknight pasta" in a "Recipes" section is easy. A page titled "You won't believe this" with no category is a coin toss.

And if a crawler can't load the page at all, nobody can read it. AdSense shows that as the AdSense site down or unavailable error.

How contextual targeting reads a page

Modern classifiers look at more than single keywords. Depending on the vendor, they'll weigh:

  • the page title, headings and URL path;
  • the body text and how often topic words appear in it;
  • the section or category the page lives in;
  • image and video context, where the vendor supports it;
  • the tone of the page, so a brand doesn't land next to bad news.

Which of these a given buyer uses varies by partner, and few of them publish the details. What's safe to assume: clear titles and one topic per page help every one of them.

Contextual vs behavioral targeting

The difference between contextual vs behavioral targeting is what the ad is based on. Contextual looks at the page in front of the reader right now. Behavioral targeting looks at the reader's past activity, usually tracked across sites with cookies or device IDs.

Contextual targetingBehavioral targeting
Based onThe current page: topic, keywords, categoryThe visitor's past browsing, purchases or segments
Needs a cross-site IDNoYes, a cookie, device ID or other identifier
Works on Safari and Firefox trafficYesMostly not, as both block or partition cross-site cookies by default
Works when a UK or EU visitor declines consentYes, as non-personalized adsNo
What you control as a publisherPage structure, titles, categories, key-values, first party data in your tagsConsent, ID modules, first-party IDs such as PPID
Typical buyersBrand campaigns, topic-led campaigns, brand safety-sensitive advertisersRetargeting, audience and performance campaigns

They aren't rivals on your site. Most impressions you sell are priced on both: the page tells the buyer the topic, and an ID, when there is one, tells them about the person. When the ID is missing, context is all that's left. That's why weak context costs you most on exactly the traffic that's already harder to sell.

Why contextual ads matter for your revenue in 2026

Contextual ads matter because a large share of your traffic is already sold on context alone. That's true even though Chrome kept third-party cookies. Several pages on page one still say cookies are being phased out, so let's get the facts straight.

On 17 October 2025 Google said Chrome "will maintain our current approach to offering users third-party cookie choice", in its update on plans for Privacy Sandbox technologies. The same post retired the Topics API, which had been pitched as an interest-based replacement for cookies. Prebid's Topics module page now says Chrome has removed the Topics API and the module does nothing since Prebid.js 11.26. Our guide to what's left of Privacy Sandbox covers the other APIs that went with it.

So the cookie story didn't end with a cookieless web. It ended with a split one:

  • Chrome visitors who accept ads cookies can still be targeted by behavior.
  • Safari and Firefox visitors mostly can't, because both browsers block or partition cross-site cookies by default. Our guide to third party cookies has the dated status for each browser.
  • Visitors who decline consent in the UK and EU get non-personalized ads.

That last group is the one people forget. Google's page on personalized and non-personalized ads says non-personalized ads "are not based on a user's past behavior". Instead they use contextual information, including coarse geo-targeting, and the content on the current site or app. In plain words: for those readers, your page content is the targeting.

Put the three groups together and, on many sites, contextual targeting is pricing a big slice of impressions. The exact share varies a lot by country, device and audience, so check your own reports by browser and by consent status before you guess.

Contextual advertising examples from the publisher side

The best contextual advertising examples are the ones you'll recognise from your own pages. Here are five, written from the seller's seat, with what decides the match in each.

  1. A recipe page. An article on weeknight pasta sits in a "Recipes" section. Cookware, grocery delivery and kitchen appliance campaigns target food pages, so they bid. No one needs to know the reader cooks.
  2. A car review. A review of a family SUV attracts car brands, tyre makers and insurance campaigns that buy automotive content.
  3. An AdSense blog. A small travel blog with AdSense gets hotel and luggage ads even for visitors Google knows nothing about. That's AdSense matching ads to the site's content, as Google's help page describes.
  4. A declined-consent visitor in Germany. The reader says no on your banner. Google serves a non-personalized ad picked from the page content and coarse location, such as the city.
  5. A breaking news page. A story about a plane crash. Airlines and travel brands with brand safety rules skip it on purpose, even though the topic is "travel". Context works in both directions.

Example 5 is worth a pause. Contextual targeting doesn't only add demand to good pages. It also removes demand from pages that look risky. Mixed pages, such as a recipe post with a long comment war under it, can get flagged for the wrong reasons.

How to make your pages easy for contextual targeting

You make contextual targeting work by stating your page's topic clearly, in the page and in your ad tags. Start with the page itself, then add key-values in Ad Manager and first party data in Prebid. Each step is small, and they add up.

1. Fix the page structure first

Every classifier reads your title, headings and URL. Give each article one clear topic, a descriptive title and a section or category that says what it is. Keep sensitive topics on their own pages instead of mixing them into general posts. This also helps search, so it's never wasted work.

2. Use the IAB Content Taxonomy as your shared language

Buyers and sellers need the same names for topics. That's what IAB Tech Lab's Content Taxonomy is for. Its page lists version 3.1 as current and says "typical uses of the content taxonomy are contextual targeting and brand safety." Map your own site sections to its content categories once, in a spreadsheet, and reuse that map in your tags.

3. Add page-level key-values in Google Ad Manager

Google's help page on key-values says they "let you define custom targeting" and are included in ad tags. Set up keys such as section and topic in Ad Manager under Inventory, then Key-values, and pass them from the page. The GPT key-value targeting guide shows page-level targeting with setConfig, which applies the same key-values to every slot on the page:

googletag.setConfig({
  targeting: { section: 'recipes', topic: 'pasta' }
});

The key names here are examples; yours must match what you created in Ad Manager. Direct and programmatic deals can then target those values, and your reports can split revenue by section. If deals are new to you, our guide to the ways buyers purchase your ad space explains each type and its deal ID.

4. Send first party data through Prebid

If you run header bidding, Prebid passes page context to bidders in the ortb2.site object. Prebid's first party data docs list the standard fields: name, domain, cat, sectioncat, pagecat, page, ref, search and keywords. A trimmed version of their example looks like this:

pbjs.setConfig({
  ortb2: {
    site: {
      cat: ["IAB2"],
      sectioncat: ["IAB2-2"],
      pagecat: ["IAB2-2"],
      keywords: "power tools, drills",
      content: {
        data: [{
          name: "www.example.com",
          ext: { segtax: 7 },
          segment: [{ id: "687" }]
        }]
      }
    }
  }
});

Two details save you time. Prebid fills site.keywords from your meta keywords and JSON-LD tags on its own, unless you set it to null. And the segtax number names the taxonomy: Prebid's table lists 5, 6 and 7 for Content Taxonomy 2.1, 2.2 and 3.0. Prebid also says to check with your SSPs and DSPs which taxonomies they support, so ask before you build. Our Prebid.js setup guide shows where this config sits in your wrapper.

5. Keep your own data in your own segments

If you have more data than page topics, such as logged-in readers or newsletter subscribers, that's first-party audience data, not context. A data platform can turn it into segments that sit next to your contextual signals. Our DMP guide for publishers covers when that's worth the cost.

Our view: don't buy a contextual "solution" before steps 1 to 4 are done. Most of the gain comes from telling buyers clearly what each page is about, and that part is free.

Advantages and disadvantages for publishers

Contextual advertising is good for publishers because it works on almost every impression, needs no cross-site ID and rewards good content. Its weak spots are reach on thin or mixed pages and lower prices from buyers who want a specific person.

Advantages

  • It works on cookieless traffic. Safari, Firefox and declined-consent visitors can all be sold on context.
  • It rewards what you already do well. Strong, focused content is the targeting.
  • It needs less personal data. Context alone isn't based on the reader's history, which makes it simpler for privacy. Consent rules still apply to cookies your ad tags set, for example for frequency capping.
  • It suits brand campaigns. Brands that care about where their ads appear like knowing the topic up front.

Disadvantages

  • It can't find a person across sites. Retargeting and audience buyers often bid less, or not at all, without an ID.
  • Broad pages are hard to place. Home pages, tag archives and "top 10 of everything" lists don't map to one topic.
  • Brand safety cuts both ways. A classifier that misreads a page can block good demand from it.
  • Some topics simply attract fewer buyers. Context can only price a topic that advertisers want.

On balance, we'd treat contextual targeting as the floor under every impression and personalized targeting as a bonus on top, where consent and the browser allow it.

What we check first on a publisher's site

When we review a publisher's setup for contextual targeting, we go through the same short list in the same order. You can run it yourself in an afternoon.

  1. Read ten page titles. Pick ten recent articles. Could a stranger tell the topic from the title and URL alone? If not, fix the template or the titles first.
  2. Check the category structure. Every article should sit in one clear section. Long tag lists with one post each don't help anyone.
  3. Split revenue by browser and by consent. Compare RPM for Chrome, Safari and Firefox, and for consented and declined traffic in the UK and EU. Safari and declined traffic show you roughly what context alone earns today.
  4. Look for key-values in Ad Manager. If there's no section or topic key, you can't target or report by context. Add them.
  5. Open the Prebid config. Check for ortb2.site with categories and keywords. If it's empty, bidders only have the URL.
  6. Check mixed pages. Look at pages that combine safe topics with sensitive ones, or that carry heated comment threads. Those are the pages brand safety filters skip.

Most sites we look at get steps 4 and 5 wrong. They're the cheapest fixes on the list, so start there once your titles are sorted.

Frequently asked questions

What is contextual advertising in simple terms?

It's ads picked to match the page someone is reading. A cooking article shows cookware ads because of its topic, not because anyone tracked the reader. The page's content, keywords and category decide the match.

Is Google AdSense contextual advertising?

Partly. Google says AdSense matches ads to your site based on your content and your visitors. The content part is contextual. Where a visitor can be personalized and has agreed to it, AdSense can also use their data.

What is the difference between contextual and behavioral targeting?

Contextual targeting uses the page in front of the reader right now. Behavioral targeting uses the reader's past activity, usually tracked across sites with cookies or device IDs. Contextual works on Safari, Firefox and declined-consent traffic; behavioral mostly doesn't.

The targeting itself doesn't rely on the reader's history, but your ad tags may still set cookies, for example for frequency capping and reporting. Where the UK and EU cookie rules apply, those uses still need consent. Check the rules for the countries your visitors come from.

Can I turn contextual advertising on or off?

Not really, because buyers already judge your pages by their content. What you can do is make it work better: clear titles and categories, page-level key-values in Ad Manager, and categories and keywords in your Prebid config.

Are third-party cookies going away, making contextual ads the only option?

No. In October 2025 Google said Chrome will keep giving users third-party cookie choice, and it retired the Topics API. But Safari and Firefox block or partition cross-site cookies by default, so context already prices a large part of most sites' traffic.

Next step

Contextual advertising already prices your Safari, Firefox and declined-consent traffic, so every page that states its topic clearly earns more from it. Fix your titles and categories, add key-values and Prebid first party data, then compare revenue by browser to see the change. If you'd like a second pair of eyes on your setup, ask us for a free site review.

Free tools

Is your site ready for Google AdX?

Check your AdX eligibility

Our current screening asks for $1,000 or more in two separate months of the last three, and invalid traffic under 10%.

Free AdX readiness checklist (PDF)

The 25 checks we run before recommending a site for AdX through MCM. Enter your details and download it straight away.

We will only use your email to reply about your site.

WhatsApp