---
title: Autocapture Remote Configuration
description: "Update Autocapture event types, allowlists, captured properties, and the element-path selector from the Amplitude UI without a code change or SDK redeploy."
product: data
lang: en
last_updated: 2026-11-17
token_estimate: 2012
---
# Autocapture Remote Configuration

Remote configuration updates your [Autocapture](https://amplitude.com/docs/data/autocapture) settings from the Amplitude UI without a code change or SDK redeploy. It toggles which event types Autocapture tracks, adjusts allowlists and exclude lists for element interactions, adds extra event properties such as page referrer or page URL across all events, and controls the CSS selector Amplitude writes to `[Amplitude] Element Path`.

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Use Remote Configuration when you want non-engineers to adjust Autocapture without shipping code. If you need the settings hardcoded in the client or want to gate them behind a deploy, configure Autocapture directly in your Browser SDK initialization options instead.

> **Note:**
>
> Autocapture Remote Configuration works with [Browser SDK](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2/get-started) v2.10.0+ when you enable `fetchRemoteConfig`. Browser SDK v2.16.1 enables Remote Configuration by default.

## Set up remote configuration for Autocapture

1. Go to _Data > Settings > Autocapture_.
2. Specify which elements you want to capture. By default, Amplitude captures all elements. You can capture or not capture any of the following elements:

   - **File downloads**: Track when a user clicks an anchor or `<a>` tag linked to a file.
   - **Form Interactions**: Track a user's interaction with the form element.
   - **Sessions**: Track the period of time that a user has your website open. Amplitude tracks both Start Session and End Session events.
   - **Page Views**: Track when a user navigates to a page.
   - **Element Interactions**: Track when users click links, buttons, inputs, and so forth.
3. For Element Interactions, specify the following additional aspects:

   - **CSS Selector Allowlist**: CSS selectors that specify which elements on the page Amplitude always tracks.
   - **Action Click Allowlist**: Additional CSS selectors to track when clicked.
   - **Page URL Allowlist**: Defines one or more URLs or URL patterns on which Amplitude tracks element click and change events.
   - **Page URL Exclude List**: Defines one or more URLs or URL patterns to exclude from element click and change tracking. Note: Using RegEx or glob patterns requires your SDK version to be 2.23.7 or higher.
   - **Text Masking RegEx Patterns**: Defines the RegEx patterns to mask for event properties in Autocapture. Note: Using this masking feature requires your SDK version to be 2.23.7 or higher.
   - **Data Attribute Prefix**: Lets Amplitude capture data attributes as event properties.
   - **Shadow DOM**: Experimental. Enables element interaction tracking inside open shadow roots and sets the maximum shadow DOM depth.
   - **Frustration interactions**: Rage clicks or dead clicks that a user performs. Rage clicks are clicks that occur four or more times in a second. Dead clicks are clicks on an interactive element that result in no visible change within three seconds.
4. Click **Save Changes**.

## Configure Element Selector

Element Selector controls the CSS selector Amplitude writes to `[Amplitude] Element Path` on autocaptured clicks. Zoning Insights stores that same path on each zone and matches later clicks against it. The Browser SDK and Zoning Insights read one remote-configuration value, `autocapture.elementSelector`, so a zone you draw uses the selector the SDK emits for that element.

Go to _Data > Settings > Autocapture_ and find **Element Selector**. The control has three states:

- **Default**: No saved override. Amplitude uses the legacy element path, which is the SDK default.
- **Off**: Amplitude saves an explicit off state and uses the legacy element path.
- **On**: Amplitude uses the selector engine for new clicks and for zones you draw after the change.

The legacy path anchors on any `id` it finds, including an `id` a framework regenerates on each page load. With Element Selector set to On, Amplitude skips ids that match **Autogenerated ID Patterns**, then anchors on a stable attribute, a stable `id`, or element position.

This setting takes effect in [Browser SDK](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2/get-started) 2.45.1 and later, with remote configuration enabled. Browser SDK 2.16.1 enables remote configuration by default. Earlier SDKs ignore Element Selector and keep the legacy path.

### How the engine builds a path

When you set Element Selector to On, Amplitude walks from the clicked element up through its ancestors and uses the first unique anchor:

1. An explicit tracking attribute with a non-empty value. The default attribute is `data-amp-track-id`. `<button data-amp-track-id="checkout">` produces `[data-amp-track-id="checkout"]`.
2. A stable `id`, written as `tag#id`. An id is stable when it doesn't match an autogenerated-id pattern.
3. A positional path of `tag:nth-of-type(n)` steps. The walk stops at the first stable id, or at `<html>` when it finds none.

An empty tracking attribute on an element (`data-amp-track-id=""`) tells Amplitude to ignore that element's `id`.

Amplitude doesn't use CSS classes to tell sibling elements apart. A legacy path such as `div.card > a` becomes a positional path, or an attribute or id anchor, after you turn Element Selector on. Redraw each zone after the change so Zoning Insights stores the new path.

### Override fields

Selecting On shows three optional fields. Leave a field blank to keep the engine default, then click **Save Changes**.

- **Explicit Tracking Attribute**: The HTML attribute Amplitude treats as the strongest anchor. The default is `data-amp-track-id`.
- **Autogenerated ID Patterns**: Regular expressions for ids to ignore, one pattern per line. The field opens with the built-in patterns. Add your own on a new line and keep those lines.
- **Max Ancestor Walk Depth**: How far up the DOM Amplitude walks to find a stable anchor. Leave it blank to walk to `<html>`. A positive whole number stops the walk sooner. A capped path can match more than one element.

> **Note:**
>
> A list you save replaces the built-in patterns. It doesn't merge with them. Clearing the field turns id filtering off, and Amplitude can anchor on generated ids again. Amplitude drops a line that isn't valid regular expression syntax.

### Built-in ID patterns

| Pattern | Matches | Example |
| --- | --- | --- |
| `^:r[0-9a-z]+:$` | React `useId` | `:r5:` |
| `^radix-` | Radix UI | `radix-A1B2C3` |
| `^headlessui-` | Headless UI | `headlessui-menu-button-:r5:` |
| `^mui-` | MUI internal ids | `mui-12345` |
| `^[a-f0-9]{16,}$` | Long hexadecimal ids (case-insensitive) | `a9b8c7d6e5f4321b` |
| `-\d{8,}$` | Eight or more digits at the end of the id | `session-1700000000` |
| `\d{4,}` | Four or more digits anywhere in the id | `product-2134` |

Short lowercase hashes such as `oio45c5` don't match this list. For that shape, add a pattern such as `^[a-z0-9]{7}$`, or put a fixed `data-amp-track-id` on the element. An id you authored that contains four or more digits, such as `cta-2048`, matches `\d{4,}`, so Amplitude skips it. Use `data-amp-track-id` when the id has to contain digits.

Shadow DOM capture stays on **Element Interactions** in the same autocapture settings. When that option is on, a path can include `>>>` between shadow trees. Zoning Insights resolves those paths with the same selector implementation.

### After you change Element Selector

New clicks use the path from the saved setting. Clicks Amplitude already captured keep their original path. A zone drawn before the change still stores the old path, so it doesn't match the new clicks. Redraw the zone after the SDK loads the updated configuration. Go to [Zones show no data because of dynamic element IDs](https://amplitude.com/docs/zoning-insights#zones-show-no-data-because-of-dynamic-element-ids) when a zone reports no data for this reason.

