Go back

← All guides · Ingenious AI team · November 14, 2026 · Reviewed November 14, 2026

Script-Only Buy Buttons: The Control AI Agents Cannot Use

The short answer

A buy button rendered only by JavaScript does not exist for a plain read — the agent sees a product it cannot add, and the gauntlet names the stall script_only_control. The fix is the oldest pattern on the web: a standard add-to-cart form or a /cart/add endpoint the page exposes in its HTML. The audit's add_to_cart_signal check looks for exactly that exposure. Test your product pages with the free store audit.

Audit my store — free

What 'script-only' means, mechanically

The simulation at the audit's core is a plain HTTP read: fetch the page, read what the HTML contains. On a healthy product page, the HTML contains an add-to-cart form, a /cart/add reference or the words and links of a buy path. On a script-only page, the HTML contains a placeholder — an empty container, a data attribute, a script bundle — and the button is constructed later, in the browser, by JavaScript execution. A human's browser performs that construction invisibly. A plain read does not execute the bundle, so at the moment of decision the control is absent.

The live probe confirms the distinction rather than assuming it: live_cart_add attempts a real add and reads the cart back. When the only route to the cart is a control a plain read cannot act on, the gauntlet records script_only_control at the cart_add step. Two different methods — static read and live attempt — converge on the same finding, which is why the fix is structural, not cosmetic.

Where script-only controls come from

Rarely from the core platform. They arrive with app-injected buy buttons, theme frameworks that hydrate every interactive element, A/B tools that swap controls after load, and 'modernized' product pages rebuilt as script applications with the buy path inside the app. Each layer is defensible in isolation; the composition is a purchase path that exists only at runtime. The audit does not grade the architecture — it reports that the add step, as served, cannot be acted on by the class of reader that agents are.

The tell in your own testing: view the product page's source (not the inspected DOM — the raw source) and search for the add-to-cart form or /cart/add. If the raw HTML has no path to the cart, neither does the agent. The inspected DOM will show the button, because your browser built it; the DOM is the human's view, the source is the agent's.

The standard-form fix

The remedy is refreshingly unglamorous: expose a standard add-to-cart form or endpoint in the served HTML — the pattern the audit's fix text prescribes — and let your scripts enhance it after load for human visitors. Progressive enhancement was designed for exactly this: the control works in the base document, and JavaScript improves it. An agent gets the base document, which is enough: a form it can submit, an endpoint it can call, a cart that then answers with the item in it.

After the fix, verify at both levels: the core simulation should flip add_to_cart_signal to pass, and the live probe should confirm the add by reading the cart back (live_cart_add). The full purchase-path picture is in the stall gauntlet, explained and the add-to-cart path agents can act on.

Sources

There is a historical irony worth savouring while you fix this: the plain form is not a legacy concession but the web's original purchase mechanism, and it outlasted every framework that replaced it because it states the transaction in the document itself. Agents are simply the newest readers to depend on that statement. A store that restores the form is not dumbing its product pages down; it is publishing them in the one dialect every reader — browser, agent, screen reader, archive — is guaranteed to speak. The enhancements can be as rich as you like, provided the sentence underneath them still says, in plain HTML: this product, this variant, add it here.

Five actions to take

  1. Read your raw page source. Search the served HTML of a product page for the add-to-cart form or /cart/add — not the browser's inspected DOM.
  2. Expose a standard add path in the HTML. A real form or endpoint in the base document, before any script runs.
  3. Enhance, do not replace. Let JavaScript improve the working control for human visitors instead of constructing the only version of it.
  4. Audit app-injected buttons. Any third-party buy control must leave a plain-read-actable path behind, or it owns a stall.
  5. Verify with the live probe. add_to_cart_signal passes in simulation and live_cart_add confirms the item in the cart read-back.

Worked example: Highfield Ceramics, 54 to 84

Example — a fictional store, shown to illustrate how the audit's findings and fixes fit together. These are the example's numbers, not a customer's results.

Highfield Ceramics is a fictional 27-product ceramics store. Its first audit scored 54/100:

The fixes, in the order the audit's impact weights dictate:

The re-audit scored 84/100. The store is the purest form of the lesson: discovery, data and policies were all sound, and the entire agent channel was closed by one missing form element in the served HTML.

Run the free store audit · See pricing · Ingenious AI

Frequently asked questions

What does script_only_control mean?

The stall gauntlet's name for a purchase walk whose add step exists only as JavaScript — a buy control constructed at runtime that a plain read cannot see or act on. The report names it at the cart_add step.

My button works fine for customers. Why does the audit fail it?

Because customers' browsers execute the script that builds the button, and agents' plain reads do not. The audit's add_to_cart_signal check reads the served HTML for an add-to-cart form, a /cart/add path or an add-to-cart link — what the raw document offers, not what the DOM becomes.

How can I check my own pages?

View the raw source of a product page and search for the add-to-cart form or /cart/add. If it is only findable in the browser's inspected DOM after scripts run, it is script-only from an agent's point of view.

What is the correct fix?

Expose a standard add-to-cart form or /cart/add endpoint in the served HTML — progressive enhancement: the base document contains a working control, and JavaScript enhances it for human visitors. Then verify with the live cart-add probe, which reads the cart back.

Do app buy buttons cause this?

They are a common source: app-injected buttons are frequently script-constructed. Any injected control needs to leave a plain-read-actable add path in the document, or it becomes the stall the gauntlet names.

Keep reading

Start from the top of the subject: Why AI Shopping Agents Skip Your Store · Can AI Agents Buy From Your Store? · Agentic Commerce Checklist for Online Stores. Then run the instrument itself: the free store audit, the Store Audit lab, and the pricing page. All guides are listed in the guides index.

Previous guide: Do CAPTCHAs and Challenge Pages Block AI Shopping Agents? · Next guide: Dead Checkout Links: How to Find and Fix Them Before Agents Do