Linux 软件免费装
Banner图

First Found: Lead Source Info for Contact Form 7

开发者 jamesmm
更新时间 2026年10月27日 23:40
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

contact form 7 flamingo utm attribution lead source

下载

1.0.0

详情介绍:

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 Works with Flamingo 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.

安装:

  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.

屏幕截图:

  • The Lead source column on Flamingo's Inbound Messages.
  • The full record in a Flamingo message's Meta box.
  • The settings page under Contact > Lead Source Info.

升级注意事项:

1.0.0 First release.

常见问题:

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, 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 );

更新日志:

1.0.0