{"id":381980,"date":"2026-10-27T15:40:32","date_gmt":"2026-10-27T15:40:32","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/first-found-lead-source-info-for-contact-form-7\/"},"modified":"2026-10-27T15:40:08","modified_gmt":"2026-10-27T15:40:08","slug":"first-found-lead-source-info-for-contact-form-7","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/first-found-lead-source-info-for-contact-form-7\/","author":13272503,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.7","requires_php":"7.4","requires_plugins":null,"header_name":"First Found: Lead Source Info for Contact Form 7","header_author":"James Maabadi","header_description":"Adds where each lead came from (Google Ads, organic search, social, an AI assistant and more) to your Contact Form 7 emails, and a Lead source column to Flamingo.","assets_banners_color":"5f8d8e","last_updated":"2026-10-27 15:40:08","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/profiles.wordpress.org\/jamesmm\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":108,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"jamesmm","date":"2026-10-27 15:40:08","revision":3768960}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3768960,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3768960,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3768960,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3768960,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3768960,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3768960,"resolution":"1","location":"assets","locale":"","width":780,"height":514},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3768960,"resolution":"2","location":"assets","locale":"","width":1280,"height":801},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3768960,"resolution":"3","location":"assets","locale":"","width":1280,"height":1500},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3768960,"resolution":"4","location":"assets","locale":"","width":1280,"height":1483}},"screenshots":{"1":"The lead source info at the end of a form email.","2":"The Lead source column on Flamingo's Inbound Messages.","3":"The full record in a Flamingo message's Meta box.","4":"The settings page under Contact &gt; Lead Source Info."}},"plugin_section":[],"plugin_tags":[9067,1152,20925,40003,24188],"plugin_category":[],"plugin_contributors":[86516],"plugin_business_model":[],"class_list":["post-381980","plugin","type-plugin","status-publish","hentry","plugin_tags-attribution","plugin_tags-contact-form-7","plugin_tags-flamingo","plugin_tags-lead-source","plugin_tags-utm","plugin_contributors-jamesmm","plugin_committers-jamesmm"],"banners":{"banner":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/banner-772x250.png?rev=3768960","banner_2x":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/banner-1544x500.png?rev=3768960","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/icon.svg?rev=3768960","icon":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/icon.svg?rev=3768960","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/screenshot-1.png?rev=3768960","caption":"The lead source info at the end of a form email."},{"src":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/screenshot-2.png?rev=3768960","caption":"The Lead source column on Flamingo's Inbound Messages."},{"src":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/screenshot-3.png?rev=3768960","caption":"The full record in a Flamingo message's Meta box."},{"src":"https:\/\/ps.w.org\/first-found-lead-source-info-for-contact-form-7\/assets\/screenshot-4.png?rev=3768960","caption":"The settings page under Contact &gt; Lead Source Info."}],"raw_content":"<!--section=description-->\n<p>A contact form email tells you who wrote. It does not tell you how they found you.<\/p>\n\n<p>First Found adds that answer to every message, in words a business owner can read without knowing what a UTM tag is:<\/p>\n\n<pre><code>-- lead source info --\nLead source: Google Ads\nFirst found: Organic search (Google), September 26, 2026 7:15 am\nSubmitted: October 5, 2026 11:20 pm\n<\/code><\/pre>\n\n<p><strong>Lead source<\/strong> is the visit they sent the form on. <strong>First found<\/strong> 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.<\/p>\n\n<p><strong>What it does<\/strong><\/p>\n\n<ul>\n<li>Adds the three lines above to the end of each form's main email<\/li>\n<li>Never touches Mail (2), the copy many sites send to the customer<\/li>\n<li>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)<\/li>\n<li>Recognizes visitors sent by ChatGPT, Perplexity, Claude, Gemini, Copilot and other AI assistants<\/li>\n<li>Gives you eleven mail tags to place the information anywhere in an email, including the subject<\/li>\n<li>Works with plain text and HTML emails<\/li>\n<li>Stores the full record with each message in Flamingo, and adds a Lead source column to Flamingo's Inbound Messages list<\/li>\n<li>Works behind page caching, because the visit is recorded in the browser<\/li>\n<li>Waits for the visitor's consent when a cookie banner that supports the WP Consent API is active<\/li>\n<li>Makes no outside requests and adds no script or style files to your pages<\/li>\n<\/ul>\n\n<p><strong>Works with Flamingo<\/strong><\/p>\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/flamingo\/\">Flamingo<\/a> 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.<\/p>\n\n<p><strong>How the source is worked out<\/strong><\/p>\n\n<p>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.<\/p>\n\n<p>To have your Google Business Profile show as its own source, tag the website link on the profile, for example <code>https:\/\/example.com\/?utm_source=google&amp;utm_medium=organic&amp;utm_campaign=gbp<\/code>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate Contact Form 7.<\/li>\n<li>Install and activate this plugin.<\/li>\n<li>That is all. Your form emails now end with the lead source info.<\/li>\n<\/ol>\n\n<p>Settings are under Contact &gt; Lead Source Info.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20have%20to%20edit%20my%20forms%3F\"><h3>Do I have to edit my forms?<\/h3><\/dt>\n<dd><p>No. The lead source info is added to the end of each form's main email once the plugin is active.<\/p><\/dd>\n<dt id=\"will%20my%20customers%20see%20it%3F\"><h3>Will my customers see it?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"how%20do%20i%20place%20the%20information%20myself%3F\"><h3>How do I place the information myself?<\/h3><\/dt>\n<dd><p>Type a mail tag in the form's Mail tab, in the message body or the subject:<\/p>\n\n<ul>\n<li><code>[_lead_source_info]<\/code> the whole block<\/li>\n<li><code>[_lead_source]<\/code> the source of the visit they sent the form on<\/li>\n<li><code>[_lead_first_found]<\/code> the source of their first visit<\/li>\n<li><code>[_lead_first_visit]<\/code> date and time of the first visit<\/li>\n<li><code>[_lead_first_landing]<\/code> the page they landed on at the first visit<\/li>\n<li><code>[_lead_first_referrer]<\/code> the website that sent them at the first visit<\/li>\n<li><code>[_lead_first_utm]<\/code> campaign tags and ad click ids of the first visit<\/li>\n<li><code>[_lead_last_visit]<\/code>, <code>[_lead_last_landing]<\/code>, <code>[_lead_last_referrer]<\/code>, <code>[_lead_last_utm]<\/code> the same for the latest arrival from outside the site<\/li>\n<\/ul>\n\n<p>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 <code>New lead via [_lead_source]<\/code> works too.<\/p><\/dd>\n<dt id=\"how%20do%20i%20turn%20it%20off%20for%20one%20form%3F\"><h3>How do I turn it off for one form?<\/h3><\/dt>\n<dd><p>Add this line in the form's Additional Settings tab:<\/p>\n\n<pre><code>lead_source_info: off\n<\/code><\/pre>\n\n<p>To do the opposite, untick the box on the settings page and add <code>lead_source_info: on<\/code> to the forms that should have it.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20page%20caching%3F\"><h3>Does it work with page caching?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20set%20cookies%3F\"><h3>Does it set cookies?<\/h3><\/dt>\n<dd><p>Yes, two first-party cookies: <code>lsicf7_first<\/code> for the first visit and <code>lsicf7_last<\/code> 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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20my%20cookie%20banner%3F\"><h3>Does it work with my cookie banner?<\/h3><\/dt>\n<dd><p>If your banner supports the <a href=\"https:\/\/wordpress.org\/plugins\/wp-consent-api\/\">WP Consent API<\/a>, 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.<\/p><\/dd>\n<dt id=\"what%20does%20unknown%20mean%3F\"><h3>What does Unknown mean?<\/h3><\/dt>\n<dd><p>The visitor's browser had nothing stored: cookies or JavaScript were blocked, or consent was not given. The plugin does not guess.<\/p><\/dd>\n<dt id=\"why%20do%20older%20flamingo%20messages%20have%20an%20empty%20lead%20source%3F\"><h3>Why do older Flamingo messages have an empty Lead source?<\/h3><\/dt>\n<dd><p>Messages received before the plugin was active have no source stored. The cell stays empty.<\/p><\/dd>\n<dt id=\"i%20am%20a%20developer.%20what%20can%20i%20change%3F\"><h3>I am a developer. What can I change?<\/h3><\/dt>\n<dd><p>Functions:<\/p>\n\n<ul>\n<li><code>lsicf7_get_data()<\/code> every value for the current visitor, as an array<\/li>\n<li><code>lsicf7_get_touch( 'first' )<\/code> and <code>lsicf7_get_touch( 'last' )<\/code> the stored visits<\/li>\n<li><code>lsicf7_get_channel( $touch )<\/code> the source name of one visit<\/li>\n<\/ul>\n\n<p>Filters:<\/p>\n\n<ul>\n<li><code>lsicf7_channel<\/code> the source name of a visit, with the visit as the second argument<\/li>\n<li><code>lsicf7_block_lines<\/code> the lines of the email block<\/li>\n<li><code>lsicf7_append_to_mail<\/code> whether the block is added to an email, with the form and the mail objects<\/li>\n<li><code>lsicf7_data<\/code> the values behind the block, the mail tags and Flamingo<\/li>\n<li><code>lsicf7_tracked_params<\/code> the link parameters that are kept<\/li>\n<li><code>lsicf7_flamingo_column_value<\/code> what the Flamingo column shows for a message<\/li>\n<li><code>lsicf7_capture_enabled<\/code> return false to stop recording visits<\/li>\n<li><code>lsicf7_consent_category<\/code> the WP Consent API category to wait for, <code>marketing<\/code> by default<\/li>\n<\/ul>\n\n<p>Add the landing page to the email:<\/p>\n\n<pre><code>add_filter( 'lsicf7_block_lines', function ( $lines, $data ) {\n    $lines[] = 'Landing page: ' . $data['lead_first_landing'];\n    return $lines;\n}, 10, 2 );\n<\/code><\/pre>\n\n<p>Name your own source:<\/p>\n\n<pre><code>add_filter( 'lsicf7_channel', function ( $channel, $touch ) {\n    if ( isset( $touch['params']['utm_source'] ) &amp;&amp; 'spring-mailer' === $touch['params']['utm_source'] ) {\n        return 'Spring postcard';\n    }\n    return $channel;\n}, 10, 2 );\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Adds where each lead came from to your Contact Form 7 emails, and a Lead source column to Flamingo.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/381980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=381980"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jamesmm"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=381980"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=381980"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=381980"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=381980"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=381980"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=381980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}