Gravity Forms integration

Lead source tracking for Gravity Forms.

See exactly where every Gravity Forms enquiry came from, down to the campaign.

Works with every Gravity Form on your site No hidden fields to configure Live in minutes

Works with all Gravity Forms features

Single-page forms Multi-page Conditional logic AJAX submissions Payment forms Popup & modal
The gap

Gravity Forms is a form builder, not an attribution system.

Gravity Forms is the most flexible form builder on WordPress. It stores entries, routes notifications, and handles the things forms are supposed to handle. Attribution was never on the list.

What Gravity Forms captures

The submission itself

  • Name, email, phone, message
  • Every custom field you’ve added
  • Conditional logic, multi-page steps
  • File uploads, payments, signatures
  • Entry timestamp and submitter IP
What it leaves to you

Where that person came from

  • Which campaign brought them
  • Which keyword or ad they clicked
  • The landing page they entered on
  • Which pages they visited before submitting
  • Anything the URL knew, but the form didn’t ask
The usual workaround

The hidden-fields approach, and what it actually costs to maintain.

Every other approach to Gravity Forms attribution puts the work on you. You add hidden fields to each form, map UTM parameters to them via Dynamic Population, and repeat that for every new form your team builds. Then you maintain it through Gravity Forms updates, theme changes, and team turnover.

The manual way

  • 01
    Add hidden fields to every Gravity Form: source, medium, campaign, content, term. Five fields per form, minimum.
  • 02
    For each: open Advanced tab, enable “Allow field to be populated dynamically”, set the parameter name to match the UTM key.
  • 03
    Dynamic Population only reads the URL at form load. If a visitor arrives on / with UTMs and navigates to /contact before submitting, the URL is clean. Add a cookie-persistence plugin.
  • 04
    Repeat steps one through three every time someone on the team builds a new form. Then keep the cookie-persistence layer working through plugin updates and theme migrations.

With Lead Source

  • 01
    Paste one script tag into your WordPress header. That’s the entire install.
  • 02
    Lead Source finds every Gravity Form on your site automatically. That includes existing forms, ones your team builds next month, and ones tucked behind popups or embedded on landing pages.
  • 03
    Source gets captured at submission, with the campaign name written out (“Google Ads · Local Services Sydney”) rather than left as a raw UTM string like ?utm_source=g&utm_medium=cpc for you to parse.
  • 04
    Your forms stay exactly as they are. New Gravity Form built next month? Already tracked, no additional setup needed.

Hidden fields work fine. They just need to exist on every form, get configured the same way each time, and survive whatever else changes around them.

What you install

One script tag. That’s the whole thing.

Sign up, copy the snippet from your dashboard, and paste it into your WordPress header. From there, Gravity Forms gets detected on every page automatically. The block below shows what the snippet looks like, with placeholder text where your unique site ID will be.

example only. Your real code is in the dashboard
<!-- illustrative. Paste your real snippet from app.leadsource.co -->
<script src="https://leadsource.co/s/[your-site-id].js" async></script>

The real snippet is generated for your account when you sign up. Copy it from the install page in your dashboard. Under 50ms execution. Async, so it doesn’t block your page. No dependencies.

Install on WordPress

Three steps. Most sites are done in five minutes.

1

Sign up and get your script tag

Create your free Lead Source account. You’ll see a snippet on the dashboard with your unique site ID already in it. Copy it.

No credit card required to start. The signup flow takes about a minute.
2

Paste it into your WordPress header

Use a header plugin like WPCode, Insert Headers and Footers, or Header Footer Code Manager. Or edit your theme’s header.php directly if you’re comfortable. The snippet goes anywhere inside the <head>.

Don’t worry about caching plugins; async scripts don’t need special handling. You don’t need to clear anything.
3

Submit a test through any Gravity Form

Open a page with a Gravity Form on it. Fill it in. Submit. Within a minute or two, the lead appears in your Lead Source dashboard with the source, the campaign, and every page you visited before submitting.

Want to test attribution end-to-end? Add ?utm_source=test to the URL before you submit. That’ll be the source on the lead.
Common questions

Questions, answered.

Do I need to change my Gravity Forms?

No. Not a single one. Lead Source detects Gravity Forms by listening for the submission event on the page. It never touches your form markup. You don't add hidden fields, you don't edit form settings, you don't install a Gravity Forms add-on.

Does it work with AJAX-submitted forms?

Yes, AJAX submission is the standard case. The page doesn't reload, so UTM parameters in the URL stay accessible. We capture them at the moment Gravity Forms fires the submission event. On non-AJAX forms, we capture before the redirect fires.

What about multi-page Gravity Forms with conditional logic?

Works fine. Lead Source captures attribution data the moment the final submission happens. It doesn't care how many steps led there or what conditional rules fired.

Will it conflict with hidden fields I've already set up?

No. Your existing hidden fields keep working exactly as they did. Lead Source runs in parallel. It doesn't write to your form, it doesn't intercept the submission, it just observes. If you're using UTM hidden fields today and they're working, you can leave them in or take them out. Both are fine.

Does it slow my WordPress site down?

The script is under 5KB, loads async, and runs after the page is interactive. Typical execution is under 50ms. It won't move the needle on PageSpeed or Core Web Vitals.

Track your Gravity Forms leads. Free to start.

One script handles every Gravity Form on your site, with source, campaign, and page journey captured on every submission. The first attributed lead arrives in your inbox within minutes of install.

Start free

Free to start &middot; no card