# How to track lead source in GoHighLevel Forms

Bake the marketing channel, campaign, and journey into every GoHighLevel form submission so each contact in your CRM arrives with full attribution attached.

Source: https://sourceloop.ai/help/track-lead-source-in-gohighlevel-form/
Updated: 2026-05-28

---

GoHighLevel is the operating system for marketing agencies and one-person consultancies, lead capture, CRM, automation, calendar, all in one place. The piece it doesn't solve out of the box is attribution: a form submission lands in your contact record with the basic fields filled in, but no marketing context about where the lead came from. This guide adds that context as hidden fields, right inside the contact record.

Four steps, around fifteen minutes. Works on every GoHighLevel plan since hidden fields are a standard form-builder feature.

## What SourceLoop captures from GoHighLevel Forms

Each form submission lands in your GoHighLevel contact record with these hidden field values populated automatically:

- **SourceLoop Id** (the link to the visitor's full tracked journey)
- **Channel** + **Latest Source**, **Medium**, **Campaign** (closing session's UTM details)
- Optional **First-touch** equivalents for multi-touch attribution
- Plus the visitor's regular form fields (name, email, phone, etc.) unchanged

## Before you start

You'll need:

- A **SourceLoop workspace** ([free trial](https://app.sourceloop.ai/sign-up))
- **Edit access** to the website (or GoHighLevel funnel page) where the form will be embedded
- A **GoHighLevel sub-account** with at least one form built
- About fifteen minutes to add hidden fields one at a time

## Step 1: Install the SourceLoop tracking script

Sign in to SourceLoop, open **Setup** in the left sidebar, and click the **Tracking code** tab. Copy the snippet shown.

![SourceLoop Setup page with the tracking code snippet ready to copy](/help/screenshots/sourceloop-tracking-code-script.png)

Paste the snippet inside the `<head>` of every page on your site that will host a GoHighLevel form. If your forms are embedded on GoHighLevel funnel pages, you can install the snippet in your funnel's tracking settings instead.

## Step 2: Add hidden fields to your form

Each attribution value needs a custom field on your GoHighLevel form, so the data flows into the contact record (and any downstream automations or webhooks you've configured).

**The repeatable workflow for each field:**

1. In your form, click **+ Add Element -> Custom Fields -> Add Custom Field**.
2. Set **Field Type** to **Single-line** and the **Custom Field Name** as shown in the table.
3. Set the **Unique Key** (sometimes labeled Query Key) to the exact value shown.
4. In the field's right-panel properties, tick the **Hidden** checkbox.
5. Save the form.

> **Unique Keys lock after saving**
> Once saved, GoHighLevel will not let you change a field's Unique Key. Mistyping means deleting the field and creating a new one. Take a second to verify the exact spelling against the table below.

**Required field:**

| Field Name | Field Type | Unique Key | Hidden |
| --- | --- | --- | --- |
| SourceLoop Id | Single-line | `sl_aid` | yes |

**Latest-touch fields (recommended baseline):**

| Field Name | Field Type | Unique Key | Hidden |
| --- | --- | --- | --- |
| Channel | Single-line | `channel` | yes |
| Latest Source | Single-line | `attribution_source` | yes |
| Latest Medium | Single-line | `attribution_medium` | yes |
| Latest Campaign | Single-line | `attribution_campaign` | yes |

## Step 3: Track first-touch attribution (optional)

Skip this step unless you want multi-touch attribution. To track the original acquisition channel separately from the most recent one, add these additional fields using the same workflow as step 2:

| Field Name | Field Type | Unique Key | Hidden |
| --- | --- | --- | --- |
| First Channel | Single-line | `first_channel` | yes |
| First Source | Single-line | `first_source` | yes |
| First Medium | Single-line | `first_medium` | yes |
| First Campaign | Single-line | `first_campaign` | yes |
| First Landing Page | Single-line | `first_landingpage` | yes |

## Step 4: Embed the form on your website

The form needs to live on a page that has the SourceLoop tracking script loaded.

1. In GoHighLevel, navigate to **Sites -> Forms -> Integrate Form** and copy the embed code.
2. Paste it into your website (or GoHighLevel funnel page) where you want the form to appear.

Submit a test form, then open the resulting contact in GoHighLevel. The SourceLoop Id, Channel, Latest Source, and other hidden fields should all have values populated.

> **Direct GoHighLevel form links can't be attributed**
> If you share the form's raw `link.msgsndr.com/...` URL directly in SMS blasts, emails, or DMs, those submissions **won't carry attribution data**. The visitor never lands on a page with the tracker, so the hidden fields stay empty. Route those campaigns through a landing page that embeds the form.

## Where to see GoHighLevel submissions in SourceLoop

Beyond the attribution data flowing directly into your GoHighLevel contact records, three SourceLoop views give different cuts of your form data:

### Contacts Hub

Each GoHighLevel form submission appears as a contact row in [app.sourceloop.ai/contacts](https://app.sourceloop.ai/contacts). Expand a row to see the visitor's complete pre-submission journey.

![SourceLoop Contacts Hub showing a GoHighLevel form submission with the lead's full pre-submission journey](/help/screenshots/sourceloop-lead-journey-demo.webp)

### Attribution dashboard

[app.sourceloop.ai/dashboards/traffic](https://app.sourceloop.ai/dashboards/traffic) rolls up GoHighLevel form submissions by source, campaign, and landing page. Especially valuable for agencies managing paid spend across multiple clients.

![SourceLoop attribution dashboard with GoHighLevel form submissions grouped by source and campaign](/help/screenshots/sourceloop-attribution-dashboard.webp)

### Funnel reports

In [app.sourceloop.ai/funnels](https://app.sourceloop.ai/funnels/), build a funnel ending in "GoHighLevel form submission". Slice by source or landing page to find which acquisition paths produce real leads.

![SourceLoop funnel report ending in a GoHighLevel form submission conversion step](/help/screenshots/sourceloop-funnel.png)

For agencies running paid acquisition for clients, push the submissions to **Google Ads, Meta, and LinkedIn as offline conversions** so the bidding algorithms learn from real form fills. [Connect your Google Ads account](/help/connect-google-ads/) walks through the setup.

## Frequently Asked Questions

### Why are the Unique Keys lowercase and underscored?

GoHighLevel matches URL parameters against the field's Unique Key (sometimes called Query Key). It's case-sensitive and must match exactly. Lowercase with underscores is the convention SourceLoop uses across every tool that needs this kind of mapping.

### The Unique Key is locked after I save the field. Can I change it later?

No. Once saved, GoHighLevel locks the Unique Key permanently. If you mistype it, you'll need to delete the field and create a new one with the correct key. Double-check before saving.

### Do these hidden fields show up to my prospects?

No. Each field has the Hidden checkbox enabled, so visitors never see them. They're filled in from the page URL when the form loads, and they flow through to your GoHighLevel contact record alongside the visible answers.

### I run multiple sub-accounts for clients. Do I need to set this up for each?

Yes. Each GoHighLevel sub-account is its own form environment, so the hidden fields need to be added inside each client's account where their forms live. Each client website also needs its own SourceLoop workspace and tracking script.

### Can I use this with GoHighLevel funnels that contain forms?

Yes. As long as the funnel page hosting the form has the SourceLoop tracking script installed, the hidden fields populate the same way they do on standard pages.
