Skip to content
Start in Cloud

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_click
  • file_download
  • form_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.

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:

ClaimCurrent HitKeep behavior
Analytics cookiesNot set by the public tracker
Long-term browser storageNot used by the public tracker
Session continuityUses sessionStorage for an opaque session ID and timestamp
Failed event retriesKept in memory only, capped at 10 pending payloads
DNTRespected 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 events are useful for baseline interaction questions:

QuestionHitKeep 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.

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:

WorkflowSuggested event names
Signupsignup_started, signup_completed
Lead generationdemo_requested, contact_form_submitted
Downloadswhitepaper_downloaded, release_downloaded
Ecommerceview_item, add_to_cart, begin_checkout, purchase
On-site assistantsassistant.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.

Events become conversion analytics when you connect them to reporting workflows:

NeedHitKeep path
Count one important actionCreate an event-based goal
Inspect drop-off across stepsBuild a funnel
Report revenue and product activitySend ecommerce events
Compare campaignsUse UTM parameters
Share resultsSend 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.

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.