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 sends page views automatically. Send other interactions explicitly.

The event model

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

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

On the web, the event name you pass to virgo.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

With data-auto-track="true", the web script sends page_view when the page loads. If SPA tracking is enabled, it sends another page view after each client-side route change.