LearnConsent Signals

Consent Signals

Tell Hardal when a visitor grants tracking, and see what each signal adds on top of privacy-first analytics.

On a first visit without a consent signal or an existing identity cache, Hardal measures the session anonymously and does not write an identity cookie. You can still see traffic, channels, sessions, and session-level attribution. After consent is granted, Hardal can recognize later activity for the same tenant and source.

Call virgo.consent() when a visitor accepts or declines on your consent banner.

virgo.consent("granted");

virgo.consent("denied");

Send one call for each decision.

Use virgo.consentStatus() when you need to inspect the tracker’s current in-page state. It returns unknown, granted, or denied inside the response data.

What each signal changes

SignalWhat happens
grantedHardal can process identity fields and writes a secure first-party identity cookie for the same tenant and source.
deniedHardal keeps measuring anonymously, removes identity fields, and clears an existing identity cookie.

Until a signal arrives, Hardal measures anonymously unless a valid identity cookie from an earlier granted request exists for the same tenant and source.

Send the signal as soon as the visitor decides so the rest of the session uses their current choice.

On the banner decision

Call virgo.consent("granted") or virgo.consent("denied") in your banner's accept and decline handlers.

On a later change

If the visitor changes their choice in your preferences, send the new signal. The latest signal wins.

On return visits

If you store the visitor's choice, send it again on load so Hardal has the current state for the new session.

  • Without identity consent: Hardal can collect anonymous analytics without keeping userId or visitorId. Your consent and disclosure requirements still depend on your implementation and applicable law.
  • With granted consent: Hardal can preserve identity fields and recognize activity across requests for the same tenant and source.

For the full picture, see Consent & Privacy in the User Guide.

Send Consent on Decision

A short guide to wiring consent into your banner.