# Form submit tracking

Track form submits without scripts.

You set your form’s **redirect after submit** to a version-specific `t.swtchd.io/...` link. That redirect lands on a swtchd-hosted thank-you page (`f.swtchd.io/...`).

### When to use this

Use form submit tracking when your real conversion is:

* lead capture
* waitlist signup
* booking request
* any form with a success redirect

### What you need

* A test with 2+ versions of your forms
* A form tool that supports a **success URL** / **redirect URL on submit**
* Redirect should be set **per form instance** (per page version)
* If you host the form, don't use swtchd.io thank you page, you can use a tracking link with a redirect to your thank you on the submit button

{% stepper %}
{% step %}

### 1) Create the thank-you page in swtchd

In your test setup, go to **Step 2: Tracking**.

In **Form submit tracking (thank-you page)**:

* Set a **Title** (example: `Thanks!`)
* Set a short **Body** (example: `Check your inbox in 5 minutes.`)

Click **Generate Tracking Links**.

You’ll get:

* A hosted thank-you page (preview): `https://f.swtchd.io/<id>`
* One submit redirect per version:
  * Version A: `https://t.swtchd.io/<shortIdA>`
  * Version B: `https://t.swtchd.io/<shortIdB>`

{% hint style="warning" %}
Use the `t.swtchd.io/...` links in your form tool. Don’t paste the `f.swtchd.io/...` link directly.
{% endhint %}
{% endstep %}

{% step %}

### 2) Paste the redirect into your form tool (per version)

In your form tool, find one of these settings:

* **Redirect URL**
* **Success URL**
* **After submit redirect**
* **Thank you page URL**

Then configure it like this:

* On the form embedded on **Version A page**: redirect to Version A `t.swtchd.io/...`
* On the form embedded on **Version B page**: redirect to Version B `t.swtchd.io/...`

Flow after a submit:

1. Form submits successfully
2. Form redirects to `t.swtchd.io/...`
3. swtchd logs a conversion (only while your test is live)
4. Visitor lands on the thank-you page `f.swtchd.io/...`
   {% endstep %}

{% step %}

### 3) Launch the test

Go to **Step 3: Review & launch** and click **Go live**.

{% hint style="info" %}
Tracking events only count while the test is live. The redirect links still work forever.
{% endhint %}
{% endstep %}
{% endstepper %}

### How it shows up in Results

* The submit redirect counts as a **unique click**.
* **Click rate** becomes your submit-rate proxy: `unique clicks / unique views`.

### Tips for cleaner tests

* Keep thank-you copy short.
* Say what happens next (email, download, calendar, etc.).
* Track submits (macro) and 1 key click (micro) if needed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swtchd-io.gitbook.io/swtchd.io-docs/testing-and-tracking/form-submit-tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
