Autocapture
Automatically track user interactions without writing code
Rybbit can automatically capture common user interactions without requiring any code changes. You turn these features on and off in your Site Settings under the "Auto Capture" section. Outbound link tracking is on by default; the others are off until you enable them.
Available Autocapture Features
| Feature | Description | Event Type |
|---|---|---|
| Outbound Links | Track clicks on external links | outbound |
| Error Tracking | Capture JavaScript errors and exceptions | error |
| Button Clicks | Track clicks on buttons | button_click |
| Copy Events | Track when users copy text | copy |
| Form Interactions | Track form submissions and input changes | form_submit, input_change |
Outbound Links
On by default. Rybbit tracks clicks on links that navigate to external domains.
Tracked properties:
url- The destination URLtext- The link texttarget- The link target attribute (e.g.,_blank,_self)
Error Tracking
Captures uncaught JavaScript errors and unhandled promise rejections from your site. Only errors originating from your domain are tracked (third-party script errors are filtered out). Browser ResizeObserver loop warnings are ignored, and an identical error (same name, message, file, line, and column) is sent at most once per 60 seconds.
Tracked properties:
message- The error message (truncated to 500 characters)stack- Stack trace (truncated to 2000 characters)fileName- Source file where the error occurredlineNumber- Line numbercolumnNumber- Column number
Button Clicks
Automatically tracks clicks on:
<button>elements- Elements with
role="button" <input type="submit">and<input type="button">
Repeat clicks on the same button within one second are recorded as a single click.
Tracked properties:
text- The button's text content, up to 100 characters (falls back toaria-label, thenvaluefor input buttons, thentitle)
Adding Custom Properties
You can add custom properties to auto-tracked button clicks using data-rybbit-prop-* attributes:
<button
data-rybbit-prop-category="pricing"
data-rybbit-prop-variant="blue"
>
Buy Now
</button>This tracks: { text: "Buy Now", category: "pricing", variant: "blue" }
Skipping Autocapture for Specific Buttons
If you want to track a button with a custom event instead of the automatic button_click, add the data-rybbit-event attribute:
<!-- This button will fire a custom "signup" event, NOT a button_click -->
<button data-rybbit-event="signup" data-rybbit-prop-plan="pro">
Sign Up
</button>See Track Events for more details on custom event tracking.
Copy Events
Tracks when users copy text from your site using Ctrl+C, Cmd+C, or the context menu.
Tracked properties:
text- The copied text (truncated to 500 characters)textLength- Original length of the copied text (only included if text was truncated)sourceElement- The HTML tag where the text was copied from (e.g.,p,div,span)
Form Interactions
Tracks two types of form events:
Form Submissions (form_submit)
Triggered when a form is submitted.
Tracked properties:
formId- The form'sidattributeformName- The form'snameattributeformAction- The form'sactionURLmethod- HTTP method (GET, POST, etc.)fieldCount- Number of form fieldsariaLabel- The form'saria-labelattribute (if present)
You can add custom properties using data-rybbit-prop-* on the form element:
<form
id="signup"
data-rybbit-prop-form-type="registration"
data-rybbit-prop-variant="a"
>
...
</form>Input Changes (input_change)
Triggered when a user changes the value of an input, select, or textarea field. Disabled and read-only fields are excluded.
Tracked properties:
element- The element type (input,select, ortextarea)inputType- For inputs: the type attribute (e.g.,text,email,checkbox)inputName- The field'sname,id,aria-label, orplaceholderattribute (first available)formId- The parent form'sid(if within a form)formName- The parent form'sname(if within a form)
You can add custom properties using data-rybbit-prop-* on the input element:
<input
name="email"
data-rybbit-prop-field-category="contact"
/>
<select
name="country"
data-rybbit-prop-section="demographics"
>
...
</select>Privacy note: Field values are never sent. Hidden inputs, password fields, and disabled or read-only fields are excluded from tracking.
Enabling Autocapture
- Go to your site's Settings
- Navigate to the Auto Capture section
- Toggle on the features you want to enable
The script reads these settings when the page loads, so changes apply on the next page load, within about a minute (site settings are cached briefly on the server). Pages that are already open keep the old settings until they reload.
Related Documentation:
- Track Events - Manual event tracking
- Site Settings - Configure your site
- Behavior Analytics - Events - View captured events