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

Connect WordPress analytics from Independent Analytics, WP Statistics, Burst Statistics, or Koko Analytics in one private dashboard.

== Description ==

**Your WordPress analytics. One clear view.** If you manage several WordPress sites that run [Independent Analytics](https://wordpress.org/plugins/independent-analytics/), [WP Statistics](https://wordpress.org/plugins/wp-statistics/), [Burst Statistics](https://wordpress.org/plugins/burst-statistics/), or [Koko Analytics](https://wordpress.org/plugins/koko-analytics/), install Independence Hub Connector on each site to bring their reports into one private 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 reports from the analytics plugins selected during approval through a revocable, site-specific token. No WordPress password or Application Password is shared.

**In the Independence Hub dashboard**

* Compare page views, visitors, daily traffic, and sessions where tracked 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.
* Save traffic watchlist rules and rolling page-view, visitor, or session targets in the hosted Hub. Rules are checked when you open or refresh the Growth workspace. Optionally enable hourly background checks and email alerts to your verified Hub account email; email alerts are off by default.
* Record launches and campaigns in a private Hub impact journal, with seven-day before/after page-view comparisons when complete data is available within the last 90 days.

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 approved Independent Analytics, WP Statistics, Burst Statistics, and Koko Analytics data for the Independence Hub dashboard.
* Overview reporting for page views, visitors, daily totals, sessions where tracked, and comparisons with the immediately preceding period.
* Detailed reports with top pages, geographic traffic, device types, traffic sources, and bounce rate. Independent Analytics and Burst Statistics also provide sessions, new and returning sessions, and average session duration; WP Statistics shows "Not tracked by this plugin" for those session metrics. Koko Analytics Free 2.5.3 provides page views, visitors, daily traffic, top pages, and referrers; sessions, duration, bounce rate, new/returning sessions, countries, and devices are labeled "Not tracked by this plugin". Koko Pro-specific reports are not included.
* Multiple approved analytics plugins per site, with a dashboard selector to view one plugin at a time. Each site counts once toward plan limits and portfolio totals.
* Source-specific comparisons, caches, reports, and saved Growth items; switching dashboard data does not change a saved rule’s analytics plugin.
* Reporting ranges of 7, 28, 30, or 90 days.
* One connection per Hub account email, with individual analytics-plugin revocation and a revoke-all control in 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, WP Statistics, Burst Statistics, and Koko Analytics are separate analytics plugins. At least one 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 the selected analytics plugins. 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 token hashes alongside connected Hub account emails, account identifiers, approved analytics plugins, and approval dates. The connector verifies account identity with Hub over HTTPS before approval. 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, review the Hub account and plugins, and approve the connection. You’ll return to Independence Hub when it’s connected. Choose “Cancel, return to Hub” to leave without changing existing permissions.
5. Make sure a selected analytics plugin 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. Availability depends on the approved analytics plugin; Koko Free supplies page views, visitors, pages, and referrers. Unsupported reports show "Not tracked by this plugin". 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 the token hash, connected Hub account email, account identifier, approved analytics plugins, and approval date; 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. Choose Revoke beside an analytics plugin to remove only that plugin's access, or choose Revoke all access for the Hub account. Other accounts keep their access. Existing downloaded reports are not deleted. You can also remove the site from your Independence Hub account. Uninstalling the connector removes its local token hashes and account connection records; it does not delete analytics data.

= What happens if I uninstall the connector? =

Uninstalling removes the connector’s local token hashes and account connection records, preventing future requests with those tokens. It does not uninstall analytics plugins or delete their data.

= Can multiple Hub accounts connect to the same site? =

Yes. Start a connection from each Hub account and approve it in WordPress. Each Hub account email has one connection on the site; approving again reuses that account entry, updates its token, and adds any newly approved analytics plugins without removing existing access. Older connections remain active after updating, but cannot show an email until you reconnect because earlier versions did not store account identity. The settings page lets you revoke an individual analytics plugin or revoke all access for one Hub account without affecting other accounts.

= Can I use multiple analytics plugins on the same site? =

Yes. Select one or more active supported plugins during WordPress approval with Connector 1.9.0 or newer. Use the Analytics plugin selector on the Hub site card to switch reports. Manage analytics plugins on an existing site to change your selection. Traffic from different plugins on the same site is never added together. WP Statistics counts visitors by day and measures single-page daily visits for its bounce rate; definitions and totals can differ from Independent Analytics. Sessions and session-based metrics are not tracked by WP Statistics. Burst Statistics Free 3.7.4 supports page views, visitors, sessions, engagement, and page/country/device/referrer reports. Burst duration uses recorded page time per session; its new/returning split uses session first-visit flags. Its period sessions follow session-start counting, while daily session points count sessions with page views that day. Koko Analytics support requires Connector 1.11.0 and Koko Analytics 2.5.3 or newer. Koko visitors use its own recorded counts and tracking settings; totals sum the stored counts across the chosen dates. Existing connections must approve Koko through Manage analytics plugins. Koko Free does not supply session, country, or device metrics to the Hub, even if Koko Pro is installed. Saved Growth rules, targets, and journal events keep their selected plugin.

== Changelog ==

= 1.11.4 (2026-11-02) =

* Add daily comparison-period reports so Hub Average calculates percentage changes using matching daily averages.

= 1.11.3 (2026-11-02) =

* Fix WP Statistics daily availability when older historical totals exist without daily records in the requested range.

= 1.11.2 (2026-11-02) =

* Fix daily reports to return null before the first retained analytics activity while preserving zero-traffic days within recorded history.

= 1.11.1 (2026-11-02) =

* Add a clearer WordPress approval screen with account details, selectable plugin cards, and a concise access summary.
* Add a nonce-protected Cancel, return to Hub action that preserves existing analytics permissions.
* Fix empty plugin selection feedback before submitting the approval form.

= 1.11.0 (2026-11-02) =

* Add Koko Analytics Free support for page views, visitors, daily traffic, top pages, referrers, and preceding-period comparisons.
* Add source-scoped Koko approval and revocation while preserving existing sites and account connections.
* Fix translator context for approval dates and analytics-plugin revocation controls.
* Document unsupported Koko metrics and the Free 2.5.3 compatibility baseline.

= 1.10.2 (2026-11-02) =

* Refactor the settings page with native WordPress panels, concise setup guidance, and a dedicated privacy section.

= 1.10.1 (2026-11-02) =
* Improve the connector settings layout with responsive account cards and clearer revocation actions.

= 1.10.0 (2026-11-02) =

* Add one connection per Hub account email and merge plugin approvals when that account reconnects.
* Add individual analytics-plugin revocation alongside a per-account revoke-all action.

= 1.9.0 (2026-11-02) =

* Add Burst Statistics Free aggregate reports with per-token approval, sessions, engagement, top pages, countries, devices, and referrers.
* Add daily Burst charts with site-timezone calendar boundaries across daylight-saving changes.
* Document Burst metric definitions and source selection across Hub reports, Insights, and Growth tools.

= 1.8.0 (2026-11-02) =

* Add WP Statistics aggregate reports alongside Independent Analytics with per-token plugin approval.
* Add multiple analytics plugins per site and a dashboard selector with separate caches, comparisons, reports, and Growth items.
* Add explicit "Not tracked by this plugin" labels for unsupported metrics and explain differences in visitor and bounce-rate definitions.
* Document supported analytics plugins, onboarding, privacy, and source selection.
* Refactor marketing copy around one dashboard for supported WordPress analytics plugins.

= 1.7.0 (2026-10-03) =

* Add separate revocable tokens for multiple Hub accounts connected to one site.
* Add verified account emails, approval dates, and individual Disconnect controls to connector settings.
* Preserve existing tokens when updating and remove connection records during uninstall.
* Document account identity verification and locally stored connection metadata.

= 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, WP Statistics, Burst Statistics, or their developers. These are separate plugins; their names identify compatible software.
