=== Independence Hub Connector ===
Contributors: mdburnette
Tags: analytics, independent analytics, website traffic, reports, dashboard
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.6.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect separate WordPress sites running Independent Analytics to one private, read-only Hub dashboard.

== Description ==

**Every site. One clear pulse.** If you manage several WordPress sites that each run [Independent Analytics](https://wordpress.org/plugins/independent-analytics/), install Independence Hub Connector on each site to bring their traffic into one calm dashboard. See which sites are growing, spot changes worth investigating, and prepare a portfolio report without opening each WordPress admin.

Independence Hub Connector is the bridge between one WordPress site and the hosted Hub. A WordPress administrator approves each connection on their own site. The connector then gives the Hub read-only access to supported aggregate Independent Analytics reports through a revocable, site-specific token. No WordPress password or Application Password is shared.

**In the Independence Hub dashboard**

* Compare page views, visitors, sessions, and daily traffic across the WordPress sites you connect.
* Open a site report to explore top pages, sources, locations, devices, and session metrics.
* Group sites by client or portfolio, then include or exclude a group from views and reports.
* Review portfolio Insights and choose the sites and sections for a printable report.

The dashboard is a separate hosted service. [Create your Hub account](https://app.independence-hub.com/) to connect sites and view reports. Custom printable reports require the Hub's Unlimited plan.

**What the connector provides**

* A guided connection approved by a WordPress administrator on the site itself.
* A read-only connection to Independent Analytics data for the Independence Hub dashboard.
* Overview reporting for page views, visitors, sessions, daily totals, and comparisons with the immediately preceding period.
* Detailed reports with top pages, geographic traffic, device types, traffic sources, new and returning sessions, average session duration, and bounce rate.
* Reporting ranges of 7, 28, 30, or 90 days.
* A site-specific access token that administrators can revoke from Settings → Independence Hub Connector.

**Before you connect**

* This plugin is a connector, not an analytics dashboard. Create an account at https://app.independence-hub.com/ to view reports from the sites you connect.
* Independent Analytics is a separate plugin and must already be installed and active on each site you connect. This connector does not install it or add tracking code.
* It does not provide visitor-level records, change analytics settings, or let Independence Hub administer your WordPress site.
* It does not share a WordPress password or Application Password. Its token can access only this connector’s read-only analytics endpoints; it cannot sign in to WordPress or access other WordPress APIs.

**Privacy and security**

The connector reads analytics already collected by Independent Analytics. It sends the site URL and a random, site-specific token to Independence Hub over HTTPS only when an administrator approves a connection. The Hub uses the token to request the supported aggregate reports; it encrypts the token at rest. WordPress stores only a hash of the token. Revoke access at any time from Settings → Independence Hub Connector. Review the [Independence Hub privacy policy](https://app.independence-hub.com/privacy) and [terms of service](https://app.independence-hub.com/terms) before connecting.

== Installation ==

1. Sign in to Independence Hub at https://app.independence-hub.com/ and choose Add site.
2. Enter one WordPress site URL. If needed, use the WordPress.org installer link to install and activate Independence Hub Connector on that site. You can also install it from Plugins → Add New.
3. Return to the Hub tab and choose “Step 2: Connect this site.”
4. Sign in to WordPress if prompted and approve the connection. You’ll return to Independence Hub when it’s connected.
5. Make sure Independent Analytics is installed and active to view reports.

If your host does not allow installing from the WordPress.org directory, download the plugin ZIP from the plugin page and install it through Plugins → Add New → Upload Plugin.

== Frequently Asked Questions ==

= Do I need an Independence Hub account? =

Yes. This plugin securely connects a WordPress site to the hosted Independence Hub dashboard. Create an account at https://app.independence-hub.com/ to start a connection and view your reports.

= What analytics data can Independence Hub access? =

The connector provides aggregate page views, visitors, sessions, daily totals, and comparison totals, plus detailed report summaries for pages, geography, devices, sources, and session metrics. Reports are available for 7, 28, 30, or 90 days. The connector does not expose visitor-level records.

= Does the plugin collect or send personal data? =

The connector does not add tracking or collect new visitor-level data. After an administrator approves a connection, it sends the site URL and a random, site-specific token to Independence Hub over HTTPS. The Hub then requests the supported analytics reports. WordPress stores only a hash of the token; the Hub encrypts the token at rest. See the service’s privacy policy for details.

= Can Independence Hub administer my WordPress site? =

No. The token is restricted to this plugin’s read-only analytics endpoints. It cannot authenticate to WordPress, access other WordPress APIs, or install, change, or remove site content, plugins, themes, users, or settings.

= How do I disconnect a site? =

In WordPress, go to Settings → Independence Hub Connector and revoke the token. You can also remove the site from your Independence Hub account. Uninstalling the connector removes its local token hash; it does not delete Independent Analytics data.

= What happens if I uninstall the connector? =

Uninstalling removes the connector’s local token hash, preventing future requests with that token. It does not uninstall Independent Analytics or delete its analytics data.

== Changelog ==

= 1.6.0 (2026-09-23) =

* Replace administrator Application Password sharing with a revocable token limited to read-only analytics endpoints.
* Add a nonce-protected settings action to revoke the active analytics token.
* Remove the connection token hash when uninstalling the plugin.

= 1.5.4 (2026-09-20) =

* Fix the approval callback to enqueue its submission script through WordPress.
* Document that the connection bootstrap endpoint is intentionally public while protected analytics endpoints remain administrator-only.
* Fix activation-safe loading without activation-time output or external requests.

= 1.5.3 (2026-09-16) =

* Update the canonical Independence Hub service URLs for the new app domain.

= 1.5.2 (2026-09-16) =

* Fix the plugin and readme Tested up to headers so they remain consistent.
* Document the trusted analytics table identifier used by the prepared detail query.

= 1.5.1 (2026-09-16) =

* Fix Plugin Check warnings for the approval state and detailed metrics query.
* Remove the deprecated manual translation loader.
* Remove the unexpected production documentation file from the plugin package.

= 1.5.0 (2026-09-16) =

* Remove the private update service so WordPress.org manages connector updates.
* Fix approval credential delivery by posting it over HTTPS instead of placing it in a redirect URL.
* Add service, privacy, and credential-sharing disclosures to the plugin settings and WordPress privacy-policy helper.

= 1.4.0 (2026-09-14) =

* Fix the signed updater response so WordPress can display connector updates.
* Add a read-only detailed analytics endpoint for site reports in Independence Hub.

= 1.3.2 (2026-09-14) =

* Fix signed update discovery and serve the connector manifest from its configured update path.

= 1.3.1 (2026-09-14) =

* Fix the approval redirect by processing it before WordPress renders the admin screen.

= 1.3.0 (2026-09-14) =

* Rename the connector and its internal identifiers for Independence Hub.
* Update the REST API namespace to Independence Hub.

= 1.2.0 (2026-09-14) =

* Add a WordPress-owned login and approval flow that creates a dedicated connection credential.
* Preserve the read-only administrator analytics endpoint for Independence Hub.

= 1.0.0 (2026-09-13) =

* Add an administrator-only REST endpoint for Independent Analytics overview metrics.
* Add current-period, previous-period, and daily traffic totals.
* Document secure setup with WordPress Application Passwords.

== Affiliation ==

Independence Hub Connector is an independent third-party project. It is not affiliated with, endorsed by, or sponsored by Independent Analytics or its developers. Independent Analytics is a separate plugin; its name is used only to identify the software this connector works with.
