Skip to content
Skip to main content
European Data Processing
← Back to Documentation

Autocapture

The moment the VeritaMetrics script is installed, it records what people do on your site: clicks, form submissions, outbound links, downloads, scroll depth, and the two frustration signals. There is nothing to tag and no extra code to write.


What autocapture records

These events are captured automatically from the first pageview. This is the product-analytics layer (how visitors use your site), on top of the traffic counts.

Clicks on buttons and links Recorded with the visible label of the element that was clicked.
Form submissions Captured with the submit-button label, so you can see which forms convert.
Outbound link clicks Any click to another domain is detected, with the destination URL.
File downloads Clicks on PDFs, spreadsheets, and archives are recorded on click.
Scroll depth How far down the page each visitor gets (25%, 50%, 75%, 100%).
Engaged time Active time on the page, counted only while the tab is in view.
Frustration signals A rage click (rage_click) is three clicks on one spot inside a second. A dead click (dead_click) is a click on something that looks clickable and changes nothing for 700ms.

How events appear in your dashboard

Top Events groups your events by name, so form_submit and Signup each appear as their own row with its own total. Open a row to drill in: the panel breaks that event down by the page it fired on, an element label, and the link destination.

A captured click looks like this on the wire, with the visible label attached as a property:

Captured click
{ "n": "cta_click", "p": { "text": "Add to cart" } }

Name an element, and the click becomes a key

Autocapture already records the click. What it cannot know is which control you meant: every card on a page has an expander, they all say "Show more", and a label read off the page is a guess that changes the day somebody rewrites the copy. Putting data-verita-event-name on an element names the event yourself. The name survives a copy edit, a translation and a redesign, and it is what you turn into a goal. There is still no JavaScript to write.

It works on anything clickable. A button and a link are tagged the same way:

Name a goal (HTML)
<button data-verita-event-name="signup" data-verita-prop-plan="pro">
  Sign up
</button>

<a href="/signup" data-verita-event-name="trial_start" data-verita-prop-plan="pro">
  Start a trial
</a>

Each data-verita-prop-* attribute becomes a property on the event. The part after the prefix is the property name, lowercased with hyphens turned into underscores, so data-verita-prop-cart-total arrives as cart_total. A tagged link reports under its own name rather than as an outbound or internal link, so tagging replaces the automatic event instead of adding a second one. See Custom events and definitions for how to name and shape events, and Goals and data export to turn a named event into a tracked conversion.

What arrives
{ "n": "signup", "p": { "plan": "pro", "page_location": "/pricing", "label_source": "key" } }

Untagged elements still report, as a guess

Nothing has to be tagged. An untagged click is still captured, labelled from whatever the tracker could read off the page, and marked "label_source": "derived" so a report can tell the two apart. A derived click also carries context, the nearest heading above it, which is what separates two expanders that read the same:

Untagged click
<section><h3>Top Pages</h3><button>Show more</button></section>

{
  "n": "button_click",
  "p": { "text": "Show more", "context": "Top Pages", "label_source": "derived" }
}

The difference is worth knowing when you read a report. A key is a fact you chose: two elements with different keys stay two rows forever. A derived label is what the page said at the moment of the click, so it splits when the wording changes and merges when two controls happen to share it. context is absent rather than empty when no heading sits within six ancestors, because a context on every row would teach you to trust one.

Switching capture off for part of a page

Put data-verita-no-capture on any element and nothing inside it is captured: no clicks, and no rage or dead clicks either. Use it on an admin screen, a support console, or anywhere the labels on screen belong to your users rather than to you. It is checked before everything else, so it also suppresses elements you have tagged.

Exclude a subtree (HTML)
<section data-verita-no-capture>
  <button data-verita-event-name="delete_user">Delete</button>
</section>

Track custom events in code (optional)

For actions that are not a click, call the tracking API directly. Events appear in your dashboard within seconds.

Custom event (JS)
window.verita('trackEvent', 'video_complete', { title: 'Demo' });

See the Tracking API and the API reference for the full method list, including revenue tracking.

Names we already recognise

Any name works. These few are worth using verbatim, because they mean the same thing on every site and let a report compare one of yours against another. An action is opened and closed, so an attempt the visitor walked away from is counted as abandoned without you instrumenting the leaving; a moment is a single event.

Name Answers How to send it
signup action Of the people who begin creating an account, how many finish? verita('startAction', 'signup') then verita('endAction', 'signup', 'succeeded')
checkout action Of the carts that start, how many convert and how many are abandoned? verita('startAction', 'checkout') then verita('endAction', 'checkout', 'succeeded')
newsletter_signup moment How many visitors subscribe, and which pages do they subscribe from? data-verita-event-name="newsletter_signup" on the subscribe button
search_performed moment How often do visitors search rather than navigate, and on which pages? verita('trackEvent', 'search_performed')

Privacy

Every autocaptured event is anonymous. It is tied to the daily-salted visit identifier that resets every 24 hours, sets no cookies, and stores no IP address, so you get behavioural insight without tracking a person across days. See how a pageview works for the mechanism.

Explore the documentation

Jump to another guide.