Skip to content
Start in Cloud

WordPress Integration

The HitKeep WordPress plugin adds privacy-first analytics to WordPress without editing your theme, using a tag manager, or adding a second analytics backend. Choose EU Cloud, US Cloud, or a self-hosted HitKeep URL, then the plugin loads the normal cookie-free hk.js tracker for that site.

The plugin is a thin WordPress adapter around HitKeep’s existing tracker:

WordPress page -> hk.js -> HitKeep /ingest and /ingest/event -> DuckDB

It does not create WordPress analytics tables, set analytics cookies, or send traffic to a third-party CDN. The configured HitKeep instance receives the same pageview and automatic event payloads as the manual snippet: outbound_click, file_download, and form_submit.

For AI visibility on a WordPress site, treat the plugin as the browser side only. It can record AI-referred human visits, but AI crawler fetches still need server-side forwarding from CloudFront, nginx, Caddy, an app server, or another log source.

HitKeep WordPress settings screen with connection mode cards, tracking coverage toggles, and a snippet preview
Settings > HitKeep keeps the instance connection, privacy defaults, automatic event coverage, and generated snippet preview in one WordPress-native screen.

Install HitKeep Analytics from WordPress.org in WordPress:

  1. Open Plugins -> Add New Plugin.
  2. Search for HitKeep Analytics.
  3. Install and activate HitKeep Analytics.
  4. Open Settings -> HitKeep.
WordPress plugins screen showing the HitKeep Analytics plugin installed and active
The plugin appears in the normal WordPress plugin list and can be activated, deactivated, or opened from the standard admin workflow.

Choose where your analytics should be sent:

  • EU Cloud: loads https://cloud.hitkeep.eu/hk.js
  • US Cloud: loads https://cloud.hitkeep.com/hk.js
  • Self-hosted or custom domain: loads hk.js from the URL you enter

Use HitKeep Cloud when you want WordPress analytics without managing TLS, upgrades, backups, SMTP, or the HitKeep data directory. Use self-hosted HitKeep when the deployment requirement is to run the single Go binary and keep the embedded DuckDB data under your own infrastructure boundary.

For self-hosted installs, enter the public HitKeep URL:

https://analytics.example.com

If HitKeep is mounted below an existing site, include the path prefix:

https://www.example.net/hitkeep

Do not include /hk.js. The plugin appends that path automatically. If you paste a URL ending in /hk.js, the plugin normalizes it back to the base URL while preserving any path prefix, so https://www.example.net/hitkeep/hk.js becomes https://www.example.net/hitkeep.

For subdirectory installs, the HitKeep instance and reverse proxy must serve hk.js, hk-vitals.js, /ingest, and /ingest/web-vitals under the same prefix. See Public URL path prefixes for the matching HitKeep server configuration.

Use Open configured HitKeep instance from the current tracker card when you want to jump from WordPress to the selected EU Cloud, US Cloud, or self-hosted HitKeep instance.

Add your WordPress domain to your HitKeep instance without a leading www.. HitKeep matches public tracker requests by the browser Origin hostname.

The plugin starts with conservative defaults:

SettingDefault
Logged-in WordPress usersNot tracked
Do Not TrackRespected
PageviewsTracked
SPA route changesTracked
Outbound link eventsTracked
File download eventsTracked
Form submit eventsTracked
Web VitalsNot tracked

Enable Track logged-in WordPress users only if you want editors, admins, or members to appear in analytics.

The WordPress settings map directly to hk.js data attributes:

WordPress settingTracker attribute
Collect when the browser sends Do Not Trackdata-collect-dnt="true"
Disable sendBeacon deliverydata-disable-beacon="true"
Disable SPA route trackingdata-disable-spa-tracking="true"
Disable outbound link eventsdata-disable-outbound-tracking="true"
Disable file download eventsdata-disable-download-tracking="true"
Disable form submit eventsdata-disable-form-tracking="true"
Enable Web Vitalsdata-enable-web-vitals="true"

Use these options when a WordPress site needs a narrower tracking surface than the default HitKeep browser tracker.

Automatic event payloads use the same privacy-safe properties as the manual snippet. HitKeep strips query strings and hashes and does not capture link text, form field values, or request bodies.

Web Vitals are opt-in. When enabled, the tracker loads same-origin hk-vitals.js and reports LCP, INP, CLS, FCP, and TTFB without attribution/debug fields.