Vanilla Breeze

data-vb-no-track

Exclude an element (and everything inside it) from Vanilla Breeze analytics. No beacons fire from any descendant, regardless of data-vb-event or auto-wired VB events.

Overview

Put data-vb-no-track on any element to exclude it and all of its descendants from the Vanilla Breeze analytics pipeline. No click event fires, no outbound-link ping is wired, no custom VB event is forwarded — analytics treats the subtree as invisible.

Applies to: any element.

Value: boolean — presence is what matters; the attribute value is ignored.

Basic Usage

Wrap any section you don't want measured.

The exclusion is recursive. Anything nested inside, at any depth, is opted out.

Single-Element Exclusion

You can also put the attribute on a single element.

Exclusion Wins Over Tracking

If a descendant has data-vb-event or would otherwise fire an auto-wired VB event, the nearest data-vb-no-track ancestor suppresses it. This makes it safe to gate a whole page region without combing through its children.

What Still Gets Tracked

The page-level page.view event fires once on page load from Analytics.init(), regardless of where data-vb-no-track is placed — it is a page-level signal, not element-scoped. To opt the entire page out of all analytics, put the attribute on <html> or <body>.

When to Use It

  • Internal tools — admin dashboards, staff-only pages you don't want contaminating visitor analytics.
  • Automated / synthetic traffic — add it programmatically when an E2E test suite is running, or to iframes embedding third-party content.
  • Sensitive actions — surfaces where even anonymous event-level analytics could hint at user intent you don't want stored (e.g. account deletion flows).
  • Preview / scratch sections — content that is visible but shouldn't be measured (staging banners, experimental widgets behind a feature flag).

Opt-Out vs. data-vb-no-track

There are two complementary mechanisms:

MechanismScopeWho controls it
data-vb-no-trackPer element / subtreeAuthor (markup)
Session opt-out (sessionStorage.vb_optout)Entire page, this sessionVisitor (via UI or Analytics.setConsent(false))
Global Privacy Control / Do Not TrackEntire page, respected on every loadVisitor (browser setting)

All three are evaluated on every event. Any one of them suppresses tracking.

Accessibility

  • The attribute has no effect on the accessibility tree or visible rendering.
  • Screen readers, keyboard users, and assistive tech interact with the subtree exactly as they would without it.
  • Does not change focus behaviour, navigation, or any native element semantics.

See Also

  • data-vb-event — declare trackable click events
  • ping — native link-click tracking (not suppressed by data-vb-no-track on the link itself — the runtime removes ping wiring on excluded links, but an author-written ping attribute still fires)
  • referrerpolicy — control referrer information on any request