# Getting Started

Canonical: https://sourcetag.io/docs/getting-started

This guide walks you through setting up SourceTag from scratch. You'll have attribution tracking running on your site in under 5 minutes.

## 1. Create your account

Sign up at [app.sourcetag.io/signup](https://app.sourcetag.io/signup). You'll get a 14-day free trial. No credit card required.

## 2. Add your site

From the dashboard, click **Add Site**. Enter your domain (e.g. `example.com`) and an optional name.

SourceTag automatically creates default channel rules based on industry-standard channel groupings: Email, Affiliates, Paid Social, Paid Search, Display, Paid Video, Other Campaigns, AI Referral, Organic Social, Organic Search, Referral, and Direct.

## 3. Configure channels (optional)

The default channels work for most sites. If you want to customise them (for example, to add a custom "Partner" channel or rename "Paid Social" to "Social Ads"), go to your site's **Channel Rules** page.

Rules are evaluated top-to-bottom. The first match wins. You can reorder, add, edit, or delete rules.

## 4. Configure field mapping (optional)

By default, SourceTag uses standard field names like `st_fc_channel`, `st_fc_detail_1`, etc. On the **Fields** page you can toggle extended field groups on or off (click IDs, raw UTMs, visitor meta) and add custom URL parameters.

## 5. Add hidden fields to your forms

Add these hidden fields to your form builder. Copy the field names exactly.

**Core fields (add these):**

```text
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:**

```text
st_fc_click_id
st_lc_click_id
st_visits
st_days_to_convert
st_device
st_fc_date
st_lc_date
```

How you add them depends on your form builder. See your [platform-specific guide](https://sourcetag.io/docs) for step-by-step instructions.

## 6. Install the script

Copy the script tag shown on the site detail page and add it to your website:

**WordPress:** Install the SourceTag plugin, enter your Site ID in Settings > SourceTag. The plugin handles the script injection automatically.

**Webflow:** Go to Project Settings > Custom Code > Head Code. Paste the script tag.

**Squarespace:** Go to Settings > Advanced > Code Injection > Header. Paste the script tag.

**Other platforms:** Add the script tag before the closing `</head>` tag in your site's HTML template.

## 7. Test it

Visit your site with UTM parameters in the URL:

```text
https://yoursite.com/?utm_source=test&utm_medium=cpc&utm_campaign=test-campaign
```

Submit a form. Check the form notification or your CRM. You should see the hidden fields populated with attribution data (e.g. `st_fc_channel: Paid Search`, `st_fc_detail_1: test`).

**Important:** The `st_fc_channel` hidden field must be present in the form. If SourceTag doesn't find a field named `st_fc_channel`, it skips the form entirely.

## What's next?

- [Install on WordPress](https://sourcetag.io/docs/install-wordpress) - detailed WordPress plugin setup
- [Install on Webflow](https://sourcetag.io/docs/install-webflow) - Webflow custom code guide
- [Configure channels](https://sourcetag.io/docs/configure-channels) - customise your channel rules
- [Browser cookie limits](https://sourcetag.io/docs/safari-cookies) - understand the 7-day cookie limitation and how to fix it
