Atribu
Tracking

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 a name/autocomplete attribute containing email
  • Phone -- fields with type="tel", or a name attribute containing phone or telephone
  • First name -- fields named first_name, firstName, given_name, fname, or with autocomplete="given-name"
  • Last name -- fields named last_name, lastName, family_name, lname, surname, or with autocomplete="family-name"
  • Full name -- fields named name or with autocomplete="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:

PlatformDetection method
GoHighLevelListens for the msgsndr-booking-complete postMessage from the GHL widget
CalendlyListens for the calendly.event_scheduled postMessage
Cal.comListens for the bookingSuccessful postMessage
Hash-basedDetects URL hash changes like #booking, #booked, #scheduled, #confirmed, or #thank-you

When a booking is detected:

  1. Contact information is extracted when available (email, name, phone from the widget's message data)
  2. identify() is called automatically if contact info is present
  3. An appointment_booked event 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:

Custom booking pattern
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:

Stripe redirect URL
https://yoursite.com/thank-you?session_id=cs_live_a1b2c3...

Atribu detects this parameter and:

  1. Fires a stripe_checkout_completed event with the Stripe checkout session ID
  2. Cleans the session_id parameter from the URL (using history.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.


Next steps

On this page