EventsOverview

Events Overview

How events work in Hardal: the event model, standard vs custom events, identify, and consent.

How events work

Events tell Hardal what happens on your site or app. The web script automatically collects page views, page scrolling, scroll-depth milestones, and outbound link clicks. Send business events such as purchases and form submissions explicitly.

The event model

Every event has a name and a set of parameters. On the web, send events with hrd.track(). From mobile or your backend, POST the same information to /collect.

<script>
hrd.track("purchase", {
  transaction_id: "ORD-20260615-7891",
  value: 214.98,
  currency: "USD"
});
</script>

On the web, the event name you pass to hrd.track() maps to eventName in the API. Its parameters map to payload.data.

In Google Tag Manager, use the same call in a Custom HTML tag after the tracker has loaded.

Choose an event guide

Collected automatically

The web script collects these events when data-auto-track is enabled (the default):

EventWhat it records
page_viewInitial page load; SPA route changes also produce page views when data-spa is enabled.
scrollEach reached milestone, once per page view, with percent of 25, 50, 75, 90, or 100. Scrolling below 25% sends no event.
outbound_clickExternal HTTP(S) link activations, with linkUrl and linkDomain. Internal links are excluded.

Automatic collection requires the Web Setup with the Hardal tracker installed and automatic tracking enabled. An API-only integration does not automatically track page views, scrolls, scroll depth, or outbound clicks; your implementation must send these events explicitly.

With the web tracker installed, no extra event tags are needed for these interactions.

Automatic interaction events appear in Engagement → Events. They contribute to engaged sessions when included in the shared Key Events selection. See Choose Key Events.

From an event plan to a report

Start with Plan Your Events to choose consistent triggers and fields. Use Engagement → Events to verify occurrences, choose Key Events for engagement, and configure Acquisition → Conversion Events for attribution. These selections have different purposes.

For a complete non-commerce example, follow Measure Lead Generation.

Earlier web tracker versions can send scroll_depth. Existing scroll-depth data remains available in reports.