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.
scrollFirst page scroll, once per page view.
scroll_depthEach reached milestone, once per page view: 25%, 50%, 75%, 90%, and 100%, in percent.
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.