=== turbometrics ===
Contributors: turbopress, robbsie
Tags: performance, core web vitals, real user monitoring, lcp, speed
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.5
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.io](https://turbometrics.io).

= External Services =

This plugin embeds a tracking script from turbometrics.io
(`https://turbometrics.io/tm.min.js`). The script sends
performance measurements of your visitors' page views to
`https://turbometrics.io/api/tm`.

In the WordPress admin the plugin calls the turbometrics API at
`https://turbometrics.io/api/v1` (`/me`, `/rum/sites`,
`/rum/sites/{id}/summary`) to validate your API key and to
display your metrics in the dashboard widget.

turbometrics.io and turbometrics.de are the same service,
operated by TurboPress. turbometrics.de is the former domain
and redirects to turbometrics.io.

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

== Installation ==

1. Upload and activate the plugin
2. Go to **Settings → turbometrics** and enter your API key
3. Find your API key at turbometrics.io/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.5 =
* Change: the interface is now written in English, so it can be translated. Until now the source strings themselves were German, which left every other language stuck with German and made the plugin untranslatable on translate.wordpress.org.
* New: a German translation ships with the plugin, so German installations look exactly as before.
* Fix: the seventeen strings the dashboard widget and the settings page build in the browser were hard-coded in the script and could not be translated at all. They now come from the translation catalogue.
* Fix: numbers and the time of the last refresh in the dashboard widget followed a fixed German format regardless of the language the site runs in. They now follow the locale of the person looking at it.
* Fix: the plugin description was spread over two lines in the plugin header. WordPress reads only the first, so the Plugins screen showed half a sentence.

= 1.0.4 =
* Fix: uninstalling now removes the cached summary transient. The previous cleanup counted site ids from 1 upwards and stopped at the first one it did not find, so it removed nothing unless the site id happened to be 1.
* Tested against WordPress 7.1.

= 1.0.3 =
* Change: turbometrics has moved from turbometrics.de to turbometrics.io — script URL, API endpoints and all dashboard links now use the new domain
* Note: existing installations keep working, turbometrics.de redirects to turbometrics.io

= 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.5 =
The interface is now translatable. German installations are unchanged — the German translation ships with the plugin.

= 1.0.4 =
Housekeeping only: uninstalling now clears the data it cached. Nothing changes while the plugin is in use.

= 1.0.3 =
Domain change: turbometrics now runs on turbometrics.io. Please update to keep using the latest endpoints.

= 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.
