Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/api/admin/endpoints/sites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type SiteResponse = {
saltUserIds: boolean;
blockBots: boolean;
firstPartyProxy?: boolean;
persistentClientIds?: boolean;
isOwner: boolean;
// Analytics features
sessionReplay?: boolean;
Expand Down Expand Up @@ -148,6 +149,7 @@ export function updateSiteConfig(
saltUserIds?: boolean;
blockBots?: boolean;
firstPartyProxy?: boolean;
persistentClientIds?: boolean;
excludedIPs?: string[];
excludedCountries?: string[];
excludedPaths?: string[];
Expand Down
20 changes: 19 additions & 1 deletion client/src/components/SiteSettings/GeneralTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export function GeneralTab({ siteMetadata, disabled = false, onClose, onPublicCh
saltUserIds: siteMetadata.saltUserIds || false,
blockBots: siteMetadata.blockBots || false,
firstPartyProxy: siteMetadata.firstPartyProxy || false,
persistentClientIds: siteMetadata.persistentClientIds || false,
trackIp: siteMetadata.trackIp ?? false,
});

Expand Down Expand Up @@ -206,9 +207,12 @@ export function GeneralTab({ siteMetadata, disabled = false, onClose, onPublicCh
{
id: "saltUserIds",
label: t("User ID Salting"),
description: t("User IDs will be salted with a daily rotating key for enhanced privacy"),
description: toggleStates.persistentClientIds
? t("Disable Persistent Client IDs first — the two settings are mutually exclusive.")
: t("User IDs will be salted with a daily rotating key for enhanced privacy"),
value: toggleStates.saltUserIds,
key: "saltUserIds",
disabled: toggleStates.persistentClientIds,
enabledMessage: t("User ID salting enabled"),
disabledMessage: t("User ID salting disabled"),
},
Expand All @@ -232,6 +236,20 @@ export function GeneralTab({ siteMetadata, disabled = false, onClose, onPublicCh
enabledMessage: t("First-party proxy mode enabled"),
disabledMessage: t("First-party proxy mode disabled"),
},
{
id: "persistentClientIds",
label: t("Persistent Client IDs"),
description: toggleStates.saltUserIds
? t("Disable User ID Salting first — the two settings are mutually exclusive.")
: t(
"Store a persistent identifier in the visitor's browser for more accurate user identification than the cookieless IP+UA fingerprint. This requires your own consent banner, since it stores an identifier on the visitor's device."
),
value: toggleStates.persistentClientIds,
key: "persistentClientIds",
disabled: toggleStates.saltUserIds,
enabledMessage: t("Persistent client IDs enabled"),
disabledMessage: t("Persistent client IDs disabled"),
},
{
id: "trackIp",
label: t("Track IP Address"),
Expand Down
1 change: 1 addition & 0 deletions server/drizzle/0013_dizzy_celestials.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "sites" ADD COLUMN "persistent_client_ids" boolean DEFAULT false;
Loading
Loading