Features
Automatic events
On this page
Switch on button clicks, form submissions, file downloads and scroll depth in Settings. The tracker records them without any code on your site, so you can see what the people who later paid clicked, submitted and downloaded, and how far they read your pricing page.
What you see
| Where | What |
|---|---|
| Traffic → Goal tab | Under Automatic events, below your goals: Clicked a button (button_click), Submitted a form (form_submit) and Downloaded a file (file_download), with how many times each happened. Click one for its visitors, conversion and revenue. |
| Goal details | The top button texts (text), forms (id, name) and files (file), with the sources that drive them. |
| Visitor timeline | Lines such as Clicked “Start free trial”, Submitted form signup and Downloaded pricing.pdf. |
| Pages → view all | With Scroll depth on, two columns: Scroll (the average deepest point people reached on the page) and Reached 75% (the share of page visits that got at least three quarters down). |
Funnels, filters, alerts and the primary goal use them like other goals. To turn one button, form or file into its own goal, see Make one a goal.
Turn them on
Open Settings → Tracking & install → Advanced → Automatic events
Every switch is off until you turn it on. Admins and the owner can change them.
Switch on what you want
Button clicks, Form submissions, File downloads and Scroll depth. Each saves at once.
Nothing to change on your site
The tracker reads the switches with its first request on each page, so pages pick them up on their next load. Keep the standard tracking script.
How it works
The capture code is a small add-on, /js/addons/autocapture.js (about 1.4 KB gzipped), that the script loads only once Settings switch on clicks, forms or downloads, so sites without them don't download it. Clicks and submits made while it loads (up to 10) wait and are sent when it runs. It loads from the same host as the script; with a proxy of your own, see Content Security Policy.
Button clicks
- A button is a
<button>, an element withrole="button", or an<input type="submit">or<input type="button">. Links are not buttons, even when styled like one: use a page goal or a link goal for them. - The text is the button's
aria-label, else an input's value, else its visible text, with spaces collapsed and cut to 100 characters. Buttons with no text and disabled buttons are skipped. - Properties:
text, andidwhen the button has one. - The same text clicked again within one second (a double click) counts once.
- Elements with
data-goal(or inside one) are already tracked as your own goal, so they never also sendbutton_click. - A submit button inside a form is sent as the form's
buttonwhen Form submissions is on, not as a separate click.
Form submissions
- Properties: the form's
idandname,action(the path it posts to, never its query string),fields(how many fields it has) andbutton(the text of the button used). - What people type is never read or sent.
- It counts submit attempts, also when your page then shows an error. For completed sign-ups, add a goal on the thank-you page or send
signupfrom your server.
File downloads
- A click on a link with a
downloadattribute, or whose path ends in one of: pdf, zip, dmg, exe, msi, pkg, deb, rpm, apk, csv, xls, xlsx, doc, docx, ppt, pptx, odt, ods, txt, rtf, epub, mp3, wav, mp4, mov, avi, gz, tgz, rar, 7z, iso (any letter case, query string ignored). - Properties:
file(the last part of the path, up to 100 characters),ext(lowercase) andhostwhen the file is on another site. - A file on another site counts as a download instead of an
outbound_clickwhile File downloads is on. On the first click of a page, before the switches have arrived, both can be sent.
Scroll depth
- The tracker remembers the deepest point seen on each page, as a share of the page's height (a page shorter than the window counts as 100%), and sends it with the time-on-page it already sends.
- It adds no events. It is not a goal; use
data-scroll-goalfor a goal when a section comes into view.
Make one a goal
In Settings → Goals & funnels choose New goal, then one of these types. Like page and link goals, they count past visits at once and show a preview of how many visitors (and payers) matched in the last 30 days.
| Type | Matches |
|---|---|
| Button click | Button text, exact but any letter case: Start free trial. Shown as Clicked “Start free trial”. |
| Form submission | The form's id or name, exact: signup. Shown as Submitted form signup. |
| File download | A file name, exact (pricing.pdf), or an extension (.pdf) for any file with it. Shown as Downloaded a .pdf. |
Use the goal as a funnel step (event:clicked_start_trial), the primary goal or a goal alert. The built-in names button_click, form_submit and file_download never trigger alerts themselves; a goal made from one does. The API, CLI (--click, --form, --download) and MCP tools accept the same types; see Goals from pages and links.
Privacy
- Form contents are never read. Only the form's id, name, action path, field count and button text.
- Email addresses in a text become
[email]and runs of five or more digits become[number], in the browser and again on the server, which also drops any other property. - Add
data-autocapture="false"to an element to skip it and everything inside it, or to the script tag to turn automatic events off on that page (data-autocapture="clicks,downloads"keeps only those). It can only narrow what Settings switched on. - Nothing is stored in the browser, and automatic events follow the same consent rules as pageviews.
Billing
Each button click, form submission and file download counts toward your monthly events, like a goal. Scroll depth rides on the time-on-page record and is free. Automatic events are on every plan.
Limits
- Texts, ids, names and file names are cut to 100 characters, the form action to 200.
- The tracker needs its first response on a page (usually within about 200 ms) to know the switches. Clicks before then wait for it; a form that leaves the page before it arrives can go unrecorded.
- The current script is needed. A browser may keep an older copy for up to a day, which sends no automatic events.
- Links aren't buttons, and copying text or changing a field isn't recorded.
- Scroll is the average of the deepest point per page visit, not a heatmap.
- Periods before you switched them on show nothing; there is no backfill.
Troubleshooting
Add data-debug to the script tag (or ?metricraven_debug=1 to the page URL) and open the browser console:
Details
- button_click not sent: clicks is off in Settings. Turn on Button clicks under Automatic events, then reload the page.
- form_submit not sent: data-autocapture on the script tag leaves forms out. The tag's
data-autocapturedoesn't list that kind. - Ignored event by the server: autocapture_off. The switch was turned off after the page loaded; nothing was stored or counted.
- A button sends nothing. It may be a link (
<a>), havedata-goal, be disabled, have no text, or sit insidedata-autocapture="false".
The Scroll and Reached 75% columns appear only while Scroll depth is on, and fill as visitors leave pages. Reached 75% shows on screens 1280 px wide or more.