Autocapture Remote Configuration

Remote configuration updates your 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, applies masking rules, 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.

This page is the canonical reference for the Data > Settings > Autocapture screen.

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.

Availability

Autocapture settings are available on projects that use version 2.10.0 or higher of the Amplitude Browser SDK with fetchRemoteConfig enabled.

Remote configuration by default

SDK version 2.16.1 and higher enable fetchRemoteConfig by default.

To turn off remote configuration, set fetchRemoteConfig to false. Doing so doesn't hide or disable the remote configuration options in Data Settings; the SDK simply stops fetching them.

How it works

When the SDK initializes with fetchRemoteConfig enabled, it retrieves configuration settings from Amplitude's servers using the project's API key. These remote settings merge with any local configuration you defined on your site. After merging, the SDK completes its initialization, along with any plugins, using the combined configuration.

Remote configuration doesn't affect the load time of pages on your site, but it may affect SDK initialization time.

Configuration timeout

If the configuration takes longer than 5 seconds to load from Amplitude's servers, the SDK falls back to the local configuration set during initialization.

Each configuration category on the Settings page offers three options:

Changes you make through the UI take effect after 10 minutes.

Set up remote configuration for Autocapture

  1. Go to Data > Settings > Autocapture.
  2. Set each capture option to Default, On, or Off. By default, Amplitude captures all elements.
  3. Click Save Changes.

Capture options

Element interaction sub-options

Disabling session tracking

If you use Session Replay, make sure your Session Replay SDK version is 1.12.1 or above before you turn off session tracking.

Lower event volume

These options can help you control event volume. By ignoring dead clicks, the Action Click Allowlist is the most efficient method to reduce volume while still tracking relevant interactions.

Element interactions and Zoning Insights

Zoning Insights uses element interaction data to analyze engagement within defined areas of your pages. To use Zoning Insights, enable element interactions, and optionally configure allowlists, either here or in your Browser SDK initialization.

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 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.

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

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 when a zone reports no data for this reason.

Masking and privacy controls

Several of the settings on this page control what text and attribute values Autocapture sends to Amplitude. For the privacy rationale behind each control, and for the masking protections Amplitude applies by default, refer to Autocapture privacy and security.

Was this helpful?

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

On this page