ALPHA

Work in progress. Breaking changes may happen without notice.

Client Components

Built-in component matrix, defaults, stability, and custom component extension.

This page documents the OpenClientID client component model:

  • Which built-in components exist.
  • Which ones are enabled by default.
  • Which ones are stable vs unstable.
  • How to add custom components.

Default behavior

  • By default, OpenClientID includes all stable built-in components.
  • Unstable built-ins are opt-in via includeComponents or explicit components.

Composition controls:

  • components: explicit ordered built-in base list.
  • includeComponents: additional built-ins appended after base.
  • excludeComponents: built-ins removed from selection.
  • customComponents: custom collectors appended after built-ins.

Built-in component matrix

Legend:

  • 🟢 enabled by default / stable
  • 🔴 not enabled by default / unstable
  • 🟡 conditional instability
ComponentEnabled By DefaultStability
applePay🟢 Yes🟢 Stable
architecture🟢 Yes🟢 Stable
audio🟢 Yes🟢 Stable
audioBaseLatency🟢 Yes🟢 Stable
canvas🟢 Yes🟢 Stable
clipboard🟢 Yes🟢 Stable
colorDepth🟢 Yes🟢 Stable
colorGamut🟢 Yes🟢 Stable
contrast🟢 Yes🟢 Stable
cookiesEnabled🟢 Yes🟢 Stable
cpuClass🟢 Yes🟢 Stable
dateTimeLocale🟢 Yes🟢 Stable
deviceMemory🟢 Yes🟢 Stable
domBlockers🟢 Yes🟢 Stable
domRect🔴 No🔴 Unstable
fontPreferences🟢 Yes🟢 Stable
fonts🟢 Yes🟢 Stable
forcedColors🟢 Yes🟢 Stable
hardware🟢 Yes🟢 Stable
hardwareConcurrency🟢 Yes🟢 Stable
hdr🟢 Yes🟢 Stable
indexedDB🟢 Yes🟢 Stable
intl🟢 Yes🟢 Stable
invertedColors🟢 Yes🟢 Stable
languages🔴 No🔴 Unstable
localStorage🟢 Yes🟢 Stable
math🟢 Yes🟢 Stable
mathml🟢 Yes🟢 Stable
media🟢 Yes🟢 Stable
monochrome🟢 Yes🟢 Stable
networkInformation🔴 No🟡 Conditional (unstable when supported)
openDatabase🟢 Yes🟢 Stable
osCpu🟢 Yes🟢 Stable
pdfViewerEnabled🟢 Yes🟢 Stable
permissions🟢 Yes🟢 Stable
platform🟢 Yes🟢 Stable
plugins🟢 Yes🟢 Stable
privateClickMeasurement🟢 Yes🟢 Stable
reducedMotion🟢 Yes🟢 Stable
reducedTransparency🟢 Yes🟢 Stable
screen🟢 Yes🟢 Stable
screenFrame🟢 Yes🟢 Stable
sensors🟢 Yes🟢 Stable
sessionStorage🟢 Yes🟢 Stable
speech🟢 Yes🟢 Stable
svg🟢 Yes🟢 Stable
system🟢 Yes🟢 Stable
timezone🟢 Yes🟢 Stable
touchSupport🟢 Yes🟢 Stable
userAgent🔴 No🔴 Unstable
vendor🟢 Yes🟢 Stable
vendorFlavors🟢 Yes🟢 Stable
webGlBasics🟢 Yes🟢 Stable
webGlExtensions🟢 Yes🟢 Stable
webgl🟢 Yes🟢 Stable
webrtc🟢 Yes🟢 Stable

Adding custom components

Use customComponents in getFingerprint:

import { getFingerprint } from "openclientid";

const result = await getFingerprint({
	customComponents: [
		{
			id: "tenantTier",
			code: "ten",
			version: 1,
			kind: "h",
			getData: async () => ({ tier: "pro", region: "us-east-1" }),
		},
	],
});

Custom component fields

  • id (required): unique string id. Must not match any built-in component id.
  • code (required): exactly 3 lowercase alphanumeric characters.
  • version (optional): integer 0..99 (default 1).
  • kind (optional): one of h, b, e, n (default h).
  • unstable (optional): if true, custom part is placed in unstable segment.
  • getData (required): sync/async collector that returns raw value.
  • getPayload (optional): payload builder for non-h kinds.

Deterministic custom payload example

import { getFingerprint } from "openclientid";

const result = await getFingerprint({
	customComponents: [
		{
			id: "cookieBannerSeen",
			code: "cbs",
			version: 1,
			kind: "b",
			getData: () => ({ seen: true }),
			getPayload: ({ value }) =>
				(value as { seen?: boolean }).seen === true ? "1" : "0",
		},
	],
});

Rules:

  • For kind: "h", payload is the component hash automatically.
  • For kind: "b" | "e" | "n", set getPayload to return your compact deterministic payload.
  • Payload may contain only letters, numbers, and _.