Site Augmentation
Apply controlled, auditable hide/remove changes to live pages participants visit, scoped by URL pattern, with reusable templates and per-action audit events.
Configuration is usually set up for you
Overview
Site augmentation lets an operator make controlled, declarative changes to the live websites participants visit — specifically, hiding or removing page elements selected by CSS selector and scoped to a URL pattern. It is an intervention tool: where capture rules observe what participants do, augmentation changes what they see, so you can compare conditions (for example, with and without a recommendation shelf) within the same study.
Augmentation is deliberately narrow. The console's own framing is the boundary: operator-only, no arbitrary researcher JavaScript, no remote plugin code. A study config can only describe ordinary hide and remove actions; there is no mechanism to inject scripts, load remote code, or upload
custom plugins. This keeps every change reviewable and reproducible.
How It Works
Augmentation runs inside the LaBrowser browser runtime as each page loads. For
every enabled plugin whose url_pattern matches the current URL,
LaBrowser evaluates each action's selector, finds the matching elements, and
applies the action:
- hide — sets
display: noneon the matched elements (reversibly). - remove — detaches the matched elements from the DOM.
Because modern sites render content dynamically, LaBrowser keeps watching the
page with a mutation observer and re-applies matching actions when new content
appears. Every mutation is tracked: when the participant navigates away or the
page is torn down, hidden elements are restored and removed elements are
re-inserted, and a cleaned_up audit event is emitted. Each action
can emit a SITE_AUGMENTATION_AUDIT event
recording exactly what it matched and did — the evidence that proves what a
participant actually saw.
Site Plugins
Augmentation is configured as a list of site plugins. Each plugin scopes
a set of actions to a URL pattern. Plugins live under the top-level site_plugins key of the study configuration.
site_plugins SitePlugin[] Default: []
Plugin Fields
id string Requiredplugin_id.name string Default: ""
plugin_name.description string Default: ""
url_pattern string Requiredhttps://*/* trigger a warning.enabled boolean Default: true
actions SitePluginAction[] Default: []
triggers SitePluginTrigger[] Default: []
Actions
An action is a single hide-or-remove operation against a CSS selector. Each
action carries a human-readable reason (recorded in the audit trail)
and bounded limits that keep its blast radius small.
id string Requiredaction_id.action "hide" | "remove" Requiredhide sets display: none (restored on cleanup); remove detaches the element from the DOM
(re-inserted on cleanup).selector string Requiredreason string Requiredenabled boolean Default: true
skipped audit event with reason action_disabled.max_matches number Default: 1
matched_count_exceeds_limit) rather than
applied broadly. Values above 5 trigger a warning.once_per_page boolean Default: true
audit boolean Default: true
Safety & Guardrails
Augmentation is bounded by design. The console validates configuration before save, and the browser runtime independently re-checks every action before applying it — defense in depth, so an unsafe action is refused at runtime even if it slips past the editor.
What augmentation will not do
- Forbidden targets. Selectors that target
script,style,link(stylesheets),iframe,webview,html,body, orhead— or use::pseudo-elementsyntax — are rejected. Augmentation only touches ordinary content elements, never page plumbing. - Broad selectors. Page-wide selectors like
*,body,html,head, and:rootare flagged as too broad. - Broad URL patterns. Patterns like
*,https://*/*, andhttp://*/*are flagged as affecting too many pages. - Match limits.
max_matchesis capped at 1–20, and the runtime enforces a hard ceiling of 50 mutations per page. An action matching more elements than its limit is skipped, not applied broadly. - Audit pressure. Turning
auditoff weakens your review evidence and raises a warning — keep it on.
Templates
Templates are built-in, versioned starting points so you don't have to write selectors from scratch. You pick a template, fill in its variables (URL pattern, selector, reason, match limit), choose how to merge it into the study, and the console materializes ordinary site plugins from it. Each template ships with operator notes and a list of risks, and writes only standard hide/remove actions — no JavaScript, no remote code, no researcher-uploaded plugins.
- Recommendation shelf suppression (generic) — hides one bounded recommendation shelf on matching pages using a selector you supply. The general-purpose template for suppressing a "you might also like" style module on any retail site.
- Reference example template — a built-in example-scope template that hides paid-service-style product recommendation shelves on a specific retailer, demonstrating selector patterns (such as attribution-link matching) for a concrete site. It is a worked reference, not a boundary of the system: live DOM varies by locale, device, and A/B test, so production studies should do selector fieldwork before relying on it unchanged.
Apply Modes
When you apply a template, you choose how it merges into the study's existing site plugins:
- Add as new plugin — appends the resolved plugin. If the ID already exists, a numeric suffix is added.
- Merge into existing plugin — appends the template's actions into the matching plugin while preserving its triggers.
- Replace matching actions — replaces only the actions whose IDs match the template's, keeping any manually authored actions.
Audit Events
Every action with audit enabled emits a SITE_AUGMENTATION_AUDIT event for each outcome, stored in the
session event database alongside all other captured events. The audit trail is
the evidence of exactly what augmentation did on the participant's page: which
plugin and action ran, the outcome, how many elements matched, and lightweight
fingerprints of the affected elements.
Outcomes are applied (the change took effect), skipped (a guardrail or condition prevented it — e.g. URL not
matched, selector too broad, match limit exceeded, or no elements found), failed (an error occurred while applying), and cleaned_up (the change was reverted on navigation/teardown). See the Event Reference for the
full payload.
Configuring in the Console
Site augmentation is set up in the Site Augmentation Actions section of the study form. From there you can:
- Add site plugin — create an empty plugin and fill in its URL pattern and actions by hand.
- Apply template — start from a built-in template, customize its variables, pick an apply mode, and preview the resolved JSON before applying.
- Add action — add a hide/remove action to a plugin, with live validation surfacing errors and warnings inline.
The editor counts plugins, actions, and warnings as you go, and a read-only raw
config preview shows exactly what will be written to site_plugins. Blocking errors must be resolved before the study can
be saved. For where this fits among the other study options, see the Study Configuration reference.