# Set up SourceTag with Gravity Forms

Canonical: https://sourcetag.io/docs/fields-gravity-forms

SourceTag populates hidden fields in your forms with attribution data. For Gravity Forms, you need to add those hidden fields to your form first.

## What you need

- SourceTag installed on your site (script tag or WordPress plugin)
- A Gravity Forms form

## Step 1: Open your form in the Gravity Forms editor

Go to Forms > Edit on the form you want to track.
## Step 2: Add hidden fields

From the "Standard Fields" section, drag a **Hidden** field onto your form. Repeat for each field you want to capture.

### Core fields (add these)

Add a hidden field for each of the following. Set the **Field Label** to the field name:

- `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

If you've enabled extended field groups in your SourceTag dashboard, also add hidden fields for those. Common ones:

- `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: Set the field label

For each hidden field, click on it and set the **Field Label** to the exact field name (e.g. `st_fc_channel`).

Do **not** enable "Allow field to be populated dynamically". SourceTag populates the fields directly via JavaScript, not URL parameters. Leaving dynamic population disabled prevents anyone from overriding the attribution data via query strings.


## Step 4: Save and test

Save your form. Visit a page with this form using UTM parameters:

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

Submit the form. Check the Gravity Forms entry. You should see the attribution data in the hidden fields.
## Tips

- You can copy field names from the Fields page in your SourceTag dashboard (each name has a copy button).
- The hidden fields won't be visible to visitors. They only appear in form entries and notifications.
- If you're sending Gravity Forms data to a CRM, make sure to map these fields in your CRM feed.
