=== turbometrics ===
Contributors: turbopress, robbsie
Tags: performance, core web vitals, real user monitoring, lcp, speed
Requires at least: 5.9
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real User Monitoring for WordPress — Core Web Vitals from
your real visitors, directly in your dashboard.

== Description ==

**turbometrics** measures the real performance of your
WordPress website from your visitors' perspective — not
from a lab environment.

While synthetic tools (like Lighthouse or PageSpeed Insights)
measure your site under controlled conditions, turbometrics
shows what your real visitors experience: on their devices,
with their internet connection, from their region.

= What the plugin does =

* Automatically embeds the turbometrics tracking script
  in the `<head>` of every page
* Measures LCP, CLS, INP, FCP and TTFB from your real visitors
* Optionally excludes WordPress administrators from tracking
* Marks WooCommerce checkout pages separately for precise analysis
* Shows Core Web Vitals and all 5 metrics directly in the
  WordPress dashboard widget

= Core Web Vitals =

Google evaluates websites based on three signals:

* **LCP** (Largest Contentful Paint) — loading time of main content
* **CLS** (Cumulative Layout Shift) — visual stability during load
* **INP** (Interaction to Next Paint) — response time to clicks

turbometrics shows you whether your site meets these thresholds
for real visitors — and alerts you when it does not.

= Privacy =

* No cookies
* No personal data collected
* IP addresses are anonymized after country detection
* GDPR-compliant when properly declared in your privacy policy

= Requirements =

An active turbometrics account with a Live Data plan is required.
Free trial available at [turbometrics.de](https://turbometrics.de).

= External Services =

This plugin embeds a script from turbometrics.de
(`https://turbometrics.de/tm.min.js`) and sends performance
data to `https://turbometrics.de/api/tm`.

By using this plugin, you agree to the
[Privacy Policy](https://turbometrics.de/datenschutz) and
[Terms of Service](https://turbometrics.de/agb) of turbometrics.de.

== Installation ==

1. Upload and activate the plugin
2. Go to **Settings → turbometrics** and enter your API key
3. Find your API key at turbometrics.de/profile/api
4. Click "Test connection" — if successful, the script will be
   embedded automatically
5. The dashboard widget appears immediately on the WordPress home screen

== Frequently Asked Questions ==

= Do I need a turbometrics account? =

Yes. You need at least a Starter plan with Live Data feature.
A free trial is available.

= Are cookies used? =

No. turbometrics works completely without cookies.

= Is the plugin GDPR-compliant? =

turbometrics collects only anonymized technical performance data.
IP addresses are anonymized after country detection. No personal
data is stored. We recommend mentioning the use of turbometrics
in your website's privacy policy. A ready-made privacy policy
text is available in the turbometrics dashboard.

= Does it work with WooCommerce? =

Yes. When WooCommerce is active, checkout pages can be marked
separately for more precise performance analysis.

= Are administrators tracked? =

By default, no. Logged-in administrators are excluded from
tracking to avoid skewing measurement data. This option can
be disabled in the settings.

= What happens to my data when I uninstall the plugin? =

When uninstalling, all local WordPress options and caches
are deleted. Data in your turbometrics account remains and
can be deleted there.

== Screenshots ==

1. Dashboard widget with Core Web Vitals and all 5 metrics
2. Settings page with API key and options

== Changelog ==

= 1.0.2 =
* Fix: "Test connection" now works before saving — uses input field value instead of only saved option

= 1.0.1 =
* Fix: public_key extraction from embed_snippet
* Fix: CWV assessment threshold reduced to 10 measurements
* New: Reload button in dashboard widget

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.2 =
Fix: "Test connection" now works immediately after entering the API key.

= 1.0.1 =
Bug fix update — improved CWV display and script embedding.
