Lead source tracking in Contact Form 7.
Contact Form 7 emails you the data and nothing else. Capture the real source automatically.
Works with every CF7 form on your site.
Any Contact Form 7 form, anywhere on your WordPress site. Shortcode-embedded, in widgets, on landing pages, in popups. No per-form configuration. Works with Flamingo, the official storage add-on, but doesn’t require it.
Two ways to run it on Contact Form 7.
Install the free official plugin and keep every lead inside your own WordPress admin, or drop in one hosted script and send leads to your Lead Source dashboard. Same capture, the difference is where your data lives.
The official plugin
- Captures the source on every CF7 submission, stored in your WordPress admin
- Two-click install from the directory, no account needed
- Runs alongside your existing CF7 forms and Flamingo, nothing to reconfigure
The one-line script
- One JavaScript line in your <head>, no plugin and no PHP
- Leads land in your Lead Source dashboard, independent of WordPress
- Survives a rebuild, host change or full migration
An email arrives. That’s the whole product.
Contact Form 7 is deliberately minimal. It sends you a notification email with the field values. There’s no source data anywhere. Not in the email, not in Flamingo, not in the database.
CF7 is great at what it does. Attribution just isn’t what it does.
One snippet on your WordPress site. Source on every CF7 submission.
- 01Lead Source captures the visitor’s real source, campaign, and page journey when they land on any page of your WordPress site. UTMs, referrer, ad click ID, full session journey.
- 02When the visitor submits a CF7 form, Lead Source intercepts the submission client-side and forwards the form data and source to your Lead Source inbox. Alongside CF7’s normal email notification.
- 03CF7 keeps doing what it does. Sending the notification email, writing to Flamingo if you have it installed, running your existing CF7 actions. Lead Source adds the source data in parallel without touching CF7’s flow.
- 04No PHP, no plugin install, no functions.php edits. Just the snippet in your site header.
One line, before the closing </head>.
<script async src="https://cdn.leadsource.co/track.js" data-site-id="YOUR_SITE_ID"></script>
Drop this in your WordPress theme header (or use a plugin like Insert Headers and Footers). Lead Source auto-detects all CF7 forms on the page and binds the source data on submit. No per-form configuration.
Done in five minutes.
Add the snippet to your WordPress site
Easiest path: install Insert Headers and Footers (or any equivalent), paste the script into the “Scripts in Header” box, save. Comfortable in PHP? Drop it into your theme’s header.php before </head>.
No CF7 configuration needed
Lead Source detects every CF7 form on every page automatically. No shortcode changes, no plugin install, no functions.php edits. Existing CF7 setups work as-is.
Submit a test form
Open one of your CF7 forms with a UTM in the URL (e.g. ?utm_source=google&utm_campaign=test) and submit. You’ll see the new lead in your Lead Source dashboard with the source, campaign, and page journey. Alongside the CF7 email that lands in your inbox.
Questions, answered.
Can I use the WordPress plugin instead of the script for Contact Form 7?
Yes. The free Lead Source plugin is on the WordPress.org directory. Search Plugins, Add New for "Lead Source", install and activate, and it captures the source on every Contact Form 7 submission with every lead stored in your own WordPress admin. Prefer not to run a plugin? The hosted script is one line of plain JavaScript in your site's
, with leads landing in your Lead Source dashboard instead. Both capture the same thing.Does this work with Flamingo?
Yes. Lead Source runs in parallel. CF7 still writes to Flamingo for storage, and the source data lives in your Lead Source dashboard. Flamingo gets the form fields; Lead Source gets the form fields plus the source.
Will this break my existing CF7 actions or integrations?
No. Lead Source captures form submissions client-side without intercepting or altering the CF7 submit flow. Email notifications, Flamingo logging, Mailchimp connections, and any other CF7 integrations keep working as before.
What about CF7 forms inside popups or modals?
Works. Lead Source binds to CF7 forms whenever they appear in the DOM, including dynamically-loaded popup forms from plugins like Popup Maker or Elementor popups.
My host blocks third-party scripts. Can I self-host?
The Lead Source snippet is served from our CDN by default. For locked-down hosts or stricter CSP setups, contact us. We can issue a self-hosted version of the tracker that lives on your domain.
See your real Contact Form 7 lead sources.
Free. Five-minute install. No credit card.
Start freeFree to start · no card