# Set up SourceTag with ClickFunnels

Canonical: https://sourcetag.io/docs/fields-clickfunnels

ClickFunnels lets you add hidden inputs to your funnel step forms. Depending on your ClickFunnels version (1.0 or 2.0), you can do this through the form editor or by adding custom HTML.

## What you need

- SourceTag installed on your ClickFunnels page (added via the tracking code settings)
- A ClickFunnels funnel with a form step

## Step 1: Add SourceTag to your funnel page

1. In ClickFunnels, open your funnel and go to the page with the form
2. Go to **Settings > Tracking Code** (or **Head Tracking Code**)
3. Paste your SourceTag script tag in the **Head** section
4. Save


## Step 2: Add hidden fields to the form

### ClickFunnels 2.0

1. Open the page in the ClickFunnels editor
2. Click on your form element
3. In the form settings, click **Add Field**
4. Set the field type to **Hidden**
5. Set the **Name** to the SourceTag field name (e.g. `st_fc_channel`)
6. Leave the value empty
7. Repeat for each field


### ClickFunnels 1.0 (Classic)

ClickFunnels Classic does not have a dedicated hidden field type in the visual form editor. You need to add custom HTML:

1. Open the page in the ClickFunnels editor
2. Below or inside the form section, add a **Custom HTML** element
3. Paste the hidden input elements (see code below)
4. Make sure the HTML element is inside the form

```html
<!-- SourceTag core hidden fields -->
<input type="hidden" name="st_fc_channel" value="">
<input type="hidden" name="st_fc_detail_1" value="">
<input type="hidden" name="st_fc_detail_2" value="">
<input type="hidden" name="st_fc_detail_3" value="">
<input type="hidden" name="st_fc_detail_4" value="">
<input type="hidden" name="st_lc_channel" value="">
<input type="hidden" name="st_lc_detail_1" value="">
<input type="hidden" name="st_lc_detail_2" value="">
<input type="hidden" name="st_lc_detail_3" value="">
<input type="hidden" name="st_lc_detail_4" value="">
<input type="hidden" name="st_fc_landing_page" value="">
<input type="hidden" name="st_lc_landing_page" value="">

<!-- SourceTag optional fields -->
<input type="hidden" name="st_fc_click_id" value="">
<input type="hidden" name="st_lc_click_id" value="">
<input type="hidden" name="st_visits" value="">
<input type="hidden" name="st_days_to_convert" value="">
<input type="hidden" name="st_device" value="">
```


### Core fields (add these)

- `st_fc_channel`
- `st_fc_detail_1`
- `st_fc_detail_2`
- `st_fc_detail_3`
- `st_fc_detail_4`
- `st_lc_channel`
- `st_lc_detail_1`
- `st_lc_detail_2`
- `st_lc_detail_3`
- `st_lc_detail_4`
- `st_fc_landing_page`
- `st_lc_landing_page`

### Optional extended fields

- `st_fc_click_id` and `st_lc_click_id` (click IDs)
- `st_visits` (visit count)
- `st_days_to_convert` (days since first visit)
- `st_device` (device type)

See [Captured Fields](https://sourcetag.io/docs/captured-fields) for the full list of available fields.

## Step 3: Verify the hidden inputs are inside the form

This is critical. The hidden input elements must be children of the `<form>` element in the rendered HTML. If they are outside the form, the data will not be submitted.

To verify:

1. Preview or publish the page
2. Open your browser's dev tools (right-click > Inspect)
3. Find the `<form>` element and check that the hidden inputs are inside it
## Step 4: Test

Visit the page with UTM parameters:

```text
?utm_source=test&utm_medium=cpc&utm_campaign=clickfunnels-test
```

Submit the form. Check where your ClickFunnels form data goes (email notification, CRM integration, webhook). The hidden field values should be included.
## Tips

- In ClickFunnels Classic, the custom HTML approach is the most reliable. Make sure the HTML element is placed inside the form section, not in a separate section.
- ClickFunnels 2.0 has better native support for hidden fields through the form editor.
- If you are using ClickFunnels integrations (email, webhook, Zapier), hidden field values are included in the form submission payload.
- Copy field names from the Fields page in your SourceTag dashboard to avoid typos.
