Page basics

How do I stop pop-ups and cookie banners from blocking AI agents?

Keep the product page readable behind your cookie banner instead of covering it, make every pop-up a real dialog that closes with a labeled button or the Escape key, and don't open marketing pop-ups on a shopper's first page. Agents such as Google's Gemini and Anthropic's Claude are built to hand cookie consent back to the person, so a banner that hides the whole page can stop the task right there.

Author
Aiscovery team
Published
Updated
Reading time
7 min read

Why overlays stop AI agents

Agents that browse for a shopper are built to leave consent to the shopper. Google's Gemini computer use model hands control back for cookie banners and privacy prompts. Gemini in Chrome pauses for cookies, sign-in and CAPTCHAs until the person clicks Take over task. Anthropic tells developers to ask a person before accepting cookies. If the banner covers the product, the agent can't read the price until someone answers it, and often nobody is watching.

OpenAI's help page for ChatGPT's cloud browser says each website ultimately decides whether to allow its traffic. To the shopper, a store that blocks the agent and a store that hides behind an overlay look the same: the assistant couldn't get the answer.

Common overlays on a store and how they affect agents
OverlayWhat happens to an agentFix
Cookie wall that hides the page until you chooseHands consent back to the person and waitsA banner that leaves the page readable behind it
Newsletter or discount pop-up on the first pageHas to find and close it before reading anythingShow it later, never before the price is visible
Country or currency selector as a full-screen modalMay not know which country to pickDefault to a country, offer the switch inline
Age gateMay need the person to confirmKeep it only where the law requires it, as an overlay
Chat widget that covers Add to cart or the priceReads or clicks the wrong elementKeep it collapsed and clear of the buy box
CAPTCHA or bot challenge on product pagesStops: agents are told not to solve CAPTCHAsKeep challenges for login, checkout and forms

Fix the overlays

  1. Step 1: Let the page stay readable behind the cookie banner

    Keep whatever consent choices your legal team requires. The change is the layout: a banner at the bottom or side, with Accept and Reject as equal buttons, and the product, price and stock still in the page and not hidden behind a full-screen layer. Google's Search guidance asks for the same: banners that take up a small part of the screen.

  2. Step 2: Make every pop-up a real dialog

    W3C's modal dialog pattern: the dialog has role="dialog" and a name, focus moves into it, Tab stays inside, Escape closes it, and focus returns to where it was. A labeled close button gives an agent something it can find by name.

    HTML: a dialog an agent can close
    <div role="dialog" aria-modal="true" aria-labelledby="signup-title">
      <h2 id="signup-title">Join our newsletter</h2>
      <!-- form -->
      <button type="button" aria-label="Close">×</button>
    </div>
    
    <script>
      document.addEventListener("keydown", (event) => {
        if (event.key === "Escape") closeSignupDialog();
      });
    </script>
  3. Step 3: Delay marketing pop-ups

    Don't open a newsletter or discount pop-up on the first page a visitor lands on. Show it after a second page view, on exit, or after a scroll, and never on top of a product's price.

    JavaScript: open the pop-up from the second page view
    const views = Number(sessionStorage.getItem("pageViews") ?? 0) + 1;
    sessionStorage.setItem("pageViews", String(views));
    if (views >= 2) openSignupDialog();
  4. Step 4: Don't block prices behind a country picker

    Pick a default country and currency from the domain or the visitor's location, show prices straight away, and offer the switch as a menu, not a modal that must be answered first.

  5. Step 5: Keep bot challenges off browsing pages

    A CAPTCHA on a product or collection page stops agents completely. Google's sample instructions forbid its model from solving them, and Anthropic says its crawlers won't try to bypass them. Use challenges where they protect something: login, checkout and forms. See does Cloudflare block AI agents.

Test it like an agent

  1. Step 1: Open a product page in a private window

    No cookies, no history: the way an agent's fresh browser arrives. Use a phone-sized window too, where overlays cover the most.

  2. Step 2: Answer three questions without clicking

    Can you read the product name, the price and the stock state? If an overlay hides any of them, an agent has to deal with it first.

  3. Step 3: Close everything with the keyboard

    Press Tab to reach each close button and Escape to close each dialog. If you can't, neither can an agent that works through the accessibility tree.

In Aiscovery's AI agent test runs, named AI agents try key shopping tasks on your store in a read-only browser, and the masked step screenshots show the overlay an agent met and what it did next. See how a test run works.

Keep going

Questions store owners ask

Will AI agents accept my cookie banner?

Many are built not to. Google's Gemini computer use model requires user takeover for cookie consent banners, and Anthropic tells developers to get a person's confirmation before accepting cookies.

Can I hide the cookie banner from bots?

We don't recommend it. Serving bots a different page is hard to keep in step with the real one and easy to get wrong. Make the banner non-blocking for everyone instead.

Do pop-ups hurt Google rankings too?

Google says intrusive dialogs that obscure the page can lead to poor search performance, and recommends banners that take up a small part of the screen. Legally required interstitials, such as age gates, are an exception.

Is a chat widget a problem?

Only when it covers the price, the options or Add to cart, or opens on its own. Keep it collapsed until someone opens it.

Sources

Every technical claim on this page comes from the vendor's own documentation, checked on the date shown as Updated. Crawler names and settings change, so check the source before you edit a live store.

  1. 01Computer useGoogle AI for Developers (Gemini API)
  2. 02Use Gemini in ChromeGoogle Chrome Enterprise and Education Help
  3. 03Computer use toolClaude Developer Platform
  4. 04Does Anthropic crawl data from the web, and how can site owners block the crawler?Anthropic
  5. 05Using cloud browser in ChatGPTOpenAI Help Center
  6. 06Avoid intrusive interstitials and dialogsGoogle Search Central
  7. 07Dialog (Modal) PatternW3C WAI-ARIA Authoring Practices Guide

See what AI agents do in your store.

A short call: we run the site check on your store, show what robots.txt tells each AI crawler, and walk through a test run where named AI agents try key shopping tasks.

Have a real workflow to test now? Apply as a launch partner

We only use this to arrange your demo. Privacy notice