Tracking attributes
Three optional HTML attributes tell Jellyhook what matters on your pages. Everything works without them; they exist so you decide which form is a lead, which fields are measured and which buttons are counted.
data-conversion: which form is a lead
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). When you chose "I'll label my form" while creating the site, only forms carrying it are recorded as leads. A newsletter box or a search bar is then never mistaken for a lead.
<form data-conversion="true">
...
</form>It must be on the form, not on a button or a wrapping div, and the value must be exactly true.
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-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:
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.