=== MetricPanel Analytics ===
Contributors: fiftyone
Tags: analytics, privacy, cookieless, consent, metricpanel
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Install privacy-aware MetricPanel analytics without editing your WordPress theme.

== Description ==

MetricPanel Analytics is the first-party WordPress integration for MetricPanel. It adds the
MetricPanel tracker once through WordPress's script APIs and provides settings for the Website ID,
tracker and API/proxy URLs, cookieless tracking, consent behavior, geolocation, localhost traffic,
and debug logging.

The plugin does not create a public health endpoint. The admin health check is protected by the
manage_options capability and a WordPress nonce. MetricPanel dashboard verification is also
authenticated and checks the plugin marker on your site's public homepage separately from observed
analytics traffic.

WooCommerce revenue tracking is not included in version 1.0.0. It is planned as a separate phase
and should not be inferred from pageview tracking.

== External services ==

MetricPanel Analytics is a client for the hosted MetricPanel analytics service. The service is
required for the plugin to provide analytics. Activating the plugin alone does not contact
MetricPanel; the public tracker is loaded after an administrator saves a Website ID.

When configured, public pages load the tracker from https://app.metricpanel.io. The tracker sends
analytics events to https://api.metricpanel.io or to the administrator-configured first-party proxy.
Event data can include the MetricPanel Website ID, generated visitor and session identifiers, URL
path and query parameters, page title, referrer, campaign parameters, device category, screen
dimensions, browser, operating system, timestamp, privacy-mode flags, and custom event data added by
the site. Network requests also disclose the visitor's IP address and user agent to the receiving
service. IP addresses may be used for geolocation unless the administrator enables Disable
geolocation.

By default, the tracker stores generated visitor and session identifiers in first-party cookies.
Cookieless mode uses sessionStorage or in-memory identifiers for the current browser session. Wait
for consent mode downloads the tracker but does not send analytics events until the site's consent
manager calls window.metricpanel.giveConsent(). The site owner is responsible for choosing the
appropriate settings, providing any required notice, and obtaining any required consent.

The admin-only configuration health check requests the configured tracker URL from the WordPress
server when an administrator clicks Test configuration.

* MetricPanel service: https://metricpanel.io
* Tracker service: https://app.metricpanel.io
* Analytics API: https://api.metricpanel.io
* Privacy policy: https://metricpanel.io/privacy
* Terms of service: https://metricpanel.io/terms

== Privacy ==

MetricPanel provides cookieless, consent-gated, and geolocation-disabled modes, but no plugin can
guarantee legal compliance. Review the External services section and update your site's privacy and
cookie notices to match the settings you enable. WordPress also adds suggested MetricPanel text to
Settings > Privacy > Policy Guide after activation.

== Installation ==

1. In WordPress, open Plugins > Add New Plugin.
2. Search for MetricPanel Analytics.
3. Install the plugin by contributor fiftyone, then activate it.
4. Open Settings > MetricPanel.
5. Paste the Website ID shown in MetricPanel onboarding.
6. Confirm the tracker URL and API or first-party proxy URL.
7. Choose the privacy, consent, localhost, and debug settings appropriate for the site.
8. Save settings, visit the public site, then use Verify WordPress installation in MetricPanel.

Do not install the tracker through both this plugin and a theme, tag manager, or header-injection
plugin. MetricPanel's tracker has a browser duplicate guard, but only one installation should be
maintained.

== Frequently Asked Questions ==

= How does consent mode work? =

Choose Wait for consent manager to add MetricPanel's consent flag. Your consent manager must call
window.metricpanel.giveConsent() after analytics consent is granted.

= Does the plugin track WooCommerce revenue? =

No. Version 1.0.0 installs the website analytics tracker only. WooCommerce order and revenue
tracking require a separately implemented and tested integration.

== Changelog ==

= 1.0.0 =

* Initial WordPress.org release.
* Added secured settings and configuration health check.
* Added privacy, consent, localhost, and debug controls.
