Title: First Found: Lead Source Info for Contact Form 7
Author: James Maabadi
Published: <strong>October 27, 2026</strong>
Last modified: October 27, 2026

---

Search plugins

![](https://ps.w.org/first-found-lead-source-info-for-contact-form-7/assets/banner-
772x250.png?rev=3768960)

![](https://ps.w.org/first-found-lead-source-info-for-contact-form-7/assets/icon.
svg?rev=3768960)

# First Found: Lead Source Info for Contact Form 7

 By [James Maabadi](https://profiles.wordpress.org/jamesmm/)

[Download](https://downloads.wordpress.org/plugin/first-found-lead-source-info-for-contact-form-7.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/first-found-lead-source-info-for-contact-form-7/#description)
 * [Reviews](https://wordpress.org/plugins/first-found-lead-source-info-for-contact-form-7/#reviews)
 *  [Installation](https://wordpress.org/plugins/first-found-lead-source-info-for-contact-form-7/#installation)
 * [Development](https://wordpress.org/plugins/first-found-lead-source-info-for-contact-form-7/#developers)

 [Support](https://wordpress.org/support/plugin/first-found-lead-source-info-for-contact-form-7/)

## Description

A contact form email tells you who wrote. It does not tell you how they found you.

First Found adds that answer to every message, in words a business owner can read
without knowing what a UTM tag is:

    ```
    -- lead source info --
    Lead source: Google Ads
    First found: Organic search (Google), September 26, 2026 7:15 am
    Submitted: October 5, 2026 11:20 pm
    ```

**Lead source** is the visit they sent the form on. **First found** is the first
time they came to your site, which can be weeks earlier and from somewhere else.
Together they show which of your ads, listings and links start a customer’s search
and which one closes it.

**What it does**

 * Adds the three lines above to the end of each form’s main email
 * Never touches Mail (2), the copy many sites send to the customer
 * Names the source in plain words: Google Ads, Microsoft Ads, Organic search (Google),
   Google Business Profile, Social (Facebook), AI assistant (chatgpt.com), Email,
   Direct, Other website (example.com)
 * Recognizes visitors sent by ChatGPT, Perplexity, Claude, Gemini, Copilot and 
   other AI assistants
 * Gives you eleven mail tags to place the information anywhere in an email, including
   the subject
 * Works with plain text and HTML emails
 * Stores the full record with each message in Flamingo, and adds a Lead source 
   column to Flamingo’s Inbound Messages list
 * Works behind page caching, because the visit is recorded in the browser
 * Waits for the visitor’s consent when a cookie banner that supports the WP Consent
   API is active
 * Makes no outside requests and adds no script or style files to your pages

**Works with Flamingo**

[Flamingo](https://wordpress.org/plugins/flamingo/) is the free message storage 
plugin by the author of Contact Form 7. With it active, Inbound Messages gets a 
Lead source column, so you can read the source of every lead down the list without
opening one. Each message’s Meta box holds the detail behind it: both visits, their
landing pages, referrers, campaign tags and ad click ids. Flamingo is optional. 
Without it the emails work the same.

**How the source is worked out**

The plugin looks at three things from the visit: an ad click id in the link (Google
Ads, Microsoft Ads, Meta), campaign tags in the link (utm_source, utm_medium, utm_campaign),
and the website the visitor came from. An ad click wins over everything else, since
an ad click arrives from google.com too. A visit that carries no information at 
all is Direct. A visitor whose browser stored nothing shows as Unknown, never as
a guess.

To have your Google Business Profile show as its own source, tag the website link
on the profile, for example `https://example.com/?utm_source=google&utm_medium=organic&
utm_campaign=gbp`.

## Screenshots

[⌊The lead source info at the end of a form email.⌉⌊The lead source info at the 
end of a form email.⌉[

The lead source info at the end of a form email.

[⌊The Lead source column on Flamingo's Inbound Messages.⌉⌊The Lead source column
on Flamingo's Inbound Messages.⌉[

The Lead source column on Flamingo’s Inbound Messages.

[⌊The full record in a Flamingo message's Meta box.⌉⌊The full record in a Flamingo
message's Meta box.⌉[

The full record in a Flamingo message’s Meta box.

[⌊The settings page under Contact > Lead Source Info.⌉⌊The settings page under Contact
> Lead Source Info.⌉[

The settings page under Contact > Lead Source Info.

## Installation

 1. Install and activate Contact Form 7.
 2. Install and activate this plugin.
 3. That is all. Your form emails now end with the lead source info.

Settings are under Contact > Lead Source Info.

## FAQ

### Do I have to edit my forms?

No. The lead source info is added to the end of each form’s main email once the 
plugin is active.

### Will my customers see it?

No. Only the main email, the Mail section of a form, gets it. Mail (2) is never 
changed. If you type one of the mail tags into Mail (2) yourself, it will print 
there.

### How do I place the information myself?

Type a mail tag in the form’s Mail tab, in the message body or the subject:

 * `[_lead_source_info]` the whole block
 * `[_lead_source]` the source of the visit they sent the form on
 * `[_lead_first_found]` the source of their first visit
 * `[_lead_first_visit]` date and time of the first visit
 * `[_lead_first_landing]` the page they landed on at the first visit
 * `[_lead_first_referrer]` the website that sent them at the first visit
 * `[_lead_first_utm]` campaign tags and ad click ids of the first visit
 * `[_lead_last_visit]`, `[_lead_last_landing]`, `[_lead_last_referrer]`, `[_lead_last_utm]`
   the same for the latest arrival from outside the site

An email that uses one of these tags in its body does not get the block added at
the end as well. A subject such as `New lead via [_lead_source]` works too.

### How do I turn it off for one form?

Add this line in the form’s Additional Settings tab:

    ```
    lead_source_info: off
    ```

To do the opposite, untick the box on the settings page and add `lead_source_info:
on` to the forms that should have it.

### Does it work with page caching?

Yes. The visit is recorded by a small script in the visitor’s browser, so it works
on a cached page. The script is marked so that LiteSpeed Cache and Cloudflare Rocket
Loader do not delay it.

### Does it set cookies?

Yes, two first-party cookies: `lsicf7_first` for the first visit and `lsicf7_last`
for the latest arrival from outside the site. Each holds the website the visitor
came from, the page they landed on, the campaign tags and ad click ids from the 
link, and the time. They last 90 days unless you change it.

### Does it work with my cookie banner?

If your banner supports the [WP Consent API](https://wordpress.org/plugins/wp-consent-api/),
nothing is stored until the visitor allows the marketing category. A visitor who
declines can still send the form. Their message shows the source as Unknown.

### What does Unknown mean?

The visitor’s browser had nothing stored: cookies or JavaScript were blocked, or
consent was not given. The plugin does not guess.

### Why do older Flamingo messages have an empty Lead source?

Messages received before the plugin was active have no source stored. The cell stays
empty.

### I am a developer. What can I change?

Functions:

 * `lsicf7_get_data()` every value for the current visitor, as an array
 * `lsicf7_get_touch( 'first' )` and `lsicf7_get_touch( 'last' )` the stored visits
 * `lsicf7_get_channel( $touch )` the source name of one visit

Filters:

 * `lsicf7_channel` the source name of a visit, with the visit as the second argument
 * `lsicf7_block_lines` the lines of the email block
 * `lsicf7_append_to_mail` whether the block is added to an email, with the form
   and the mail objects
 * `lsicf7_data` the values behind the block, the mail tags and Flamingo
 * `lsicf7_tracked_params` the link parameters that are kept
 * `lsicf7_flamingo_column_value` what the Flamingo column shows for a message
 * `lsicf7_capture_enabled` return false to stop recording visits
 * `lsicf7_consent_category` the WP Consent API category to wait for, `marketing`
   by default

Add the landing page to the email:

    ```
    add_filter( 'lsicf7_block_lines', function ( $lines, $data ) {
        $lines[] = 'Landing page: ' . $data['lead_first_landing'];
        return $lines;
    }, 10, 2 );
    ```

Name your own source:

    ```
    add_filter( 'lsicf7_channel', function ( $channel, $touch ) {
        if ( isset( $touch['params']['utm_source'] ) && 'spring-mailer' === $touch['params']['utm_source'] ) {
            return 'Spring postcard';
        }
        return $channel;
    }, 10, 2 );
    ```

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“First Found: Lead Source Info for Contact Form 7” is open source software. The 
following people have contributed to this plugin.

Contributors

 *   [ James Maabadi ](https://profiles.wordpress.org/jamesmm/)

[Translate “First Found: Lead Source Info for Contact Form 7” into your language.](https://translate.wordpress.org/projects/wp-plugins/first-found-lead-source-info-for-contact-form-7)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/first-found-lead-source-info-for-contact-form-7/),
check out the [SVN repository](https://plugins.svn.wordpress.org/first-found-lead-source-info-for-contact-form-7/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/first-found-lead-source-info-for-contact-form-7/)
by [RSS](https://plugins.trac.wordpress.org/log/first-found-lead-source-info-for-contact-form-7/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * First release.

## Meta

 *  Version **1.0.0**
 *  Last updated **5 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.7 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [attribution](https://wordpress.org/plugins/tags/attribution/)[contact form 7](https://wordpress.org/plugins/tags/contact-form-7/)
   [flamingo](https://wordpress.org/plugins/tags/flamingo/)[lead source](https://wordpress.org/plugins/tags/lead-source/)
   [UTM](https://wordpress.org/plugins/tags/utm/)
 *  [Advanced View](https://wordpress.org/plugins/first-found-lead-source-info-for-contact-form-7/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/first-found-lead-source-info-for-contact-form-7/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/first-found-lead-source-info-for-contact-form-7/reviews/)

## Contributors

 *   [ James Maabadi ](https://profiles.wordpress.org/jamesmm/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/first-found-lead-source-info-for-contact-form-7/)