🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 15, 2026

Gravity Forms UTM Tracking: Record the Lead Source of Every Entry

GravityExtra
Gravity Forms UTM Tracking: Record the Lead Source of Every Entry

A new enquiry arrives through your contact form. It has a name, an email address and a message, but it does not say what made this person get in touch. Was it the search ad you pay for every month, last week’s newsletter, a post on LinkedIn, a partner’s blog, or an answer from ChatGPT? Without that one piece of information, every decision about your marketing budget is a guess.

This guide explains how UTM tracking works with Gravity Forms, why analytics tools alone do not answer the question for each lead, and how the Gravity Forms Lead Source & UTM Attribution Premium Add-on saves the channel, campaign, ad click ID, referrer and landing page with every entry, for the first visit and for the visit that converted.

Why the Lead Source Belongs on the Entry

Analytics tools are good at counting visits and conversions in aggregate. They are not built to tell your sales team that this customer came from that campaign. When the source is saved with the entry itself, you can:

  • Judge campaigns by real leads, not clicks: which campaign brought the enquiries that turned into customers.
  • Send the source to your CRM, so deals, revenue and lifetime value can be traced back to the channel that started them.
  • Upload offline conversions to ad platforms with the click ID of each lead, so their bidding learns from real sales.
  • Answer simple questions quickly: how many quote requests came from organic search this quarter, or from AI assistants.
  • Keep the data when tools change: the source stays in your own database, next to the entry, whatever happens to your analytics setup.

A Short UTM Refresher

UTM tags are parameters you add to the links you share so the destination site can tell where a visit came from. There are five standard tags:

  • utm_source: the site or sender, such as google, newsletter or linkedin.
  • utm_medium: the type of traffic, such as cpc, email, social or referral.
  • utm_campaign: the campaign name, such as spring-sale.
  • utm_term: the keyword of a paid search ad.
  • utm_content: which ad, button or link was clicked.

Ad platforms also add their own click identifiers to every ad click: gclid, gbraid and wbraid for Google Ads, msclkid for Microsoft Advertising, fbclid for Meta, ttclid for TikTok and similar IDs for LinkedIn, X, Pinterest, Reddit and Snapchat. A click ID is the most reliable sign of a paid click, and it is what ad platforms need to match a lead back to the ad.

The Problem: Tags Disappear Before the Form

Gravity Forms can already fill a hidden field from the address bar with dynamic population. That works only when the visitor fills in the form on the very page they landed on. In practice that rarely happens:

  • A visitor lands on a blog post from a search ad, reads two more pages and then opens the contact page. The tags were only on the first page.
  • Someone clicks your newsletter, leaves, and comes back two days later by typing your address. The visit that converted carries no tags at all.
  • A visitor pays on a payment page and is sent back to your thank-you page. Now the payment provider looks like the source.
  • Pages are cached, so anything that reads the tags on the server sees the cached copy instead of the visitor’s link.

Reliable attribution needs to remember the source across pages and visits, ignore the visits that are not marketing touches, and add the result to the form at the moment it is sent.

First Touch or Last Touch?

Marketing teams argue about attribution models, but most of the useful answers come from two touches. The first touch is how the person discovered you; it shows which channels create new demand. The latest touch is the last marketing visit before the form was sent; it shows which channels close. A lead who found you through organic search and converted after a remarketing ad tells a different story from one who clicked a single ad and sent the form at once. Saving both, together with the number of visits and the days in between, gives you the full picture without complex models.

What the Lead Source & UTM Attribution Add-on Does

  • Remembers the first and the latest touch in a first-party cookie, for as many days as you choose.
  • Records UTM tags and ad click IDs, the referrer and the landing page, and removes personal data such as email addresses from the URLs.
  • Works out the channel: Paid Search, Organic Search, Paid Social, Organic Social, AI Assistant, Email, Referral, Affiliate, Display, SMS, Other Campaign or Direct.
  • Ignores what is not a marketing touch: internal pages, direct return visits and payment or sign-in pages you list.
  • Saves everything with the entry before notifications and feeds run, so every add-on can use the values.
  • Shows it where you work: a box on the entry screen, columns, filters and exports, merge tags, hidden fields and a report.
Lead source box on a Gravity Forms entry with the latest touch from an AI assistant and the first touch from a Google Ads click with campaign and gclid, 2 visits
The source of each lead, right on the entry screen.

How to Set Up UTM Tracking for Gravity Forms

Requirements: WordPress 6.5+, Gravity Forms 2.9+ (any licence), PHP 7.4+ and the add-on with an active GravityExtra license.

Step 1: Activate and choose where tracking runs

Install the add-on and activate your license in Forms → Settings → Lead Source. Keep Load the tracking script on every page selected, so the first visit is recorded even when it is not the page with the form. Set how many days to remember the source; 90 days suits most businesses.

Step 2: Decide on consent

If your visitors must opt in to marketing cookies, choose Only after consent through the WP Consent API, which works with most consent banners, or name the cookie your banner sets. Without consent nothing is stored in the browser, but the form still records the source of the page it is sent from.

Step 3: Tag your links

Keep tagging your newsletters, social posts and partner links with UTM tags. Ad click IDs need no work: they are added by the ad platforms and recorded automatically.

Step 4: Send the source to your other tools

In the feed settings of your CRM or email marketing add-on, map the Lead source values to fields in that system. For services that only read form fields, select a Hidden field, open its Advanced tab and choose a value under Fill with lead source. In notifications, add {lead_source} for a summary or {lead_source:campaign} for a single value.

Fill with lead source setting in the Advanced tab of a Hidden field in the Gravity Forms form editor
Any Hidden field can receive a lead source value.

Step 5: Read the report

Open Forms → Lead Sources, pick a form and a period, and group the leads by channel, source and medium, campaign or landing page. Download the table as CSV for your monthly marketing review.

Lead Sources report in WordPress showing leads per channel for the last 30 days with counts, shares and bars
Which channels bring leads, for any form and period.

Leads From AI Assistants

More and more visitors arrive after asking ChatGPT, Perplexity, Gemini or Copilot for a recommendation. Some of these assistants add utm_source=chatgpt.com to their links, others only leave a referrer, and many analytics setups still file them under referral traffic. The add-on gives them their own channel, AI Assistant, so you can see how many enquiries come from AI answers and which pages they land on, and decide whether to invest in the content those assistants quote.

Tips for Clean Attribution Data

  • Agree on naming: always lower case, one spelling per source (linkedin, not LinkedIn and li), and descriptive campaign names.
  • Use standard mediums such as cpc, email, social, affiliate and display, so leads land in the right channel.
  • Never tag internal links: a tag on your own menu would overwrite the real source of every visitor.
  • List your payment and booking providers under ignored referrers, so a return from checkout keeps the original source.
  • Keep the click IDs and map them to your CRM if you plan to upload offline conversions to ad platforms.

Analytics and Entry Attribution Work Together

Lead source tracking does not replace web analytics. Keep using your analytics tool for traffic, behaviour and funnels; our guide to tracking Gravity Forms with Google Analytics 4 shows how to send form events there. Entry-level attribution answers a different question: where did this lead come from, and what did all leads from one campaign turn into. Together they cover both the crowd and the individual.

Comparison: Ways to Know Where Leads Come From

Lead Source & UTM Attribution Hidden fields from the URL Analytics only
Source on every entry Yes Only on the landing page No
Remembers tags across pages and visits Yes No Yes
First and latest touch Yes No Aggregated
Ad click IDs for offline conversions Yes With extra fields No
AI assistant channel Yes No Depends on setup
Works with cached pages Yes Often not Yes
Report per form and campaign Yes Manual export Not per lead

Know Where Every Lead Comes From

UTM tags, ad click IDs, referrer, landing page and channel saved with every Gravity Forms entry, first and latest touch.

Frequently Asked Questions

Do I need to add hidden fields to my forms?

No. The source is saved with every entry automatically. Hidden fields are optional, for services that only read form fields.

Does it work with AJAX forms and page caching?

Yes. The script adds the source to the form in the browser, also after an AJAX form is rendered, so cached pages work. Without JavaScript the tags of the form page are still read on submit.

Is the data sent to a third party?

No. It is stored in a first-party cookie and in your own WordPress database. No IP address is stored, and personal data is removed from URLs.

Can I wait for cookie consent?

Yes. Choose the WP Consent API mode or name your consent cookie. Until consent is given nothing is stored in the browser.

What about entries I already have?

Only entries created after the add-on is active record a source. Older entries are not changed.

Do I need a particular Gravity Forms licence?

No. Any Gravity Forms licence, version 2.9 or newer, works.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr