Auto-Capture
Automatic detection of form submissions, booking completions, and payment redirects
Auto-Capture
Atribu automatically captures form submissions, booking completions, and payment redirects -- no extra code needed. These auto-captured events are the foundation of attribution, because they connect anonymous visitors to real people.
Form auto-capture
When a visitor submits a form on your website, Atribu detects it and does three things:
Extracts contact information
The tracker scans the form fields and looks for:
- Email -- fields with
type="email", or aname/autocompleteattribute containingemail - Phone -- fields with
type="tel", or anameattribute containingphoneortelephone - First name -- fields named
first_name,firstName,given_name,fname, or withautocomplete="given-name" - Last name -- fields named
last_name,lastName,family_name,lname,surname, or withautocomplete="family-name" - Full name -- fields named
nameor withautocomplete="name"(automatically split into first and last)
Hidden fields and invisible fields are ignored.
Identifies the visitor
If an email or phone number is found, the tracker automatically calls identify(). This is the critical step that links the anonymous visitor (who clicked an ad) to their real identity (the person who filled out the form).
Fires a lead_submitted event
A tracking event is recorded with the form ID and the page path, so you can see form submissions in your dashboard and use them as conversion goals.
This is why attribution works
The form auto-capture is where the magic happens. Before the form fill, Atribu only knows "an anonymous visitor clicked a Facebook ad and viewed 3 pages." After the form fill, Atribu knows "Jane at [email protected] clicked a Facebook ad." When Jane later makes a payment through Stripe, Atribu connects it back to that original ad click.
Custom or unusual form fields
Atribu detects email and phone fields by checking the type, name, and autocomplete attributes on <input>, <select>, and <textarea> elements. If your form uses non-standard field names (like data-email or a custom web component), the tracker may not detect them. In that case, call identify() manually. See Identify Users for details.
Booking widget capture
Atribu detects when a visitor completes a booking through embedded scheduling widgets. The following platforms are supported:
| Platform | Detection method |
|---|---|
| GoHighLevel | Listens for the msgsndr-booking-complete postMessage from the GHL widget |
| Calendly | Listens for the calendly.event_scheduled postMessage |
| Cal.com | Listens for the bookingSuccessful postMessage |
| Hash-based | Detects URL hash changes like #booking, #booked, #scheduled, #confirmed, or #thank-you |
When a booking is detected:
- Contact information is extracted when available (email, name, phone from the widget's message data)
identify()is called automatically if contact info is present- An
appointment_bookedevent is fired
One booking per session
To avoid duplicates, the booking event fires only once per session. If a visitor somehow triggers the booking completion message multiple times, only the first one is recorded.
Custom booking patterns
If you use a booking widget that is not natively supported, you can register custom detection patterns:
window.ATRIBU_BOOKING_PATTERNS = [
{ match: "booking-confirmed", widget: "my_scheduler" }
];The tracker will look for the match string in any postMessage data and fire the appointment_booked event when found.
Stripe checkout capture
When you use Stripe Payment Links, customers are redirected back to your website after completing payment. The redirect URL contains a session_id parameter like:
https://yoursite.com/thank-you?session_id=cs_live_a1b2c3...Atribu detects this parameter and:
- Fires a
stripe_checkout_completedevent with the Stripe checkout session ID - Cleans the
session_idparameter from the URL (usinghistory.replaceState) so the event does not fire again if the visitor refreshes the page
This allows Atribu to connect the payment to the browser session, which links it back to the original ad click.
Supported URL parameters
The tracker checks for session_id, checkout_session, and checkout_session_id in the URL. Only values starting with cs_ (Stripe's checkout session prefix) are processed.