=== HitKeep Analytics ===
Contributors: pascalebeier
Donate link: https://github.com/sponsors/PascaleBeier
Tags: analytics, privacy, web analytics, cookieless, self-hosted
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 0.2.0
License: MIT
License URI: https://opensource.org/licenses/MIT

Adds the first-party HitKeep tracker to WordPress without analytics cookies, third-party CDNs, or a tag manager.

== Description ==

HitKeep Analytics connects WordPress to a self-hosted or cloud HitKeep instance. It injects the normal `hk.js` tracker from your HitKeep instance and keeps data flowing through the core HitKeep ingest pipeline.

The plugin does not add a separate analytics backend, database, queue, or third-party service. It only loads the tracker from the HitKeep instance you configure.

### Privacy-first web analytics for WordPress

HitKeep is built for teams that want useful web analytics without adopting a heavy analytics stack. The WordPress plugin keeps setup simple: choose your HitKeep instance, save the settings, and the plugin loads the first-party tracker on public pages.

Logged-in WordPress users are skipped by default, so administrators and editors do not pollute public traffic reports. Browser Do Not Track is respected by default.

### Features

* EU Cloud, US Cloud, and self-hosted HitKeep options.
* Logged-in WordPress users are skipped by default.
* Do Not Track is respected by default.
* Pageview tracking through HitKeep's normal `hk.js` tracker.
* Built-in HitKeep automatic events for outbound links, file downloads, and form submissions.
* Optional Web Vitals reporting for LCP, INP, CLS, FCP, and TTFB.
* Clear opt-outs for sendBeacon delivery, route changes, outbound links, downloads, and forms.
* Shortcut to open the configured HitKeep instance from the settings page.
* Snippet preview so site owners can see which tracker attributes will be emitted.

### What the plugin does not do

* It does not set analytics cookies.
* It does not create WordPress analytics tables.
* It does not require a tag manager.
* It does not load the tracker from a third-party CDN.
* It does not collect form field values, request bodies, link text, or URL query strings through automatic events.

### Third-party service connection

This plugin connects to HitKeep. Depending on your settings, it loads JavaScript from and sends analytics data to one of these HitKeep hosts:

* `https://cloud.hitkeep.eu`
* `https://cloud.hitkeep.com`
* Your own self-hosted HitKeep URL

HitKeep Cloud terms: https://hitkeep.com/legal/terms-of-service/

HitKeep Cloud privacy policy: https://hitkeep.com/legal/privacy-policy/

Self-hosted installations are controlled by your own HitKeep instance and infrastructure.

### Source code

The main HitKeep project is available here:

* https://github.com/PascaleBeier/hitkeep

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/hitkeep` directory, or install the plugin through the WordPress plugins screen.
2. Activate **HitKeep Analytics** from the Plugins screen.
3. Open **Settings -> HitKeep**.
4. Choose EU Cloud, US Cloud, or self-hosted.
5. For self-hosted HitKeep, enter the public URL of your HitKeep instance, such as `https://analytics.example.com`.
6. Save changes.

Add your WordPress domain to your HitKeep instance without a leading `www.`. HitKeep resolves public tracker hits from the browser `Origin` header.

== Frequently Asked Questions ==

= Do I need a HitKeep account? =

You need a HitKeep Cloud account or a self-hosted HitKeep instance.

= Does the plugin set analytics cookies? =

No. The plugin injects HitKeep's normal `hk.js` tracker. The tracker does not set analytics cookies.

= Are logged-in WordPress users tracked? =

No, not by default. Enable **Track logged-in WordPress users** in the plugin settings if you want logged-in users to load the tracker.

= Can I use this with self-hosted HitKeep? =

Yes. Select **Self-hosted or custom domain** and enter the public URL of your HitKeep instance.

= Which automatic events can HitKeep track? =

The normal HitKeep tracker can automatically track outbound links, file downloads, and form submissions. Each of those can be disabled from the WordPress settings page.

= Does automatic form tracking collect form fields? =

No. HitKeep records the form action path and method. It does not collect field values or request bodies.

= Can the plugin track Web Vitals? =

Yes. Web Vitals are off by default. Enable **Track Web Vitals** when you want HitKeep to load the same-origin vitals bundle and report compact performance samples.

= Where can I report issues? =

Use the support channels listed on hitkeep.com.

== Screenshots ==

1. HitKeep settings page with connection cards, privacy defaults, tracker coverage, and snippet preview.
2. Active HitKeep plugin row with the Settings shortcut.

== Upgrade Notice ==

= 0.2.0 =

Adds the Web Vitals switch and WordPress.org release assets.

= 0.1.0 =

Initial release of the first-party HitKeep WordPress integration.

== Changelog ==

= 0.2.0 =

* Add opt-in Web Vitals tracking from the settings page.
* Add WordPress.org release assets and localized settings strings.

= 0.1.0 =

* Initial first-party WordPress integration for HitKeep.
