Cookieless Event Tracking
HitKeep supports cookieless event tracking for teams that need conversion and interaction data without analytics cookies. The default hk.js tracker records pageviews, outbound clicks, file downloads, and form submissions, while window.hk.event() and the ingest API cover custom product, ecommerce, and server-side events.
<script async src="https://your-hitkeep.example/hk.js"></script>That one snippet records pageviews plus these automatic events:
outbound_clickfile_downloadform_submit
Use this path when you want more than pageview counts, but you do not want a cookie-based event stack or a tag-manager project.
What cookieless means in HitKeep
Section titled “What cookieless means in HitKeep”The public tracker does not set analytics cookies. It posts data to your HitKeep instance, uses sessionStorage for a short-lived opaque session tuple, and keeps retry, referrer, UTM, and duplicate-pageview state in JavaScript memory.
That distinction matters for privacy review:
| Claim | Current HitKeep behavior |
|---|---|
| Analytics cookies | Not set by the public tracker |
| Long-term browser storage | Not used by the public tracker |
| Session continuity | Uses sessionStorage for an opaque session ID and timestamp |
| Failed event retries | Kept in memory only, capped at 10 pending payloads |
| DNT | Respected by default unless data-collect-dnt="true" is set |
Cookie-free does not automatically mean consent-free in every jurisdiction. If PECR or ePrivacy-style rules apply to your site, review PECR and ePrivacy before deciding when to load the tracker.
Automatic event coverage
Section titled “Automatic event coverage”Automatic events are useful for baseline interaction questions:
| Question | HitKeep event |
|---|---|
| Which external domains do visitors leave for? | outbound_click |
| Which files are downloaded? | file_download |
| Which forms are submitted? | form_submit |
HitKeep strips query strings and hashes from captured URLs. It does not capture link text, form field values, or request bodies for these automatic events.
Disable any automatic event class when a site needs a narrower tracking surface:
<script async src="https://your-hitkeep.example/hk.js" data-disable-outbound-tracking="true" data-disable-download-tracking="true" data-disable-form-tracking="true"></script>For the complete tracker option list, see Tracker Architecture. For server-side ingest limits and deployment flags, see the Configuration Reference.
Custom and server-side events
Section titled “Custom and server-side events”Use browser events for page-level interactions that your application knows about:
<button onclick="window.hk?.event?.('signup_started', { plan: 'team' })"> Start trial</button>Use server-side events when the authoritative signal happens after a backend action, such as a purchase confirmation, webhook, or account upgrade. The authenticated server ingest path is documented in Server-Side Tracking and the server-side event API reference.
Common event names:
| Workflow | Suggested event names |
|---|---|
| Signup | signup_started, signup_completed |
| Lead generation | demo_requested, contact_form_submitted |
| Downloads | whitepaper_downloaded, release_downloaded |
| Ecommerce | view_item, add_to_cart, begin_checkout, purchase |
| On-site assistants | assistant.chat_started, assistant.goal_assisted |
Keep properties small and structured. Avoid sending raw form fields, prompts, access tokens, or other sensitive payloads as event properties.
For AI visibility, do not model crawler requests as browser events. Browser events can measure AI-referred human visits and on-site assistant usage. Crawler fetches should use the dedicated AI fetch ingest path.
From events to conversions
Section titled “From events to conversions”Events become conversion analytics when you connect them to reporting workflows:
| Need | HitKeep path |
|---|---|
| Count one important action | Create an event-based goal |
| Inspect drop-off across steps | Build a funnel |
| Report revenue and product activity | Send ecommerce events |
| Compare campaigns | Use UTM parameters |
| Share results | Send email reports or dashboard links |
This keeps event capture and reporting in one product. You do not need Postgres, Redis, ClickHouse, or a separate queue to add conversion tracking.
Cloud or self-hosted
Section titled “Cloud or self-hosted”Use HitKeep Cloud when you want to test cookieless event tracking on one live property without managing TLS, SMTP, backups, or updates. Use the self-hosted installation guide when the main requirement is owning the binary, data directory, and network boundary.