# How to track lead source in Gravity Forms

Capture which marketing channel drove every Gravity Forms submission, with the complete visitor journey saved alongside each lead.

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

---

Gravity Forms is the premium form plugin many WordPress agencies and serious site owners build on, deep customization, robust add-ons, enterprise-grade reliability. The blind spot remains the same as every form tool: it can tell you what was submitted, but not which marketing channel earned the submission. This guide fills that in.

Three steps, around five minutes, no Gravity Forms API calls required.

## What SourceLoop captures from Gravity Forms

Each Gravity Forms submission arrives in SourceLoop with:

- **Acquisition channel** plus the full UTM parameter set
- **Page-by-page browsing path** ahead of the submission
- **Cumulative session time** on your site before the form fill
- **Number of separate visits** before the conversion
- **Email and name** from the Gravity Forms fields
- **First-touch landing page** and the URL that referred them
- **Source of the converting session**, often distinct from first-touch
- **Device, country, and browser**

## Before you start

You'll need:

- A **SourceLoop workspace** ([free trial](https://app.sourceloop.ai/sign-up))
- **Admin access** to your WordPress site
- A **Gravity Forms license** (any tier) with at least one form built and embedded on a page

## Step 1: Install the SourceLoop tracking script

Sign in to SourceLoop, open **Setup -> Tracking code** in the left sidebar, and copy the snippet.

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

Add the snippet to the `<head>` of your WordPress site. The simplest path is a header injection plugin like "Insert Headers and Footers", but pasting into your theme's `header.php` works equally well. If you use a tag manager, drop it in as a Custom HTML tag set to fire on all pages.

## Step 2: Confirm your form is on a published page

Once the tracking script is live, every Gravity Forms form on every published page is ready to be tracked. No per-form configuration needed.

A few sanity checks:

- The form is embedded on a **published** WordPress page (drafts don't carry the snippet)
- The form **collects an email field** (SourceLoop uses email to create the lead)
- Your form's confirmation message or redirect continues to work as expected

> **Standalone Gravity Forms URLs aren't trackable**
> Sharing the Gravity Forms preview URL or any standalone form link outside your main site bypasses the tracker, those submissions arrive without attribution. Always route visitors to a published page on your site that embeds the form.

## Step 3: Verify it's working

Open the form page in an **incognito tab**, add `?utm_source=test&utm_medium=verify&utm_campaign=gravity-check` to the URL, and submit a test entry using a real email you control.

Within seconds, the submission should appear on the **Contacts Hub** in SourceLoop with the test UTMs attached.

## Where to see Gravity Forms submissions in SourceLoop

### Contacts Hub

Every Gravity Forms submission appears as a row at [app.sourceloop.ai/contacts](https://app.sourceloop.ai/contacts). Expand a row for the visitor's complete pre-submission journey.

![SourceLoop Contacts Hub showing a Gravity Forms submission with the full journey](/help/screenshots/sourceloop-lead-journey-demo.webp)

### Attribution dashboard

[app.sourceloop.ai/dashboards/traffic](https://app.sourceloop.ai/dashboards/traffic) groups your Gravity Forms submissions by source, medium, and campaign.

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

### Funnel reports

Build a funnel in [app.sourceloop.ai/funnels](https://app.sourceloop.ai/funnels/) ending in "Gravity Forms submission". Slice by source or landing page to find your best-converting paths.

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

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

## Frequently Asked Questions

### Does this work with Gravity Forms' Logic, conditional fields, and multi-page forms?

Yes. The submission is the only event SourceLoop cares about, the complexity of the form itself doesn't change anything. Logic Jumps, multi-page flows, and conditional fields all work normally.

### I use Gravity Forms add-ons like Stripe, PayPal, or Mailchimp. Will they still fire?

Yes. Your existing Gravity Forms add-ons continue to handle their connected workflows. SourceLoop runs alongside without touching them, just adding attribution data on top.

### My WordPress site uses a caching layer (Cloudflare, NGINX, etc.). Will tracking still work?

Yes, as long as the SourceLoop snippet loads in the page `<head>` before the form. Page-level caching of HTML doesn't affect the tracker because the script loads dynamically per session.

### Can I track Gravity Forms submitted via AJAX (Enable AJAX option)?

Yes. Whether the form submits via standard POST or AJAX, the submission event is captured the same way.

### Does this work with Gravity Forms embedded inside an Elementor or Divi page?

Yes. The page builder is irrelevant, as long as your WordPress site has the SourceLoop tracking script in the global `<head>`, any embedded Gravity Form gets tracked.
