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.
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:
{ "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:
<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.
{ "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:
<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.
<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.
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.