=== LeadVitals ===
Contributors: jaredsdigital, freemius
Tags: lead generation, seo audit, local seo, lead magnet, google business profile
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.3.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A free local business audit for your site. Visitors get a score out of 100, and you get their contact details before the full report.

== Description ==

LeadVitals turns your website into a lead machine for local marketing work.

A visitor types in their business name and city. LeadVitals looks the business up on Google, tests how fast its website loads on a phone, reads its homepage, and checks how well search engines and AI assistants can understand it. The visitor sees an animated score out of 100 and the biggest problem it found. To see the full report, they enter their name, email and phone number. You get the lead, an instant email alert, and a list of every lead in your dashboard.

It was built by a local marketing agency to win its own clients, and it is written for business owners, not marketers. Every finding is in plain language, and every finding comes with what to do about it.

= What the free version does =

* Scores a local business out of 100 across its Google rating and reviews, a complete Google listing, mobile speed, a tap-to-call button, a phone-friendly layout, and its page titles and search tags.
* Flags businesses that are not on Google Maps at all, which are often your best leads.
* Rates "AI search readiness": how clearly the website tells Google AI Overviews and AI assistants who the business is and where it is.
* Shows one problem up front and keeps the full report behind a short lead form.
* Writes a plain-language report with the biggest problems, where the business is losing customers, what is working, the fastest fix, and a 30-day plan.
* Saves every lead in a searchable list in your dashboard and emails you each new one.
* Adds one booking button under the report, so a warm lead can book a call with you on the spot.
* Blocks bots with a hidden form field and limits how many scans one visitor can run per hour, so your Google bill stays under control.

= LeadVitals Pro and Agency =

Pro makes the report close the sale, not just collect the lead. It adds a side-by-side comparison with local competitors, an AI-written report with what customers love and complain about in their reviews, checks built for 13 industries, a lost-revenue calculator, and a PDF the prospect can download.

Agency is for agencies that run their leads through the report. It has everything in Pro, plus your own logo, name and colours on the report and the PDF, three offer cards for your services, CSV export, and a webhook that sends every lead to your CRM.

== Installation ==

1. Install and activate LeadVitals.
2. In Google Cloud, create an API key with **Places API (New)** and **PageSpeed Insights API** enabled. Restrict the key to those two APIs and set a budget alert.
3. Go to **Settings > LeadVitals**. The setup helper at the top of the API Keys tab links you to each Google page you need. Paste the key and press **Test my keys**: it tells you exactly what to fix if anything is wrong.
4. Put the shortcode `[leadvitals]` on any page.
5. Run one test scan while logged in and one in a private window. If your host caches pages, clear its cache after installing or updating.

== Frequently Asked Questions ==

= Does it cost anything to run? =

The plugin is free. Each scan makes calls to Google's APIs on your own Google Cloud account, and Google bills you for them under its current pricing. The per-visitor hourly limit and the six-hour cache of finished audits keep the number of calls down. Set a budget alert in Google Cloud.

= Where do the leads go? =

Into a table in your own WordPress database. You see them under Settings > LeadVitals > Leads, and you get an email for each one. Nothing is sent to us.

= Can a visitor see the full report without filling in the form? =

No. The full report stays on your server and is only sent to the browser after a valid name, email and phone number are submitted.

= Why does it say "We could not find" instead of "You do not have"? =

LeadVitals reads the website's homepage code. A site built entirely with JavaScript can hide things from it, so a miss is worded carefully.

= What happens to my data if I delete the plugin? =

It stays, unless you tick "Delete data on uninstall" on the API Keys tab before deleting the plugin.

== External services ==

LeadVitals connects to the following outside services. Nothing is sent until a visitor runs a scan.

**Google Places API (New)**, to find the business. Sent: the business name and city the visitor typed, and your API key. Terms: https://cloud.google.com/maps-platform/terms Privacy: https://policies.google.com/privacy

**Google PageSpeed Insights API**, to measure mobile speed. Sent: the business's public website address from its Google listing, and your API key. Terms: https://developers.google.com/terms Privacy: https://policies.google.com/privacy

**The business's own website.** LeadVitals downloads the public homepage of the business being scanned to check it. Nothing about the visitor is sent.

**Freemius**, for updates, licensing and optional usage sharing. The first time you open the plugin it asks whether to share data with Freemius, and the plugin works fully if you skip. If you choose Allow, Freemius receives your site address, the WordPress, PHP and plugin versions, your admin name and email, and basic usage events, and it can email you plugin news. A LeadVitals Pro license check sends your license key and site address. Visitor details and scan results are never sent. Terms: https://freemius.com/terms/ Privacy: https://freemius.com/privacy/

The visitor's name, email and phone are stored only in your WordPress database and are never sent to any of these services. Tell visitors on your page that the business name and city they type are sent to Google.

== Screenshots ==

1. The scan form.
2. The score and the first problem found.
3. The lead form that unlocks the full report.
4. The full report.
5. The Leads list in the dashboard.

== Changelog ==

= 2.3.3 =
* The grader now works on hosts that block the WordPress REST API for logged-out visitors. If the REST request is refused before WordPress runs, the widget sends it through admin-ajax.php instead, with the same security token, rate limits and checks.

= 2.3.2 =
* LeadVitals Pro: a shop listed on Google only as a "store" now gets the retail checks (hours, map and online shopping) instead of the general ones.
* The setup helper's links are escaped where they are printed.

= 2.3.1 =
* Updated the bundled Freemius SDK to 2.13.5. No change to how LeadVitals works.

= 2.3.0 =
* Two paid plans. Pro has the competitor comparison, the AI-written report and review analysis, the 13 industry checks, the lost-revenue calculator and the PDF. Agency adds white-label branding, the three offer cards, CSV export and the CRM webhook. The free version is unchanged.
* Settings saved for an Agency feature are kept if a site moves to Pro, and come back when it moves to Agency.

= 2.2.0 =
* New Healthy mode. A business that is listed, scores at or above your threshold (default 85) and fails no checks now gets a "Looking strong" report with a maintenance plan instead of a problem list, and its own closing button. Set the threshold and the button on the Report Button tab.
* LeadVitals Pro: each offer card can be shown to everyone, only to businesses that need fixes, or only to healthy businesses.
* The lead alert email says when a lead is healthy.

= 2.1.0 =
* Licensing and updates through Freemius. LeadVitals Pro needs a valid license; the free version is unchanged. An optional opt-in screen asks whether to share basic usage data and the plugin works fully if you skip it.

= 2.0.1 =
* New setup helper on the API Keys tab: step-by-step links to the right Google Cloud pages and a "Test my keys" button that names the exact problem (key not valid, API not turned on, billing off, key restricted).
* Settings link on the Plugins screen, and a reminder on the Plugins screen and Dashboard until a Google key is saved.

= 2.0.0 =
* First public release as LeadVitals, with a free version and LeadVitals Pro.
* "Powered by LeadVitals" is now off unless you turn it on.
* New "Delete data on uninstall" setting, off by default.

== Upgrade Notice ==

= 2.3.3 =
Fixes the grader on hosts that block the REST API for logged-out visitors. Recommended for everyone.

= 2.3.2 =
Small fixes: plain "store" listings get the retail checks in Pro, and safer link output in the setup helper.

= 2.3.1 =
Maintenance update: newer Freemius SDK. Nothing changes in your settings or reports.

= 2.3.0 =
Paid features are now split into Pro and Agency plans. White-label branding, offer cards, CSV export and the CRM webhook need the Agency plan.

= 2.2.0 =
Healthy businesses now get a "keep it this way" report instead of a list of problems.

= 2.1.0 =
Adds licensing and updates through Freemius. Pro owners will be asked to activate a license key.

= 2.0.1 =
Adds the setup helper and key test.
