DocsTracking attributes
Core concepts

Tracking attributes

Four optional HTML attributes tell Jellyhook what matters on your pages. Everything works without them; they exist so you can decide in code which form is a lead, which fields are measured, which fields are left out and which buttons are counted. Which forms count as leads can also be set without code, in Settings, Lead forms.

data-conversion: decide in code whether a form is a lead

Optional. By default every form with an email counts as a lead, and each form has a switch in Settings, Lead forms. data-conversion="true" makes a form always a lead and data-conversion="false" never one. The attribute wins over the switch, and the form's row in Settings shows that it is set in code. Put it on the <form> element itself, or on any element around it (needed for forms a tool such as HubSpot builds for you; see Supported forms). Sites created with the older choice "Only the form I label" keep that behaviour: a form counts only when it carries the attribute or is switched on in Settings.

<form data-conversion="true">
  ...
</form>

The value must be exactly true or false. On the form itself or on an element around it is fine; on a button it does nothing.

data-track-field: which fields are measured

By default every field of a form is measured: how long people stay in it and where they stop. Add data-track-field to some fields and only those are measured (and only those are stored in the lead's raw form data). A form with no marked field keeps tracking all of them.

<form data-conversion="true">
  <input name="email" data-track-field>
  <input name="company" data-track-field>
  <input name="notes">   <!-- not measured -->
</form>

It goes on the input itself, or on a wrapper around it, and it must be inside a form. The lead's name, email and phone are still recognised from the form as before, so restricting fields does not stop a lead from being identified.

data-jh-ignore: which fields are left out

Put it on a field, or on an element around it inside the form, and that field is left out completely: no value, no timing, not in the field list. Payment cards, bank accounts and identity numbers are already left out automatically; use this for anything else you do not want stored.

<div data-jh-ignore>
  <textarea name="medical_history"></textarea>
</div>

Details and the full list of what is never stored: Sensitive fields.

data-track-click: which buttons are counted

Clicks are not recorded unless you ask. Put the attribute on a button or link and give the click a name; the name is what you will see in your data.

<a href="/pricing" data-track-click="hero-pricing">See pricing</a>

With an empty value, the element's id is used, then its visible text. Repeated clicks on the same name within one second count once.

Checking they work

People put these attributes in the wrong place and assume they work. Open Settings, Tracking, Attribute check. Each attribute shows one of four states, per page:

WorkingA real event came from it: a real lead from the marked form, real field timings from a marked field, a real click on a marked element. This is the only state that proves it works.
Found, waiting for activityThe tracker saw the attribute on a page, but nobody has used it yet. Submit your own form or click your own button once to prove it.
MisplacedThe attribute is on the wrong kind of element, or has the wrong value. The check names the page and what is wrong.
Not in useThe tracker has not seen the attribute on any page it has loaded. The attributes are optional, so this is not a problem.

The tracker reports what it finds when a page loads, at most once every six hours per page, so a fix shows up the next time the page is opened after that.