Documentation
Concepts

Consent and privacy

Pending, granted, denied, and off — what each state sends, and how you switch.

You decide what FounderHQ may collect, per visitor. The web SDK starts in pending when there is no remembered choice and no explicit consent_default.

StateWhat it meansWhat it sends
pendingThe visitor has not answered yet.Determined by cookieless_mode; cookieless page measurement by default.
grantedStorage and durable identity are allowed.Everything you configured.
deniedNo storage and no durable identity are allowed.Determined by cookieless_mode; cookieless page measurement by default.
offCollection is switched off completely.Nothing.

Switching states

founderhq.consent("granted"); // after the visitor accepts
founderhq.consent("denied");  // after the visitor declines
founderhq.optOut();           // total off switch
founderhq.optIn();            // back to granted
founderhq.isOptedOut();       // true only in the off state

The choice is remembered in a first-party cookie, so it survives the next visit. identify never changes consent; call consent("granted") after your consent UI reports acceptance.

Set the starting point at init:

  • consent_default: "denied" — wait for consent before anything is stored. Use this if you show a banner.
  • opt_out_by_default: true — start in the off state.
  • respect_dnt: true — start in the off state when the browser sends Do Not Track.

Cookieless modes

Choose the behavior locally with cookieless_mode. Remote config never changes this choice.

ModePendingGrantedDenied
"off"nothingnormalnothing
"always"cookielesscookielesscookieless
"when_not_granted" (default)cookielessnormalcookieless
"on_reject"nothingnormalcookieless

optOut() is a hard off switch regardless of mode. Cookieless measurement is web only; mobile and server SDKs do not implement this mode.

A cookieless visitor sends two events and nothing else: $pageview and $pageleave. Those events carry only the shared $founderhq_cookieless sentinel, with no visitor-specific ID, session, or person properties. The property list is fixed:

  • $pathname, $referring_domain, $lib, $lib_version, $platform, and the five utm_* keys
  • on $pageleave only: $page_duration_ms, $max_scroll_percentage, $leave_reason

Cookieless traffic gives you honest page counts. It does not give you contacts, returning visitors, funnels, revenue attribution, or custom events. Those need a granted visitor.

What no SDK ever collects

No FounderHQ SDK collects advertising IDs (IDFA or GAID), the device contact list, arbitrary page text, input values, DOM snapshots, console logs, network bodies, or native view trees.

You control the rest:

  • redactUrlParams strips query parameters before they leave the page.
  • beforeSend gives you the final say on every event; return null to drop it.
  • reset() clears the identity on the device, for sign-out.

The consent choice lives on the device. A returning visitor keeps the answer they gave until they clear their browser storage.

AI agent or LLM? Read this page as markdown

On this page