Skip to main content

Common selectors

CSS selectors for popular third-party widgets to use with excludeSelectors.
When third-party widgets inject elements inside your <main> content area, AgentXP may include them in the markdown output. Add their selectors to excludeSelectors to strip them.
middleware.ts

Chat widgets

Analytics and tracking

Notification bars and popups

E-commerce widgets

Copy-paste starter

Here’s a combined config with the most common widgets:
middleware.ts
AgentXP already strips nav, header, footer, aside, script, style, noscript, and elements with navigation/banner/contentinfo ARIA roles by default. You only need excludeSelectors for widgets injected inside your main content area.