# How to track lead source in WPForms

Add real source attribution to every WPForms submission so your WordPress site reveals which channel actually drives leads, not just clicks.

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

---

WPForms is the most-installed form plugin on WordPress, the default choice for blogs, agencies, ecommerce sites, and small businesses. Its strength is simplicity, drag and drop, no code. The catch most users hit later: when leads start coming in, there's no built-in way to see which marketing effort produced them. This guide fixes that.

Three-step setup, around five minutes. Works on every WordPress site, every WPForms plan.

## What SourceLoop captures from WPForms

After setup, each WPForms submission arrives in SourceLoop with:

- **Acquisition source** plus the visitor's full UTM parameter set
- **Pre-submission browsing path**, ordered chronologically
- **Time on site** before the form was completed
- **Number of return visits** before the conversion
- **Email and name** captured from the WPForms fields
- **Landing page** and referring URL from the first session
- **Last session source**, the one that produced the submission
- **Device type, 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 (or a way to edit `<head>` markup, such as a Tag Manager)
- At least one form built in WPForms and embedded on a page

## Step 1: Install the SourceLoop tracking script

Sign in to SourceLoop, head to **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>` section of your WordPress site. Three common ways to do this:

- **Header / Footer plugin**: install a plugin like "Insert Headers and Footers" and paste into the Header field
- **Theme editor**: paste into your active theme's `header.php` just before the closing `</head>` tag
- **Site Kit / SEO plugin**: many SEO plugins include a "Custom Code" section in their site settings

Whichever method, the script must load on every page that hosts a WPForms form.

## Step 2: Confirm the form is on a tracked page

Once the tracking script is loading site-wide, every WPForms form is ready to be tracked, no per-form configuration required.

Check that:

- Your form is **embedded on a published WordPress page** (not just sitting in the Forms list)
- Your form **collects an email field** (SourceLoop uses email to create the lead)
- Any caching plugin (WP Rocket, W3 Total Cache, etc.) isn't deferring or async-ing the SourceLoop script in a way that breaks load order

> **Forms hosted on disconnected pages aren't trackable**
> If you use WPForms' "View Form" link to host the form on a standalone page outside your main site, those submissions can't be attributed. Always embed the form on a page within your main site to capture the source.

## Step 3: Verify it's working

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

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

## Where to see WPForms submissions in SourceLoop

### Contacts Hub

Every WPForms submission becomes a contact row at [app.sourceloop.ai/contacts](https://app.sourceloop.ai/contacts). Expand any row to see the visitor's complete pre-submission journey.

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

### Attribution dashboard

Pull up [app.sourceloop.ai/dashboards/traffic](https://app.sourceloop.ai/dashboards/traffic) to see WPForms submissions broken down by source, medium, and campaign.

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

### Funnel reports

In [app.sourceloop.ai/funnels](https://app.sourceloop.ai/funnels/), configure a funnel ending in "WPForms submission". Cut it by source or landing page to spot your best paths from visit to submitted form.

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

If paid acquisition is part of your strategy, forward WPForms submissions to **Google Ads, Meta, and LinkedIn as offline conversions** so the bidding algorithms train on real lead generation. [Connect your Google Ads account](/help/connect-google-ads/) covers the setup.

## Frequently Asked Questions

### Does this work on the free WPForms Lite plugin?

Yes. SourceLoop's tracking happens on the page in your browser, not via the WPForms API, so it works on every WPForms tier including the free Lite version.

### Will this work with WPForms' built-in Stripe, Mailchimp, or HubSpot addons?

Yes. Your existing WPForms addons continue to handle submissions to their connected destinations. SourceLoop adds attribution on top without touching those flows.

### I use the WPForms multi-page or conversational form layouts. Are those captured?

Yes. SourceLoop captures the final submit event regardless of how many pages or steps the form has. The conversational layout works the same way.

### My WordPress site uses caching plugins (WP Rocket, W3 Total Cache, etc.). Will the tracking script still work?

Yes, as long as the script is placed in the `<head>` (or your theme's header.php) before any caching plugin minifies or defers it. Some caching plugins have options to exclude specific scripts from defer/async, use that if you encounter timing issues.

### What happens if a visitor submits a WPForms form via AJAX vs page reload?

Both work. SourceLoop captures the submission event in either case, so you don't need to change your form's submission handling.
