HitKeep Analytics

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.
  • Optional redirect click events for supported short-link, affiliate, and wp_redirect redirects through HitKeep’s server-side ingest API.
  • Settings link to the selected HitKeep instance’s API client page when redirect tracking needs a site-scoped token.
  • Self-hosted URLs may include a path prefix, such as https://www.example.net/hitkeep.
  • 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.
  • It does not print server-side ingest API tokens into public page source.

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

HitKeep Cloud privacy policy

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

Optional redirect link tracking sends server-side outbound click events from WordPress to your configured HitKeep instance when a supported redirect resolves to an external host. The current adapters support BetterLinks, PrettyLinks, ThirstyAffiliates, and other redirects that use wp_redirect. This requires a site-scoped HitKeep API client token with site.manage_data for the WordPress domain. The settings page links to the selected HitKeep instance’s API client page and the API client guide. Redirect source, referrer, and target query strings are stripped before delivery.

Source code

The main HitKeep project is available on GitHub.

Screenshots

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 or https://www.example.net/hitkeep.
  6. Save changes.

To enable redirect link tracking, turn on Track redirect links, use Create token in HitKeep to open the selected HitKeep instance’s API client page, create a site-scoped API client token with site.manage_data, paste it into WordPress, and save again. The token is stored server-side and is not printed into public page source.

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

For detailed setup guidance, see the HitKeep WordPress integration guide.

FAQ

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.

Can I use this when HitKeep is mounted under a subdirectory?

Yes. Enter the full public HitKeep URL, including the path prefix, such as https://www.example.net/hitkeep. The plugin preserves that prefix when it builds the hk.js tracker URL. Your HitKeep instance and reverse proxy must also serve hk.js, hk-vitals.js, and the ingest routes under the same prefix.

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.

Can the plugin track short-link and affiliate redirects?

Yes. Enable Track redirect links and save a site-scoped HitKeep API client token with site.manage_data in the plugin settings. Use Create token in HitKeep from the token field to open the selected HitKeep instance’s API client page. When BetterLinks, PrettyLinks, ThirstyAffiliates, or another WordPress redirect resolves a short link to an external host through wp_redirect, HitKeep records a server-side outbound_click event with the short path and resolved target host/path. Same-site redirects are ignored, and source, referrer, and affiliate target query strings are not stored by default.

Where do I get the API client token for redirect tracking?

Open Settings -> HitKeep, enable Track redirect links, and use Create token in HitKeep from the server ingest API token field. HitKeep opens the API client page for the selected EU Cloud, US Cloud, or self-hosted instance. Create a personal or team API client with site.manage_data for this WordPress site, copy the token, paste it into WordPress, and save. The token is stored server-side and is not printed into public page source.

Where can I report issues?

Use the support channels listed on hitkeep.com.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“HitKeep Analytics” is open source software. The following people have contributed to this plugin.

Contributors

“HitKeep Analytics” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “HitKeep Analytics” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.3.4

  • Add optional server-side redirect link tracking for BetterLinks, PrettyLinks, ThirstyAffiliates, and other redirects that use wp_redirect.
  • Add a server ingest API token setup flow with saved-token status, token clearing, and links to create a site-scoped HitKeep API client token with site.manage_data.
  • Store server ingest tokens outside the public tracker snippet and keep them out of rendered page source.
  • Refresh WordPress.org screenshots and documentation for the redirect tracking and API client token flow.

0.3.3

  • Preserve default-on tracker toggles when the first settings save only changes the selected HitKeep instance.
  • Store explicit off values for settings toggles so later saves keep intentional opt-outs.

0.3.2

  • Improve links to HitKeep setup, source, terms, and privacy resources.

0.3.1

  • Declare compatibility with WordPress 7.0.

0.3.0

  • Preserve self-hosted HitKeep path prefixes such as /hitkeep when generating the tracker URL.
  • Normalize pasted tracker URLs such as https://www.example.net/hitkeep/hk.js without removing the deployment prefix.
  • Document subdirectory self-hosted setup alongside the Web Vitals option.

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.