# Data attributes

> Reference for the HTML attributes the Venbit tracker reads, including data-track, data-venbit-private, data-venbit-form and data-venbit-form-kind.

Source: https://venbit.com/docs/developer-guide/data-attributes
Part of the Venbit Intelligence docs (Developer Guide). Index of every page: https://venbit.com/docs/llms.txt
Last updated: 2026-11-30

Five HTML attributes change what the tracker records on a page. One labels a click, two keep typed values private, and two describe forms. You don't need any of them, and most of what Venbit counts works with no attributes at all.

```html
<button data-track="Get a free roof inspection">Start</button>
<input name="gate-code" data-venbit-private>
<div data-venbit-form="quote">...</div>
<form data-venbit-form-kind="search">...</form>
```

They all go on elements in your page. Attributes for the tracker's own script tag (`data-site`, `data-mode`, `data-endpoint`, `data-allow-local`) live in [Install the tracker](https://venbit.com/docs/md/developer-guide/install-the-tracker.md).

## Reference

| Attribute | Goes on | Value | Effect |
| --- | --- | --- | --- |
| `data-track` | Any element | A label, up to 80 characters | A click on the element, or anything inside it, is recorded as a call to action under that label. |
| `data-venbit-private` | A field, or any element around fields | None | What's typed in those fields is never captured. |
| `data-capture="off"` | A field, or any element around fields | `off` | The same as `data-venbit-private`. On the tracker's script tag it turns value capture off for the whole site. |
| `data-venbit-form` | A container that acts as a form, or an `<iframe>` | A name for the form | Treats the container as one form. On an iframe, lets the framed form report its result to the page. |
| `data-venbit-form-kind` | A `<form>` or a `data-venbit-form` container | `enquiry`, `search` or `furniture` | Says what the form is for, which decides whether a send is a lead. |

## data-track

Marks a click as a call to action and gives it a label you choose.

```html
<a href="/quote" data-track="Hero: get a quote">Get started</a>

<div class="plan-card" data-track="Plan card: Gold" role="button" tabindex="0">
  <h3>Gold</h3>
  <p>Full roof replacement</p>
</div>
```

Clicks on links and buttons get recorded anyway, labelled with the element's visible text. If that text or the address reads like a call to action ("Get a quote", "Book now", a link to `/contact`), it's marked as one automatically. Reach for `data-track` when:

- the element isn't a link or a button, so its clicks wouldn't otherwise be recorded as a step,
- the visible text is unclear or repeated ("Learn more" five times on a page),
- you want a label that holds steady when the wording changes.

The click shows up under its label as a step in the visitor's [trail](https://venbit.com/docs/md/user-guide/visitor-trails.md). A [goal](https://venbit.com/docs/md/user-guide/goals.md) of the kind **A link or button** counts it when the label contains the goal's text, so a goal on `get a quote` matches `data-track="Hero: get a quote"`.

Phone links, email links, outbound links and file downloads keep their own type even with `data-track` on them. A `tel:` link is always a phone tap.

For a whole site's calls to action, hand this to a coding agent:

```prompt
Add Venbit data-track labels to this site's main calls to action. Put data-track="Section: action" (up to 80 characters, e.g. "Hero: get a quote") on hero and pricing buttons, on clickable cards or other elements that aren't links or buttons, and on links with vague repeated text like "Learn more". Keep labels stable if the visible wording changes later. Skip tel:, mailto:, outbound and download links, which keep their own type. List every label you added.
```

## data-venbit-private

Keeps a field's value out of everything the tracker captures. Put it on a single field, or on a wrapper to cover every field inside.

```html
<form id="service-request" name="service-request">
  <label>Name <input name="name" autocomplete="name"></label>
  <label>Phone <input name="phone" type="tel" autocomplete="tel"></label>

  <label>Gate code <input name="gate-code" data-venbit-private></label>

  <fieldset data-venbit-private>
    <legend>Insurance</legend>
    <label>Insurer <input name="insurer"></label>
    <label>Policy number <input name="policy"></label>
  </fieldset>

  <button type="submit">Request service</button>
</form>
```

That send still counts as a lead. You'd see name and phone on it, and nothing from the gate code or insurance fields.

Some fields are never captured whether or not they carry the attribute: password fields, card number, security code and expiry fields, social security numbers, CAPTCHA tokens, and hidden and file inputs.

## data-capture="off"

Put on a field or a wrapper, it does the same job as `data-venbit-private`.

```html
<label>Date of birth <input name="dob" type="date" data-capture="off"></label>
```

On the tracker's script tag it applies site-wide. No typed value is captured on any form, and the name and email passed to `venbit('signup')`, `venbit('subscribe')` and `venbit('purchase')` get dropped too. Form sends are still counted, with no contents.

```html
<script defer crossorigin="anonymous" src="https://vnbt.app/m.js?s=KEY" data-site="KEY" data-capture="off"></script>
```

`KEY` is your site's key, found under **Settings**, then **Tracking** in the dashboard. [Privacy controls](https://venbit.com/docs/md/developer-guide/privacy-controls.md) covers this switch in more depth.

## data-venbit-form

Tells the tracker a container is a form when there's no `<form>` element, and gives the form a stable identity.

```html
<div id="quote" data-venbit-form="quote" aria-label="Quote request">
  <input name="email" type="email" placeholder="Email">
  <input name="phone" type="tel" placeholder="Phone">
  <button type="button">Get my quote</button>
</div>
```

Three things follow from it. Fields inside the container are grouped as one form, the same as fields inside a `<form>`. The value becomes the name you pass to `venbit('form_success', 'quote', ...)` and the other form calls. And a multi-step form whose steps replace one another stays one form when every step carries the same value, so values from earlier steps are kept.

On an `<iframe>`, the attribute lets a form hosted on another origin report its result to the page:

```html
<iframe src="https://forms.harborroofing.example/contact" data-venbit-form="contact"></iframe>
```

[Form tracking](https://venbit.com/docs/md/developer-guide/form-tracking.md) describes the message the framed page sends.

## data-venbit-form-kind

Overrides what the tracker decided a form is for.

| Value | Meaning | A send is a lead |
| --- | --- | --- |
| `enquiry` | The visitor is asking the business for something. | Yes |
| `search` | A search box. | No |
| `furniture` | Newsletter sign-up, log-in, cart, coupon, filter, sort and similar. | No |

**The value you set decides whether a send counts as a lead**

1. A form is sent (With data-venbit-form-kind set)
2. enquiry (A send is a lead); search (Not a lead); furniture (Not a lead)

```html
<!-- never count the store locator as a lead -->
<form action="/stores" data-venbit-form-kind="search">
  <input name="postcode" placeholder="Postcode">
  <button>Find a store</button>
</form>

<!-- a one-field callback form that should count -->
<form id="callback" data-venbit-form-kind="enquiry">
  <input name="phone" type="tel" placeholder="Your number">
  <button>Call me back</button>
</form>
```

Any other value gets ignored, and the tracker decides on its own.

## Tracked with no attributes

| What | How it's recognised | Recorded with |
| --- | --- | --- |
| Page views | Page loads and single-page route changes | The path and the page title |
| Phone taps | A click on a `tel:` link | The number, and the link's text |
| Email clicks | A click on a `mailto:` link | The address, and the link's text |
| Outbound links | A click on a link to another host (`www` is ignored when comparing) | The destination host and path |
| Downloads | A click on a link to a `.pdf`, `.doc`, `.docx`, `.xls`, `.xlsx`, `.ppt`, `.pptx`, `.zip`, `.csv`, `.mp4` or `.mp3` file | The file name |
| Links and buttons | A click on any other `<a>` or `<button>` | The visible text, up to 80 characters |
| Scroll depth | Reaching 25%, 50%, 75% and 100% of the page | The milestone |
| Forms | See [Form tracking](https://venbit.com/docs/md/developer-guide/form-tracking.md) | The form's name, and its values unless capture is off |
| Missing pages | A page the server answers with 404 or 410 | The path |

For the full list of what is and isn't collected, see [What the tracker collects](https://venbit.com/docs/md/developer-guide/what-the-tracker-collects.md).

## Common questions

### Do I need data-track for Venbit to count button clicks?

No. Any link or button click is recorded with its visible text, and ones that read like a call to action are marked as one automatically. Use `data-track` for elements that aren't links or buttons, for unclear text, or when you want a label that stays put.

### How do I hide a form field from Venbit?

Add `data-venbit-private` to the field, or to an element around several fields. Whatever's typed there is never captured, and the send still counts as a lead.

### How do I stop Venbit counting a search form as a lead?

Add `data-venbit-form-kind="search"` to the form. Searches and site furniture such as log-ins and newsletter sign-ups are never leads. Only `enquiry` forms are.

### Does data-track change how Venbit counts phone links?

No. A `tel:` link is always a phone tap, and email links, outbound links and downloads keep their own type even when they carry `data-track`.
