Skip to content

Form Setup

Attri gives every form a hosted endpoint. Point a plain HTML form at it and submissions land in your workspace with attribution attached — which campaign drove the visit, what device, what country. No backend, no serverless function, no config file.

  1. In Attri, open Forms and click New form.
  2. Name it and save. You’ll get a form key (a short string like ofidsmmc) and the full endpoint URL.
  3. Copy the endpoint: https://form.attri.io/{your-form-key}
<form action="https://form.attri.io/your-form-key" method="POST">
<input type="text" name="name" placeholder="Your name" />
<input type="email" name="email" placeholder="Email" required />
<textarea name="message" placeholder="How can we help?"></textarea>
<button type="submit">Send</button>
</form>

That’s a complete integration. Field names are up to you — whatever name attributes your inputs have become the submission’s fields. Two rules:

  • A field named exactly email gets automatic format validation on the server.
  • Field names starting with _ are reserved for control fields and are never stored (see the reference for the full list).

The behavior depends on whether the Attri tracking snippet is installed on the page. Both paths work — but they behave differently, and knowing which one you’re on avoids most confusion.

With the snippet installed (recommended): the script intercepts the submit. No page navigation happens. The button disables and shows “Sending…”, the submission posts in the background, and an inline success or error message appears above the button. The submission is also linked to the visitor’s session, so it carries full campaign attribution. If the form has captcha enabled, the widget is injected automatically.

Without the snippet: the browser performs a native form POST. On success the visitor is redirected (HTTP 303) to, in order of preference: a _next field you included in the form, the redirect URL configured on the form in Attri, or back to the page they came from. Attribution is limited to what the request itself carries (referrer, device, geo) — no session linkage, and captcha will not work (see the gotchas below).

To set a custom thank-you page without the snippet:

<input type="hidden" name="_next" value="https://example.com/thanks" />

Mark fields as required on the form’s settings page in Attri. The server enforces them: submissions missing a required field are rejected with a per-field error, which the snippet renders inline (or, for native posts, sends back to your page as an _errors query parameter).

Browser-side required attributes are good UX, but the server-side check is what actually protects your data — bots don’t respect HTML attributes.

Submissions appear in Forms → your form → Submissions. To get notified, add a notification channel (email, Slack, or webhook) under Settings → Notifications with a rule for form submissions, or set notification emails directly on the form. An auto-responder to the submitter can be enabled per form — it uses the submitter’s email field.

SymptomCause
Captcha error on every submissionCaptcha is enabled for the form but the tracking snippet isn’t on the page. The widget can only be injected by the snippet. Install it or disable captcha.
Form works, but no inline message — page navigates insteadSnippet not installed (native mode), or the form was added to the page after the script loaded (see below).
Form rendered by JavaScript never gets interceptedThe script scans for Attri forms when it loads and once more after its config fetch. Forms rendered later — client-side route changes, modals, lazy components — are not picked up. Render the form in the initial HTML, or keep it in the DOM from page load.
Submissions stopped after 10 in quick successionRate limit: 10 submissions per minute per IP per form. Wait and retry.
A field is missing from submissionsField names starting with _ are control fields and are never stored. Rename it.
Bot submissions getting throughAdd a honeypot field or enable captcha — see Spam Protection.

If you (or your AI coding assistant) want the exact HTTP contract — endpoints, content types, control fields, response shapes, and status codes — it’s all on one page: Forms Endpoint Reference. That page is written to be pasted directly into an AI assistant’s context.