Skip to content
Start in Cloud

Automatic Events

HitKeep’s browser tracker emits a small set of built-in events automatically after you install the default hk.js snippet:

  • outbound_click
  • file_download
  • form_submit

These events use the same hk.js -> /ingest/event -> Events page pipeline as manual custom events, so you do not need a new API, schema migration, or separate dashboard.

Tracking settings with automatic event toggles

Automatic tracking is enabled by default once you install hk.js.

The tracker captures only privacy-safe metadata:

  • outbound_click: target_host, target_path, target_protocol
  • file_download: file_host, file_path, file_ext
  • form_submit: action_host, action_path, method, same_origin, optional form_id

HitKeep strips query strings and hashes before storing these properties. The tracker does not capture link text, form field values, or request bodies.

EventCaptured propertiesExplicitly not captured
outbound_clicktarget_host, target_path, target_protocolQuery strings, hashes, link text
file_downloadfile_host, file_path, file_extQuery strings, hashes, file contents
form_submitaction_host, action_path, method, same_origin, optional form_idForm field values, request bodies

For broader runtime, privacy, and export facts, see Facts and Limits.

<script async src="https://your-hitkeep.example/hk.js"></script>

That snippet records page views plus the automatic events above.

Use the Site settings -> Tracking drawer in the dashboard, or add opt-out attributes manually:

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

Available attributes:

  • data-disable-outbound-tracking="true"
  • data-disable-download-tracking="true"
  • data-disable-form-tracking="true"

These attributes only disable the matching automatic event class. Manual window.hk.event() calls and server-side events keep working.

Existing tracker options still work the same way:

  • data-collect-dnt="true"
  • data-disable-beacon="true"
  • data-disable-spa-tracking="true"

For delivery behavior, retry handling, SPA tracking, and browser storage boundaries, see Tracker Architecture.

HitKeep applies a few precedence rules so one user action maps to one event:

  1. Manual window.hk.event(...) calls stay independent and unchanged.
  2. Elements marked with data-hk-event or data-hitkeep-event are reserved for explicit tracking and are ignored by generic auto-tracking.
  3. If a clicked link is both outbound and a download, HitKeep records outbound_click.
  4. Clicks inside forms are ignored for link auto-tracking; only the actual submit event records form_submit.

Open Events for your site and choose one of the automatic event quick picks when data is available.

You can then:

  • break the event down by its properties
  • filter the timeseries by a property value
  • inspect the audience panels for pages, sources, devices, and countries
Events page showing automatic event breakdowns

Use window.hk.event() when you need domain-specific business semantics such as:

  • product onboarding steps
  • pricing CTA variants
  • plan upgrades
  • chatbot milestones

Automatic events are best for baseline interaction coverage. Manual events are still the right tool for custom product analytics and conversion tracking.