🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add new translation keys for autocapture events and update existing translations
Bill Yangafb8b34f264c
diff --git a/client/messages/cs.json b/client/messages/cs.jsonindex 82d46c17b..ac9dbcef7 100644--- a/client/messages/cs.json+++ b/client/messages/cs.json@@ -649,9 +649,18 @@"Aujn2T": "Počet","ogKEiU": "Odchozí odkazy","VLKK35": "Kliknutí",+ "E2rh1p": "Tlačítka",+ "JaJoAk": "Text tlačítka",+ "wU7PzI": "Naposledy kliknuto",+ "yGsZm0": "Formuláře",+ "d6avGo": "Odeslání",+ "J+At6e": "Naposledy odesláno",+ "eHclX+": "Odeslání formulářů",+ "y3qXTf": "Kopie",+ "UgH9Vn": "Zkopírovaný text",+ "LovNd5": "Naposledy zkopírováno","6kvpmt": "Filtrovat {count} odkazů...","pEc/5k": "Kliknutí %",- "wU7PzI": "Naposledy kliknuto","4KEfRY": "Titulky","gvOzOl": "Název stránky","87ZCAe": "Vstupy",@@ -785,13 +794,35 @@"wGciYE": "Min. událostí","nxIEYS": "Min. délka (s)","Ykj7Gg": "{count} relací dne {day}",+ "+zImMB": "",+ "ZXuaOL": "",+ "mJbA00": "",+ "L44v6R": "",+ "26hmQc": "",+ "FiIWox": "",+ "fQsGgo": "",+ "g4dAtI": "",+ "J6C2uX": "",+ "HAlOn1": "Jméno",+ "sy+pv5": "E-mail",+ "YI/JAh": "",+ "izvHMl": "",+ "qyJtWy": "Zobrazit méně",+ "/zFGgP": "+{count} dalších",+ "qGb+T3": "Lokality","10Mcdg": "Průměrná délka","xf+V9Z": "Poprvé viděn","frN4vy": "Naposledy viděn",+ "HGdcSX": "Akvizice",+ "3vvIQA": "Vstupní stránka",+ "JIbDU1": "Poslední kanál","VqI0Nz": "Poloha a zařízení","IJ3j5z": "Kalendář aktivity","1bNJRY": "Vlastnosti uživatele",+ "34g6zC": "Upravit vlastnosti",+ "cxFnnE": "","eGIKNJ": "Nejnavštěvovanější stránky",+ "11UMlL": "Místní čas","41XJFz": "Žádné vlastnosti nenalezeny","Vfm+Ul": "Vlastnosti se zde zobrazí, jakmile","cDqj91": "identifikuješ uživatele",@@ -804,8 +835,6 @@"H1TwHY": "Nepodařilo se načíst uživatele","FQMQOJ": "Při načítání uživatelů nastal problém. Zkus to prosím později.","JCIgkj": "Uživatelské jméno",- "HAlOn1": "Jméno",- "sy+pv5": "E-mail","bLT8zd": "Hledat podle {field}...","8DuSnR": "ID uživatele","PE3u2y": "Vlastnosti",@@ -1288,6 +1317,14 @@"W5IIP8": "Upgraduj na {planName} pro odemknutí {message}","4Y+tpi": "Podívej se na ukázku této funkce","RL7HbL": "Požádej vlastníka organizace o upgrade na Pro pro odemknutí {message}",+ "l7blVT": "",+ "PT9pg+": "",+ "WeoAO7": "",+ "iJMNSQ": "",+ "DL8gYz": "",+ "yxDujp": "",+ "PZOOdj": "",+ "jvo0vs": "Uložit","jsy7pk": "Zkusit znovu","hyfdry": "Zobrazení stránky","TH+8LD": "Změna vstupu",@@ -1307,6 +1344,7 @@"E9m5xj": "Identifikovaný uživatel","DWxa2O": "+{count} dalších vlastností","OFEa0m": "Žádné vlastnosti nenastaveny",+ "zD9VOD": "Kliknutím upravíte vlastnosti","AB3gDL": "Žádná organizace","KMWpiw": "Pro přidání webu musíš vytvořit organizaci nebo být do ní přidán.","YgZGCW": "Vytvořit organizaci",@@ -1326,7 +1364,6 @@"6t5GFw": "/měsíc","U2stty": "ročně fakturováno za ${annualPrice}","jssBN0": "měsíční fakturace",- "qyJtWy": "Zobrazit méně","P3H0J/": "Zobrazit více ({count} dalších)","T7eyOH": "Relace zahájena","+RUaAj": "Navigováno",@@ -1589,7 +1626,6 @@"ACKiA3": "Zatím žádné štítky","B1SDE1": "Napiš nový štítek...","wXpKtu": "Existující štítky:",- "jvo0vs": "Uložit","DoskyC": "Všechny týmy","t6nrnE": "Bez týmu","mHABbN": "Využití za {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "","IQ5tZg": "","+B+qvw": "",- "vDpLV2": "",- "E2rh1p": "Tlačítka",- "yGsZm0": "Formuláře",- "y3qXTf": "Kopie",- "eHclX+": "Odeslání formulářů",- "d6avGo": "Odeslání",- "JaJoAk": "Text tlačítka",- "UgH9Vn": "Zkopírovaný text",- "J+At6e": "Naposledy odesláno",- "LovNd5": "Naposledy zkopírováno"+ "vDpLV2": ""}diff --git a/client/messages/de.json b/client/messages/de.jsonindex 971e83a33..4fc2eee8b 100644--- a/client/messages/de.json+++ b/client/messages/de.json@@ -649,9 +649,18 @@"Aujn2T": "Anzahl","ogKEiU": "Ausgehende Links","VLKK35": "Klicks",+ "E2rh1p": "Buttons",+ "JaJoAk": "Button-Text",+ "wU7PzI": "Zuletzt geklickt",+ "yGsZm0": "Formulare",+ "d6avGo": "Übermittlungen",+ "J+At6e": "Zuletzt übermittelt",+ "eHclX+": "Formular-Übermittlungen",+ "y3qXTf": "Kopien",+ "UgH9Vn": "Kopierter Text",+ "LovNd5": "Zuletzt kopiert","6kvpmt": "{count} Links filtern...","pEc/5k": "Klick %",- "wU7PzI": "Zuletzt geklickt","4KEfRY": "Titel","gvOzOl": "Seitentitel","87ZCAe": "Einstiege",@@ -785,13 +794,35 @@"wGciYE": "Min. Events","nxIEYS": "Min. Dauer (s)","Ykj7Gg": "{count} Sitzungen am {day}",+ "+zImMB": "Benutzer gelöscht",+ "ZXuaOL": "Benutzer konnte nicht gelöscht werden",+ "mJbA00": "Benutzer löschen",+ "L44v6R": "Dadurch werden alle Analysedaten dieses Benutzers dauerhaft gelöscht, einschließlich Ereignissen, Sitzungen, Sitzungsaufzeichnungen und Merkmalen auf allen verknüpften Geräten. Diese Aktion kann nicht rückgängig gemacht werden.",+ "26hmQc": "Benutzer identifiziert",+ "FiIWox": "Benutzer konnte nicht identifiziert werden",+ "fQsGgo": "Benutzer identifizieren",+ "g4dAtI": "Weisen Sie diesem Besucher eine Benutzer-ID zu. Seine bisherige Aktivität von diesem Gerät wird damit verknüpft.",+ "J6C2uX": "Die ID, die diese Person in Ihrem eigenen System hat, z. B. eine E-Mail oder Konto-ID.",+ "HAlOn1": "Name",+ "sy+pv5": "E-Mail",+ "YI/JAh": "Wird identifiziert...",+ "izvHMl": "Identifizieren",+ "qyJtWy": "Weniger anzeigen",+ "/zFGgP": "+{count} weitere",+ "qGb+T3": "Standorte","10Mcdg": "Durchschn. Dauer","xf+V9Z": "Zuerst gesehen","frN4vy": "Zuletzt gesehen",+ "HGdcSX": "Akquisition",+ "3vvIQA": "Landingpage",+ "JIbDU1": "Letzter Kanal","VqI0Nz": "Standort & Gerät","IJ3j5z": "Aktivitätskalender","1bNJRY": "Benutzermerkmale",+ "34g6zC": "Merkmale bearbeiten",+ "cxFnnE": "Noch keine Merkmale","eGIKNJ": "Top-Seiten",+ "11UMlL": "Ortszeit","41XJFz": "Keine Merkmale gefunden","Vfm+Ul": "Merkmale werden hier angezeigt, sobald Sie","cDqj91": "Benutzer identifizieren",@@ -804,8 +835,6 @@"H1TwHY": "Benutzer konnten nicht geladen werden","FQMQOJ": "Beim Abrufen der Benutzer ist ein Problem aufgetreten. Bitte versuchen Sie es später erneut.","JCIgkj": "Benutzername",- "HAlOn1": "Name",- "sy+pv5": "E-Mail","bLT8zd": "Nach {field} suchen...","8DuSnR": "Benutzer-ID","PE3u2y": "Merkmale",@@ -1288,6 +1317,14 @@"W5IIP8": "Upgrade auf {planName}, um {message} freizuschalten","4Y+tpi": "Demo dieser Funktion ansehen","RL7HbL": "Bitten Sie Ihren Organisationsinhaber, auf Pro upzugraden, um {message} freizuschalten",+ "l7blVT": "Merkmale aktualisiert",+ "PT9pg+": "Merkmale konnten nicht aktualisiert werden",+ "WeoAO7": "Fügen Sie Merkmale dieses Benutzers hinzu, bearbeiten oder entfernen Sie sie.",+ "iJMNSQ": "Felder",+ "DL8gYz": "Merkmal entfernen",+ "yxDujp": "Merkmal hinzufügen",+ "PZOOdj": "Geben Sie ein gültiges JSON-Objekt ein",+ "jvo0vs": "Speichern","jsy7pk": "Erneut versuchen","hyfdry": "Seitenaufruf","TH+8LD": "Eingabeänderung",@@ -1307,6 +1344,7 @@"E9m5xj": "Identifizierter Benutzer","DWxa2O": "+{count} weitere Merkmale","OFEa0m": "Keine Merkmale gesetzt",+ "zD9VOD": "Klicken, um Merkmale zu bearbeiten","AB3gDL": "Keine Organisation","KMWpiw": "Sie müssen eine Organisation erstellen oder einer beitreten, bevor Sie eine Website hinzufügen können.","YgZGCW": "Organisation erstellen",@@ -1326,7 +1364,6 @@"6t5GFw": "/Monat","U2stty": "jährlich abgerechnet bei {annualPrice} $","jssBN0": "monatlich abgerechnet",- "qyJtWy": "Weniger anzeigen","P3H0J/": "Mehr anzeigen ({count} weitere)","T7eyOH": "Sitzung gestartet","+RUaAj": "Navigiert",@@ -1589,7 +1626,6 @@"ACKiA3": "Noch keine Tags hinzugefügt","B1SDE1": "Neuen Tag eingeben...","wXpKtu": "Vorhandene Tags:",- "jvo0vs": "Speichern","DoskyC": "Alle Teams","t6nrnE": "Kein Team","mHABbN": "{period}-Nutzung",@@ -1603,14 +1639,5 @@"QOaR8l": "Formular an \"{action}\" gesendet","IQ5tZg": "Formular abgesendet","+B+qvw": "{type}eingabefeld \"{name}\" geändert",- "vDpLV2": "{type}eingabefeld geändert",- "E2rh1p": "Buttons",- "yGsZm0": "Formulare",- "y3qXTf": "Kopien",- "eHclX+": "Formular-Übermittlungen",- "d6avGo": "Übermittlungen",- "JaJoAk": "Button-Text",- "UgH9Vn": "Kopierter Text",- "J+At6e": "Zuletzt übermittelt",- "LovNd5": "Zuletzt kopiert"+ "vDpLV2": "{type}eingabefeld geändert"}diff --git a/client/messages/en.json b/client/messages/en.jsonindex caa67ce03..59a7405f7 100644--- a/client/messages/en.json+++ b/client/messages/en.json@@ -649,9 +649,18 @@"Aujn2T": "Count","ogKEiU": "Outbound Links","VLKK35": "Clicks",+ "E2rh1p": "Buttons",+ "JaJoAk": "Button Text",+ "wU7PzI": "Last Clicked",+ "yGsZm0": "Forms",+ "d6avGo": "Submissions",+ "J+At6e": "Last Submitted",+ "eHclX+": "Form Submissions",+ "y3qXTf": "Copies",+ "UgH9Vn": "Copied Text",+ "LovNd5": "Last Copied","6kvpmt": "Filter {count} links...","pEc/5k": "Click %",- "wU7PzI": "Last Clicked","4KEfRY": "Titles","gvOzOl": "Page Title","87ZCAe": "Entries",@@ -785,13 +794,35 @@"wGciYE": "Min events","nxIEYS": "Min duration (s)","Ykj7Gg": "{count} sessions on {day}",+ "+zImMB": "User deleted",+ "ZXuaOL": "Failed to delete user",+ "mJbA00": "Delete User",+ "L44v6R": "This permanently deletes all analytics data for this user, including events, sessions, session replays, and traits across all linked devices. This action cannot be undone.",+ "26hmQc": "User identified",+ "FiIWox": "Failed to identify user",+ "fQsGgo": "Identify User",+ "g4dAtI": "Assign a user ID to this visitor. Their past activity from this device will be linked to it.",+ "J6C2uX": "The ID this person has in your own system, like an email or account ID.",+ "HAlOn1": "Name",+ "sy+pv5": "Email",+ "YI/JAh": "Identifying...",+ "izvHMl": "Identify",+ "qyJtWy": "Show less",+ "/zFGgP": "+{count} more",+ "qGb+T3": "Locations","10Mcdg": "Avg Duration","xf+V9Z": "First Seen","frN4vy": "Last Seen",+ "HGdcSX": "Acquisition",+ "3vvIQA": "Landing page",+ "JIbDU1": "Latest channel","VqI0Nz": "Location & Device","IJ3j5z": "Activity Calendar","1bNJRY": "User Traits",+ "34g6zC": "Edit Traits",+ "cxFnnE": "No traits yet","eGIKNJ": "Top Pages",+ "11UMlL": "Local time","41XJFz": "No traits found","Vfm+Ul": "Traits will appear here once you","cDqj91": "identify users",@@ -804,8 +835,6 @@"H1TwHY": "Failed to load users","FQMQOJ": "There was a problem fetching the users. Please try again later.","JCIgkj": "Username",- "HAlOn1": "Name",- "sy+pv5": "Email","bLT8zd": "Search by {field}...","8DuSnR": "user ID","PE3u2y": "Traits",@@ -1288,6 +1317,14 @@"W5IIP8": "Upgrade to {planName} to unlock {message}","4Y+tpi": "See a demo of this feature","RL7HbL": "Ask your organization owner to upgrade to Pro to unlock {message}",+ "l7blVT": "Traits updated",+ "PT9pg+": "Failed to update traits",+ "WeoAO7": "Add, edit, or remove attributes attached to this user.",+ "iJMNSQ": "Fields",+ "DL8gYz": "Remove trait",+ "yxDujp": "Add trait",+ "PZOOdj": "Enter a valid JSON object",+ "jvo0vs": "Save","jsy7pk": "Try Again","hyfdry": "Pageview","TH+8LD": "Input Change",@@ -1307,6 +1344,7 @@"E9m5xj": "Identified User","DWxa2O": "+{count} more traits","OFEa0m": "No traits set",+ "zD9VOD": "Click to edit traits","AB3gDL": "No Organization","KMWpiw": "You need to create or be added to an organization before you can add a website.","YgZGCW": "Create an Organization",@@ -1326,7 +1364,6 @@"6t5GFw": "/month","U2stty": "billed annually at ${annualPrice}","jssBN0": "billed monthly",- "qyJtWy": "Show less","P3H0J/": "Show more ({count} more)","T7eyOH": "Session started","+RUaAj": "Navigated",@@ -1589,7 +1626,6 @@"ACKiA3": "No tags added yet","B1SDE1": "Type a new tag...","wXpKtu": "Existing tags:",- "jvo0vs": "Save","DoskyC": "All Teams","t6nrnE": "No Team","mHABbN": "{period} Usage",@@ -1603,14 +1639,5 @@"QOaR8l": "Submitted form to \"{action}\"","IQ5tZg": "Submitted form","+B+qvw": "Changed {type}input \"{name}\"",- "vDpLV2": "Changed {type}input",- "E2rh1p": "Buttons",- "yGsZm0": "Forms",- "y3qXTf": "Copies",- "eHclX+": "Form Submissions",- "d6avGo": "Submissions",- "JaJoAk": "Button Text",- "UgH9Vn": "Copied Text",- "J+At6e": "Last Submitted",- "LovNd5": "Last Copied"+ "vDpLV2": "Changed {type}input"}diff --git a/client/messages/es.json b/client/messages/es.jsonindex e0e3396b6..700212324 100644--- a/client/messages/es.json+++ b/client/messages/es.json@@ -649,9 +649,18 @@"Aujn2T": "Recuento","ogKEiU": "Enlaces salientes","VLKK35": "Clics",+ "E2rh1p": "Botones",+ "JaJoAk": "Texto del botón",+ "wU7PzI": "Último clic",+ "yGsZm0": "Formularios",+ "d6avGo": "Envíos",+ "J+At6e": "Último envío",+ "eHclX+": "Envíos de Formularios",+ "y3qXTf": "Copias",+ "UgH9Vn": "Texto copiado",+ "LovNd5": "Última copia","6kvpmt": "Filtrar {count} enlaces...","pEc/5k": "% Clic",- "wU7PzI": "Último clic","4KEfRY": "Títulos","gvOzOl": "Título de la página","87ZCAe": "Entradas",@@ -785,13 +794,35 @@"wGciYE": "Eventos mínimos","nxIEYS": "Duración mínima (s)","Ykj7Gg": "{count} sesiones el {day}",+ "+zImMB": "Usuario eliminado",+ "ZXuaOL": "No se pudo eliminar al usuario",+ "mJbA00": "Eliminar usuario",+ "L44v6R": "Esto elimina permanentemente todos los datos analíticos de este usuario, incluidos eventos, sesiones, grabaciones de sesión y rasgos en todos los dispositivos vinculados. Esta acción no se puede deshacer.",+ "26hmQc": "Usuario identificado",+ "FiIWox": "No se pudo identificar al usuario",+ "fQsGgo": "Identificar usuario",+ "g4dAtI": "Asigna un ID de usuario a este visitante. Su actividad anterior desde este dispositivo quedará vinculada a él.",+ "J6C2uX": "El ID de esta persona en tu propio sistema, como un correo electrónico o un ID de cuenta.",+ "HAlOn1": "Nombre",+ "sy+pv5": "Correo electrónico",+ "YI/JAh": "Identificando...",+ "izvHMl": "Identificar",+ "qyJtWy": "Mostrar menos",+ "/zFGgP": "+{count} más",+ "qGb+T3": "Ubicaciones","10Mcdg": "Duración promedio","xf+V9Z": "Visto por primera vez","frN4vy": "Visto por última vez",+ "HGdcSX": "Adquisición",+ "3vvIQA": "Página de destino",+ "JIbDU1": "Último canal","VqI0Nz": "Ubicación y Dispositivo","IJ3j5z": "Calendario de actividad","1bNJRY": "Rasgos de usuario",+ "34g6zC": "Editar rasgos",+ "cxFnnE": "Aún no hay rasgos","eGIKNJ": "Páginas principales",+ "11UMlL": "Hora local","41XJFz": "No se encontraron rasgos","Vfm+Ul": "Los rasgos aparecerán aquí una vez que","cDqj91": "identifiques usuarios",@@ -804,8 +835,6 @@"H1TwHY": "Error al cargar usuarios","FQMQOJ": "Hubo un problema al obtener los usuarios. Inténtalo de nuevo más tarde.","JCIgkj": "Nombre de usuario",- "HAlOn1": "Nombre",- "sy+pv5": "Correo electrónico","bLT8zd": "Buscar por {field}...","8DuSnR": "ID de usuario","PE3u2y": "Rasgos",@@ -1288,6 +1317,14 @@"W5IIP8": "Actualiza a {planName} para desbloquear {message}","4Y+tpi": "Ver una demostración de esta función","RL7HbL": "Pide al propietario de tu organización que actualice a Pro para desbloquear {message}",+ "l7blVT": "Rasgos actualizados",+ "PT9pg+": "No se pudieron actualizar los rasgos",+ "WeoAO7": "Añade, edita o elimina los rasgos asociados a este usuario.",+ "iJMNSQ": "Campos",+ "DL8gYz": "Eliminar rasgo",+ "yxDujp": "Añadir rasgo",+ "PZOOdj": "Introduce un objeto JSON válido",+ "jvo0vs": "Guardar","jsy7pk": "Intentar de nuevo","hyfdry": "Vista de página","TH+8LD": "Cambio de entrada",@@ -1307,6 +1344,7 @@"E9m5xj": "Usuario identificado","DWxa2O": "+{count} rasgos más","OFEa0m": "No se establecieron rasgos",+ "zD9VOD": "Haz clic para editar los rasgos","AB3gDL": "Sin organización","KMWpiw": "Necesitas crear o ser añadido a una organización antes de poder añadir un sitio web.","YgZGCW": "Crear una organización",@@ -1326,7 +1364,6 @@"6t5GFw": "/mes","U2stty": "facturado anualmente a ${annualPrice}","jssBN0": "facturado mensualmente",- "qyJtWy": "Mostrar menos","P3H0J/": "Mostrar más ({count} más)","T7eyOH": "Sesión iniciada","+RUaAj": "Navegó",@@ -1589,7 +1626,6 @@"ACKiA3": "No se han añadido etiquetas todavía","B1SDE1": "Escribe una nueva etiqueta...","wXpKtu": "Etiquetas existentes:",- "jvo0vs": "Guardar","DoskyC": "Todos los equipos","t6nrnE": "Sin equipo","mHABbN": "Uso del {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "Formulario enviado a \"{action}\"","IQ5tZg": "Formulario enviado","+B+qvw": "{type}campo de entrada \"{name}\" cambiado",- "vDpLV2": "{type}campo de entrada cambiado",- "E2rh1p": "Botones",- "yGsZm0": "Formularios",- "y3qXTf": "Copias",- "eHclX+": "Envíos de Formularios",- "d6avGo": "Envíos",- "JaJoAk": "Texto del botón",- "UgH9Vn": "Texto copiado",- "J+At6e": "Último envío",- "LovNd5": "Última copia"+ "vDpLV2": "{type}campo de entrada cambiado"}diff --git a/client/messages/fr.json b/client/messages/fr.jsonindex 4b145a912..aaa9a62c0 100644--- a/client/messages/fr.json+++ b/client/messages/fr.json@@ -649,9 +649,18 @@"Aujn2T": "Nombre","ogKEiU": "Liens sortants","VLKK35": "Clics",+ "E2rh1p": "Boutons",+ "JaJoAk": "Texte du bouton",+ "wU7PzI": "Dernier clic",+ "yGsZm0": "Formulaires",+ "d6avGo": "Soumissions",+ "J+At6e": "Dernière soumission",+ "eHclX+": "Soumissions de formulaires",+ "y3qXTf": "Copies",+ "UgH9Vn": "Texte copié",+ "LovNd5": "Dernière copie","6kvpmt": "Filtrer {count} liens...","pEc/5k": "Clic %",- "wU7PzI": "Dernier clic","4KEfRY": "Titres","gvOzOl": "Titre de la page","87ZCAe": "Entrées",@@ -785,13 +794,35 @@"wGciYE": "Min. événements","nxIEYS": "Min. durée (s)","Ykj7Gg": "{count} sessions le {day}",+ "+zImMB": "Utilisateur supprimé",+ "ZXuaOL": "Échec de la suppression de l'utilisateur",+ "mJbA00": "Supprimer l'utilisateur",+ "L44v6R": "Cette action supprime définitivement toutes les données analytiques de cet utilisateur, y compris les événements, les sessions, les enregistrements de session et les attributs sur tous les appareils associés. Cette action est irréversible.",+ "26hmQc": "Utilisateur identifié",+ "FiIWox": "Échec de l'identification de l'utilisateur",+ "fQsGgo": "Identifier l'utilisateur",+ "g4dAtI": "Attribuez un identifiant utilisateur à ce visiteur. Son activité passée depuis cet appareil y sera associée.",+ "J6C2uX": "L'identifiant de cette personne dans votre propre système, comme un e-mail ou un ID de compte.",+ "HAlOn1": "Nom",+ "sy+pv5": "E-mail",+ "YI/JAh": "Identification...",+ "izvHMl": "Identifier",+ "qyJtWy": "Voir moins",+ "/zFGgP": "+{count} de plus",+ "qGb+T3": "Lieux","10Mcdg": "Durée moy.","xf+V9Z": "Première visite","frN4vy": "Dernière visite",+ "HGdcSX": "Acquisition",+ "3vvIQA": "Page de destination",+ "JIbDU1": "Dernier canal","VqI0Nz": "Emplacement et appareil","IJ3j5z": "Calendrier d'activité","1bNJRY": "Attributs utilisateur",+ "34g6zC": "Modifier les attributs",+ "cxFnnE": "Aucun attribut pour le moment","eGIKNJ": "Pages principales",+ "11UMlL": "Heure locale","41XJFz": "Aucun attribut trouvé","Vfm+Ul": "Les attributs apparaîtront ici une fois que vous aurez","cDqj91": "identifié les utilisateurs",@@ -804,8 +835,6 @@"H1TwHY": "Échec du chargement des utilisateurs","FQMQOJ": "Un problème est survenu lors de la récupération des utilisateurs. Veuillez réessayer plus tard.","JCIgkj": "Nom d'utilisateur",- "HAlOn1": "Nom",- "sy+pv5": "E-mail","bLT8zd": "Rechercher par {field}...","8DuSnR": "ID utilisateur","PE3u2y": "Attributs",@@ -1288,6 +1317,14 @@"W5IIP8": "Passez à {planName} pour débloquer {message}","4Y+tpi": "Voir une démo de cette fonctionnalité","RL7HbL": "Demandez au propriétaire de votre organisation de passer à Pro pour débloquer {message}",+ "l7blVT": "Attributs mis à jour",+ "PT9pg+": "Échec de la mise à jour des attributs",+ "WeoAO7": "Ajoutez, modifiez ou supprimez les attributs associés à cet utilisateur.",+ "iJMNSQ": "Champs",+ "DL8gYz": "Supprimer l'attribut",+ "yxDujp": "Ajouter un attribut",+ "PZOOdj": "Saisissez un objet JSON valide",+ "jvo0vs": "Enregistrer","jsy7pk": "Réessayer","hyfdry": "Page vue","TH+8LD": "Changement de saisie",@@ -1307,6 +1344,7 @@"E9m5xj": "Utilisateur identifié","DWxa2O": "+{count} attributs supplémentaires","OFEa0m": "Aucun attribut défini",+ "zD9VOD": "Cliquez pour modifier les attributs","AB3gDL": "Aucune organisation","KMWpiw": "Vous devez créer ou rejoindre une organisation avant de pouvoir ajouter un site web.","YgZGCW": "Créer une organisation",@@ -1326,7 +1364,6 @@"6t5GFw": "/mois","U2stty": "facturé annuellement à {annualPrice} $","jssBN0": "facturé mensuellement",- "qyJtWy": "Voir moins","P3H0J/": "Voir plus ({count} de plus)","T7eyOH": "Session démarrée","+RUaAj": "Navigation",@@ -1589,7 +1626,6 @@"ACKiA3": "Aucun tag ajouté pour le moment","B1SDE1": "Saisir un nouveau tag...","wXpKtu": "Tags existants :",- "jvo0vs": "Enregistrer","DoskyC": "Toutes les équipes","t6nrnE": "Sans équipe","mHABbN": "Utilisation {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "Formulaire soumis à \"{action}\"","IQ5tZg": "Formulaire soumis","+B+qvw": "{type}champ de saisie \"{name}\" modifié",- "vDpLV2": "{type}champ de saisie modifié",- "E2rh1p": "Boutons",- "yGsZm0": "Formulaires",- "y3qXTf": "Copies",- "eHclX+": "Soumissions de formulaires",- "d6avGo": "Soumissions",- "JaJoAk": "Texte du bouton",- "UgH9Vn": "Texte copié",- "J+At6e": "Dernière soumission",- "LovNd5": "Dernière copie"+ "vDpLV2": "{type}champ de saisie modifié"}diff --git a/client/messages/it.json b/client/messages/it.jsonindex 8f919bf41..129df47cf 100644--- a/client/messages/it.json+++ b/client/messages/it.json@@ -649,9 +649,18 @@"Aujn2T": "Conteggio","ogKEiU": "Link Esterni","VLKK35": "Clic",+ "E2rh1p": "Pulsanti",+ "JaJoAk": "Testo del Pulsante",+ "wU7PzI": "Ultimo Clic",+ "yGsZm0": "Moduli",+ "d6avGo": "Invii",+ "J+At6e": "Ultimo Invio",+ "eHclX+": "Invii dei Moduli",+ "y3qXTf": "Copie",+ "UgH9Vn": "Testo Copiato",+ "LovNd5": "Ultima Copia","6kvpmt": "Filtra {count} link...","pEc/5k": "% Clic",- "wU7PzI": "Ultimo Clic","4KEfRY": "Titoli","gvOzOl": "Titolo Pagina","87ZCAe": "Ingressi",@@ -785,13 +794,35 @@"wGciYE": "Eventi minimi","nxIEYS": "Durata minima (s)","Ykj7Gg": "{count} sessioni il {day}",+ "+zImMB": "Utente eliminato",+ "ZXuaOL": "Impossibile eliminare l'utente",+ "mJbA00": "Elimina utente",+ "L44v6R": "Questa operazione elimina definitivamente tutti i dati analitici di questo utente, inclusi eventi, sessioni, replay delle sessioni e tratti su tutti i dispositivi collegati. Questa azione non può essere annullata.",+ "26hmQc": "Utente identificato",+ "FiIWox": "Impossibile identificare l'utente",+ "fQsGgo": "Identifica utente",+ "g4dAtI": "Assegna un ID utente a questo visitatore. La sua attività passata da questo dispositivo verrà collegata ad esso.",+ "J6C2uX": "L'ID di questa persona nel tuo sistema, come un'e-mail o un ID account.",+ "HAlOn1": "Nome",+ "sy+pv5": "E-mail",+ "YI/JAh": "Identificazione...",+ "izvHMl": "Identifica",+ "qyJtWy": "Mostra meno",+ "/zFGgP": "+{count} altri",+ "qGb+T3": "Località","10Mcdg": "Durata Media","xf+V9Z": "Visto per la prima volta","frN4vy": "Visto per l'ultima volta",+ "HGdcSX": "Acquisizione",+ "3vvIQA": "Pagina di destinazione",+ "JIbDU1": "Ultimo canale","VqI0Nz": "Posizione & Dispositivo","IJ3j5z": "Calendario Attività","1bNJRY": "Tratti Utente",+ "34g6zC": "Modifica tratti",+ "cxFnnE": "Ancora nessun tratto","eGIKNJ": "Pagine Principali",+ "11UMlL": "Ora locale","41XJFz": "Nessun tratto trovato","Vfm+Ul": "I tratti appariranno qui una volta che","cDqj91": "identifichi gli utenti",@@ -804,8 +835,6 @@"H1TwHY": "Impossibile caricare gli utenti","FQMQOJ": "Si è verificato un problema nel recupero degli utenti. Riprova più tardi.","JCIgkj": "Nome utente",- "HAlOn1": "Nome",- "sy+pv5": "E-mail","bLT8zd": "Cerca per {field}...","8DuSnR": "ID utente","PE3u2y": "Tratti",@@ -1288,6 +1317,14 @@"W5IIP8": "Passa a {planName} per sbloccare {message}","4Y+tpi": "Guarda una demo di questa funzionalità","RL7HbL": "Chiedi al proprietario della tua organizzazione di passare a Pro per sbloccare {message}",+ "l7blVT": "Tratti aggiornati",+ "PT9pg+": "Impossibile aggiornare i tratti",+ "WeoAO7": "Aggiungi, modifica o rimuovi i tratti associati a questo utente.",+ "iJMNSQ": "Campi",+ "DL8gYz": "Rimuovi tratto",+ "yxDujp": "Aggiungi tratto",+ "PZOOdj": "Inserisci un oggetto JSON valido",+ "jvo0vs": "Salva","jsy7pk": "Riprova","hyfdry": "Visualizzazione pagina","TH+8LD": "Modifica input",@@ -1307,6 +1344,7 @@"E9m5xj": "Utente Identificato","DWxa2O": "+{count} altri tratti","OFEa0m": "Nessun tratto impostato",+ "zD9VOD": "Clicca per modificare i tratti","AB3gDL": "Nessuna Organizzazione","KMWpiw": "Devi creare o essere aggiunto a un'organizzazione prima di poter aggiungere un sito web.","YgZGCW": "Crea un'Organizzazione",@@ -1326,7 +1364,6 @@"6t5GFw": "/mese","U2stty": "fatturato annualmente a ${annualPrice}","jssBN0": "fatturato mensilmente",- "qyJtWy": "Mostra meno","P3H0J/": "Mostra di più ({count} in più)","T7eyOH": "Sessione iniziata","+RUaAj": "Navigato",@@ -1589,7 +1626,6 @@"ACKiA3": "Nessun tag aggiunto ancora","B1SDE1": "Digita un nuovo tag...","wXpKtu": "Tag esistenti:",- "jvo0vs": "Salva","DoskyC": "Tutti i team","t6nrnE": "Nessun team","mHABbN": "Utilizzo {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "Modulo inviato a \"{action}\"","IQ5tZg": "Modulo inviato","+B+qvw": "{type}campo di input \"{name}\" modificato",- "vDpLV2": "{type}campo di input modificato",- "E2rh1p": "Pulsanti",- "yGsZm0": "Moduli",- "y3qXTf": "Copie",- "eHclX+": "Invii dei Moduli",- "d6avGo": "Invii",- "JaJoAk": "Testo del Pulsante",- "UgH9Vn": "Testo Copiato",- "J+At6e": "Ultimo Invio",- "LovNd5": "Ultima Copia"+ "vDpLV2": "{type}campo di input modificato"}diff --git a/client/messages/ja.json b/client/messages/ja.jsonindex ff80ab7cc..7cd7ef34a 100644--- a/client/messages/ja.json+++ b/client/messages/ja.json@@ -649,9 +649,18 @@"Aujn2T": "カウント","ogKEiU": "外部リンク","VLKK35": "クリック",+ "E2rh1p": "ボタン",+ "JaJoAk": "ボタンテキスト",+ "wU7PzI": "最終クリック",+ "yGsZm0": "フォーム",+ "d6avGo": "送信",+ "J+At6e": "最終送信",+ "eHclX+": "フォーム送信",+ "y3qXTf": "コピー",+ "UgH9Vn": "コピーされたテキスト",+ "LovNd5": "最終コピー","6kvpmt": "{count}件のリンクをフィルター...","pEc/5k": "クリック率",- "wU7PzI": "最終クリック","4KEfRY": "タイトル","gvOzOl": "ページタイトル","87ZCAe": "入口",@@ -785,13 +794,35 @@"wGciYE": "最小イベント数","nxIEYS": "最短時間(秒)","Ykj7Gg": "{day}に{count}セッション",+ "+zImMB": "ユーザーを削除しました",+ "ZXuaOL": "ユーザーの削除に失敗しました",+ "mJbA00": "ユーザーを削除",+ "L44v6R": "この操作により、リンクされたすべてのデバイスにおけるイベント、セッション、セッションリプレイ、属性を含む、このユーザーのすべての分析データが完全に削除されます。この操作は元に戻せません。",+ "26hmQc": "ユーザーを識別しました",+ "FiIWox": "ユーザーの識別に失敗しました",+ "fQsGgo": "ユーザーを識別",+ "g4dAtI": "この訪問者にユーザー ID を割り当てます。このデバイスからの過去のアクティビティがその ID に関連付けられます。",+ "J6C2uX": "自社システムでのこの人物の ID(メールアドレスやアカウント ID など)。",+ "HAlOn1": "名前",+ "sy+pv5": "メール",+ "YI/JAh": "識別中...",+ "izvHMl": "識別",+ "qyJtWy": "折りたたむ",+ "/zFGgP": "他 {count} 件",+ "qGb+T3": "場所","10Mcdg": "平均滞在時間","xf+V9Z": "初回訪問","frN4vy": "最終訪問",+ "HGdcSX": "集客",+ "3vvIQA": "ランディングページ",+ "JIbDU1": "直近のチャネル","VqI0Nz": "場所とデバイス","IJ3j5z": "アクティビティカレンダー","1bNJRY": "ユーザー属性",+ "34g6zC": "属性を編集",+ "cxFnnE": "属性はまだありません","eGIKNJ": "上位ページ",+ "11UMlL": "現地時間","41XJFz": "属性が見つかりません","Vfm+Ul": "属性はここに表示されます。","cDqj91": "ユーザーを識別",@@ -804,8 +835,6 @@"H1TwHY": "ユーザーの読み込みに失敗しました","FQMQOJ": "ユーザーの取得中に問題が発生しました。後でもう一度お試しください。","JCIgkj": "ユーザー名",- "HAlOn1": "名前",- "sy+pv5": "メール","bLT8zd": "{field}で検索...","8DuSnR": "ユーザーID","PE3u2y": "属性",@@ -1288,6 +1317,14 @@"W5IIP8": "{planName}にアップグレードして{message}をアンロック","4Y+tpi": "この機能のデモを見る","RL7HbL": "組織オーナーにProへのアップグレードを依頼して{message}をアンロック",+ "l7blVT": "属性を更新しました",+ "PT9pg+": "属性の更新に失敗しました",+ "WeoAO7": "このユーザーに関連付けられた属性を追加、編集、削除します。",+ "iJMNSQ": "フィールド",+ "DL8gYz": "属性を削除",+ "yxDujp": "属性を追加",+ "PZOOdj": "有効な JSON オブジェクトを入力してください",+ "jvo0vs": "保存","jsy7pk": "再試行","hyfdry": "ページビュー","TH+8LD": "入力変更",@@ -1307,6 +1344,7 @@"E9m5xj": "識別済みユーザー","DWxa2O": "+{count}件の属性","OFEa0m": "属性が設定されていません",+ "zD9VOD": "クリックして属性を編集","AB3gDL": "組織なし","KMWpiw": "ウェブサイトを追加する前に、組織を作成するか組織に追加される必要があります。","YgZGCW": "組織を作成",@@ -1326,7 +1364,6 @@"6t5GFw": "/月","U2stty": "年額${annualPrice}で請求","jssBN0": "月額請求",- "qyJtWy": "折りたたむ","P3H0J/": "もっと表示(他{count}件)","T7eyOH": "セッション開始","+RUaAj": "ナビゲート",@@ -1589,7 +1626,6 @@"ACKiA3": "タグがまだ追加されていません","B1SDE1": "新しいタグを入力...","wXpKtu": "既存のタグ:",- "jvo0vs": "保存","DoskyC": "すべてのチーム","t6nrnE": "チームなし","mHABbN": "{period}の使用量",@@ -1603,14 +1639,5 @@"QOaR8l": "「{action}」にフォームを送信しました","IQ5tZg": "フォームを送信しました","+B+qvw": "{type}入力フィールド「{name}」を変更しました",- "vDpLV2": "{type}入力フィールドを変更しました",- "E2rh1p": "ボタン",- "yGsZm0": "フォーム",- "y3qXTf": "コピー",- "eHclX+": "フォーム送信",- "d6avGo": "送信",- "JaJoAk": "ボタンテキスト",- "UgH9Vn": "コピーされたテキスト",- "J+At6e": "最終送信",- "LovNd5": "最終コピー"+ "vDpLV2": "{type}入力フィールドを変更しました"}diff --git a/client/messages/ko.json b/client/messages/ko.jsonindex 783b229fc..018285de8 100644--- a/client/messages/ko.json+++ b/client/messages/ko.json@@ -649,9 +649,18 @@"Aujn2T": "수","ogKEiU": "외부 링크","VLKK35": "클릭",+ "E2rh1p": "버튼",+ "JaJoAk": "버튼 텍스트",+ "wU7PzI": "마지막 클릭",+ "yGsZm0": "양식",+ "d6avGo": "제출",+ "J+At6e": "마지막 제출",+ "eHclX+": "양식 제출",+ "y3qXTf": "복사",+ "UgH9Vn": "복사된 텍스트",+ "LovNd5": "마지막 복사","6kvpmt": "{count}개 링크 필터...","pEc/5k": "클릭 %",- "wU7PzI": "마지막 클릭","4KEfRY": "제목","gvOzOl": "페이지 제목","87ZCAe": "진입",@@ -785,13 +794,35 @@"wGciYE": "최소 이벤트","nxIEYS": "최소 시간 (초)","Ykj7Gg": "{day}에 {count}개 세션",+ "+zImMB": "사용자가 삭제되었습니다",+ "ZXuaOL": "사용자 삭제에 실패했습니다",+ "mJbA00": "사용자 삭제",+ "L44v6R": "이 작업은 연결된 모든 기기에서 이벤트, 세션, 세션 리플레이, 특성을 포함한 이 사용자의 모든 분석 데이터를 영구적으로 삭제합니다. 이 작업은 취소할 수 없습니다.",+ "26hmQc": "사용자가 식별되었습니다",+ "FiIWox": "사용자 식별에 실패했습니다",+ "fQsGgo": "사용자 식별",+ "g4dAtI": "이 방문자에게 사용자 ID를 지정합니다. 이 기기에서의 과거 활동이 해당 ID에 연결됩니다.",+ "J6C2uX": "이 사람이 내 시스템에서 갖는 ID입니다. 예: 이메일 또는 계정 ID.",+ "HAlOn1": "이름",+ "sy+pv5": "이메일",+ "YI/JAh": "식별 중...",+ "izvHMl": "식별",+ "qyJtWy": "간략히 보기",+ "/zFGgP": "+{count}개 더 보기",+ "qGb+T3": "위치","10Mcdg": "평균 시간","xf+V9Z": "처음 방문","frN4vy": "마지막 방문",+ "HGdcSX": "획득",+ "3vvIQA": "방문 페이지",+ "JIbDU1": "최근 채널","VqI0Nz": "위치 및 기기","IJ3j5z": "활동 캘린더","1bNJRY": "사용자 특성",+ "34g6zC": "특성 편집",+ "cxFnnE": "아직 특성이 없습니다","eGIKNJ": "인기 페이지",+ "11UMlL": "현지 시간","41XJFz": "특성을 찾을 수 없음","Vfm+Ul": "특성은 사용자를","cDqj91": "식별",@@ -804,8 +835,6 @@"H1TwHY": "사용자 로드 실패","FQMQOJ": "사용자를 가져오는 중 문제가 발생했습니다. 나중에 다시 시도해 주세요.","JCIgkj": "사용자명",- "HAlOn1": "이름",- "sy+pv5": "이메일","bLT8zd": "{field}(으)로 검색...","8DuSnR": "사용자 ID","PE3u2y": "특성",@@ -1288,6 +1317,14 @@"W5IIP8": "{message}을(를) 잠금 해제하려면 {planName}으로 업그레이드하세요","4Y+tpi": "이 기능의 데모 보기","RL7HbL": "{message}을(를) 잠금 해제하려면 조직 소유자에게 Pro 업그레이드를 요청하세요",+ "l7blVT": "특성이 업데이트되었습니다",+ "PT9pg+": "특성 업데이트에 실패했습니다",+ "WeoAO7": "이 사용자에게 연결된 특성을 추가, 편집 또는 제거합니다.",+ "iJMNSQ": "필드",+ "DL8gYz": "특성 제거",+ "yxDujp": "특성 추가",+ "PZOOdj": "유효한 JSON 객체를 입력하세요",+ "jvo0vs": "저장","jsy7pk": "다시 시도","hyfdry": "페이지뷰","TH+8LD": "입력 변경",@@ -1307,6 +1344,7 @@"E9m5xj": "식별된 사용자","DWxa2O": "+{count}개 더 많은 특성","OFEa0m": "설정된 특성 없음",+ "zD9VOD": "클릭하여 특성 편집","AB3gDL": "조직 없음","KMWpiw": "웹사이트를 추가하기 전에 조직을 만들거나 조직에 추가되어야 합니다.","YgZGCW": "조직 만들기",@@ -1326,7 +1364,6 @@"6t5GFw": "/월","U2stty": "연 ${annualPrice} 청구","jssBN0": "월별 청구",- "qyJtWy": "간략히 보기","P3H0J/": "더 보기 ({count}개 더)","T7eyOH": "세션 시작됨","+RUaAj": "이동됨",@@ -1589,7 +1626,6 @@"ACKiA3": "아직 추가된 태그 없음","B1SDE1": "새 태그 입력...","wXpKtu": "기존 태그:",- "jvo0vs": "저장","DoskyC": "모든 팀","t6nrnE": "팀 없음","mHABbN": "{period} 사용량",@@ -1603,14 +1639,5 @@"QOaR8l": "\"{action}\"에 양식 제출됨","IQ5tZg": "양식 제출됨","+B+qvw": "{type}입력 필드 \"{name}\" 변경됨",- "vDpLV2": "{type}입력 필드 변경됨",- "E2rh1p": "버튼",- "yGsZm0": "양식",- "y3qXTf": "복사",- "eHclX+": "양식 제출",- "d6avGo": "제출",- "JaJoAk": "버튼 텍스트",- "UgH9Vn": "복사된 텍스트",- "J+At6e": "마지막 제출",- "LovNd5": "마지막 복사"+ "vDpLV2": "{type}입력 필드 변경됨"}diff --git a/client/messages/pl.json b/client/messages/pl.jsonindex cdd34fe79..f79274808 100644--- a/client/messages/pl.json+++ b/client/messages/pl.json@@ -649,9 +649,18 @@"Aujn2T": "Liczba","ogKEiU": "Linki wychodzące","VLKK35": "Kliknięcia",+ "E2rh1p": "Przyciski",+ "JaJoAk": "Tekst przycisku",+ "wU7PzI": "Ostatnio kliknięto",+ "yGsZm0": "Formularze",+ "d6avGo": "Przesłania",+ "J+At6e": "Ostatnio przesłano",+ "eHclX+": "Przesłania formularzy",+ "y3qXTf": "Kopie",+ "UgH9Vn": "Skopiowany tekst",+ "LovNd5": "Ostatnio skopiowano","6kvpmt": "Filtruj {count} linków...","pEc/5k": "% kliknięć",- "wU7PzI": "Ostatnio kliknięto","4KEfRY": "Tytuły","gvOzOl": "Tytuł strony","87ZCAe": "Wejścia",@@ -785,13 +794,35 @@"wGciYE": "Min. zdarzeń","nxIEYS": "Min. czas trwania (s)","Ykj7Gg": "{count} sesji dnia {day}",+ "+zImMB": "Użytkownik usunięty",+ "ZXuaOL": "Nie udało się usunąć użytkownika",+ "mJbA00": "Usuń użytkownika",+ "L44v6R": "Spowoduje to trwałe usunięcie wszystkich danych analitycznych tego użytkownika, w tym zdarzeń, sesji, nagrań sesji i cech na wszystkich powiązanych urządzeniach. Tej akcji nie można cofnąć.",+ "26hmQc": "Użytkownik zidentyfikowany",+ "FiIWox": "Nie udało się zidentyfikować użytkownika",+ "fQsGgo": "Zidentyfikuj użytkownika",+ "g4dAtI": "Przypisz identyfikator użytkownika temu odwiedzającemu. Jego dotychczasowa aktywność z tego urządzenia zostanie z nim powiązana.",+ "J6C2uX": "Identyfikator tej osoby w Twoim systemie, np. e-mail lub ID konta.",+ "HAlOn1": "Imię",+ "sy+pv5": "E-mail",+ "YI/JAh": "Identyfikowanie...",+ "izvHMl": "Zidentyfikuj",+ "qyJtWy": "Pokaż mniej",+ "/zFGgP": "+{count} więcej",+ "qGb+T3": "Lokalizacje","10Mcdg": "Śr. czas trwania","xf+V9Z": "Pierwsza wizyta","frN4vy": "Ostatnia wizyta",+ "HGdcSX": "Pozyskanie",+ "3vvIQA": "Strona docelowa",+ "JIbDU1": "Ostatni kanał","VqI0Nz": "Lokalizacja i urządzenie","IJ3j5z": "Kalendarz aktywności","1bNJRY": "Cechy użytkownika",+ "34g6zC": "Edytuj cechy",+ "cxFnnE": "Brak cech","eGIKNJ": "Najpopularniejsze strony",+ "11UMlL": "Czas lokalny","41XJFz": "Nie znaleziono cech","Vfm+Ul": "Cechy pojawią się tutaj, gdy","cDqj91": "zidentyfikujesz użytkowników",@@ -804,8 +835,6 @@"H1TwHY": "Nie udało się załadować użytkowników","FQMQOJ": "Wystąpił problem z pobieraniem użytkowników. Spróbuj ponownie później.","JCIgkj": "Nazwa użytkownika",- "HAlOn1": "Imię",- "sy+pv5": "E-mail","bLT8zd": "Szukaj po {field}...","8DuSnR": "ID użytkownika","PE3u2y": "Cechy",@@ -1288,6 +1317,14 @@"W5IIP8": "Ulepsz do {planName}, aby odblokować {message}","4Y+tpi": "Zobacz demo tej funkcji","RL7HbL": "Poproś właściciela organizacji o ulepszenie do Pro, aby odblokować {message}",+ "l7blVT": "Cechy zaktualizowane",+ "PT9pg+": "Nie udało się zaktualizować cech",+ "WeoAO7": "Dodawaj, edytuj lub usuwaj cechy przypisane do tego użytkownika.",+ "iJMNSQ": "Pola",+ "DL8gYz": "Usuń cechę",+ "yxDujp": "Dodaj cechę",+ "PZOOdj": "Wprowadź prawidłowy obiekt JSON",+ "jvo0vs": "Zapisz","jsy7pk": "Spróbuj ponownie","hyfdry": "Odsłona","TH+8LD": "Zmiana danych wejściowych",@@ -1307,6 +1344,7 @@"E9m5xj": "Zidentyfikowany użytkownik","DWxa2O": "+{count} więcej cech","OFEa0m": "Brak ustawionych cech",+ "zD9VOD": "Kliknij, aby edytować cechy","AB3gDL": "Brak organizacji","KMWpiw": "Musisz utworzyć lub zostać dodanym do organizacji, zanim będziesz mógł dodać stronę.","YgZGCW": "Utwórz organizację",@@ -1326,7 +1364,6 @@"6t5GFw": "/miesiąc","U2stty": "rozliczane rocznie za ${annualPrice}","jssBN0": "rozliczane miesięcznie",- "qyJtWy": "Pokaż mniej","P3H0J/": "Pokaż więcej (jeszcze {count})","T7eyOH": "Sesja rozpoczęta","+RUaAj": "Nawigacja",@@ -1589,7 +1626,6 @@"ACKiA3": "Brak dodanych tagów","B1SDE1": "Wpisz nowy tag...","wXpKtu": "Istniejące tagi:",- "jvo0vs": "Zapisz","DoskyC": "Wszystkie zespoły","t6nrnE": "Brak zespołu","mHABbN": "Wykorzystanie za {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "Przesłano formularz do \"{action}\"","IQ5tZg": "Przesłano formularz","+B+qvw": "Zmieniono {type}pole wprowadzania \"{name}\"",- "vDpLV2": "Zmieniono {type}pole wprowadzania",- "E2rh1p": "Przyciski",- "yGsZm0": "Formularze",- "y3qXTf": "Kopie",- "eHclX+": "Przesłania formularzy",- "d6avGo": "Przesłania",- "JaJoAk": "Tekst przycisku",- "UgH9Vn": "Skopiowany tekst",- "J+At6e": "Ostatnio przesłano",- "LovNd5": "Ostatnio skopiowano"+ "vDpLV2": "Zmieniono {type}pole wprowadzania"}diff --git a/client/messages/pt.json b/client/messages/pt.jsonindex 9c69d71e7..1c11cf45a 100644--- a/client/messages/pt.json+++ b/client/messages/pt.json@@ -649,9 +649,18 @@"Aujn2T": "Contagem","ogKEiU": "Links Externos","VLKK35": "Cliques",+ "E2rh1p": "Botões",+ "JaJoAk": "Texto do Botão",+ "wU7PzI": "Último Clique",+ "yGsZm0": "Formulários",+ "d6avGo": "Envios",+ "J+At6e": "Último Envio",+ "eHclX+": "Envios de Formulários",+ "y3qXTf": "Cópias",+ "UgH9Vn": "Texto Copiado",+ "LovNd5": "Última Cópia","6kvpmt": "Filtrar {count} links...","pEc/5k": "Clique %",- "wU7PzI": "Último Clique","4KEfRY": "Títulos","gvOzOl": "Título da Página","87ZCAe": "Entradas",@@ -785,13 +794,35 @@"wGciYE": "Mín. eventos","nxIEYS": "Mín. duração (s)","Ykj7Gg": "{count} sessões em {day}",+ "+zImMB": "Usuário excluído",+ "ZXuaOL": "Falha ao excluir usuário",+ "mJbA00": "Excluir usuário",+ "L44v6R": "Isso exclui permanentemente todos os dados analíticos deste usuário, incluindo eventos, sessões, replays de sessão e atributos em todos os dispositivos vinculados. Esta ação não pode ser desfeita.",+ "26hmQc": "Usuário identificado",+ "FiIWox": "Falha ao identificar usuário",+ "fQsGgo": "Identificar usuário",+ "g4dAtI": "Atribua um ID de usuário a este visitante. A atividade anterior deste dispositivo será vinculada a ele.",+ "J6C2uX": "O ID desta pessoa no seu próprio sistema, como um e-mail ou ID de conta.",+ "HAlOn1": "Nome",+ "sy+pv5": "E-mail",+ "YI/JAh": "Identificando...",+ "izvHMl": "Identificar",+ "qyJtWy": "Mostrar menos",+ "/zFGgP": "+{count} mais",+ "qGb+T3": "Localizações","10Mcdg": "Duração Média","xf+V9Z": "Visto Pela Primeira Vez","frN4vy": "Visto Por Último",+ "HGdcSX": "Aquisição",+ "3vvIQA": "Página de destino",+ "JIbDU1": "Último canal","VqI0Nz": "Localização e Dispositivo","IJ3j5z": "Calendário de Atividade","1bNJRY": "Atributos do Usuário",+ "34g6zC": "Editar atributos",+ "cxFnnE": "Ainda sem atributos","eGIKNJ": "Páginas Mais Visitadas",+ "11UMlL": "Hora local","41XJFz": "Nenhum atributo encontrado","Vfm+Ul": "Os atributos aparecerão aqui quando você","cDqj91": "identificar usuários",@@ -804,8 +835,6 @@"H1TwHY": "Falha ao carregar usuários","FQMQOJ": "Houve um problema ao buscar os usuários. Por favor, tente novamente mais tarde.","JCIgkj": "Nome de Usuário",- "HAlOn1": "Nome",- "sy+pv5": "E-mail","bLT8zd": "Pesquisar por {field}...","8DuSnR": "ID do usuário","PE3u2y": "Atributos",@@ -1288,6 +1317,14 @@"W5IIP8": "Atualize para {planName} para desbloquear {message}","4Y+tpi": "Veja uma demo desta funcionalidade","RL7HbL": "Peça ao proprietário da sua organização para atualizar para Pro para desbloquear {message}",+ "l7blVT": "Atributos atualizados",+ "PT9pg+": "Falha ao atualizar atributos",+ "WeoAO7": "Adicione, edite ou remova atributos associados a este usuário.",+ "iJMNSQ": "Campos",+ "DL8gYz": "Remover atributo",+ "yxDujp": "Adicionar atributo",+ "PZOOdj": "Insira um objeto JSON válido",+ "jvo0vs": "Salvar","jsy7pk": "Tentar Novamente","hyfdry": "Visualização de página","TH+8LD": "Alteração de entrada",@@ -1307,6 +1344,7 @@"E9m5xj": "Usuário Identificado","DWxa2O": "+{count} mais atributos","OFEa0m": "Nenhum atributo definido",+ "zD9VOD": "Clique para editar os atributos","AB3gDL": "Sem Organização","KMWpiw": "Você precisa criar ou ser adicionado a uma organização antes de adicionar um site.","YgZGCW": "Criar uma Organização",@@ -1326,7 +1364,6 @@"6t5GFw": "/mês","U2stty": "cobrado anualmente a ${annualPrice}","jssBN0": "cobrado mensalmente",- "qyJtWy": "Mostrar menos","P3H0J/": "Mostrar mais ({count} mais)","T7eyOH": "Sessão iniciada","+RUaAj": "Navegou",@@ -1589,7 +1626,6 @@"ACKiA3": "Nenhuma tag adicionada ainda","B1SDE1": "Digite uma nova tag...","wXpKtu": "Tags existentes:",- "jvo0vs": "Salvar","DoskyC": "Todos os times","t6nrnE": "Sem time","mHABbN": "Uso {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "Formulário enviado para \"{action}\"","IQ5tZg": "Formulário enviado","+B+qvw": "{type}campo de entrada \"{name}\" alterado",- "vDpLV2": "{type}campo de entrada alterado",- "E2rh1p": "Botões",- "yGsZm0": "Formulários",- "y3qXTf": "Cópias",- "eHclX+": "Envios de Formulários",- "d6avGo": "Envios",- "JaJoAk": "Texto do Botão",- "UgH9Vn": "Texto Copiado",- "J+At6e": "Último Envio",- "LovNd5": "Última Cópia"+ "vDpLV2": "{type}campo de entrada alterado"}diff --git a/client/messages/uk.json b/client/messages/uk.jsonindex f12a4671c..73c3cec12 100644--- a/client/messages/uk.json+++ b/client/messages/uk.json@@ -649,9 +649,18 @@"Aujn2T": "Кількість","ogKEiU": "Вихідні посилання","VLKK35": "Кліки",+ "E2rh1p": "Кнопки",+ "JaJoAk": "Текст кнопки",+ "wU7PzI": "Останній клік",+ "yGsZm0": "Форми",+ "d6avGo": "Надсилання",+ "J+At6e": "Останнє надсилання",+ "eHclX+": "Надсилання форм",+ "y3qXTf": "Копіювання",+ "UgH9Vn": "Скопійований текст",+ "LovNd5": "Останнє копіювання","6kvpmt": "Фільтрувати {count} посилань...","pEc/5k": "% кліків",- "wU7PzI": "Останній клік","4KEfRY": "Заголовки","gvOzOl": "Заголовок сторінки","87ZCAe": "Входи",@@ -785,13 +794,35 @@"wGciYE": "Мін. подій","nxIEYS": "Мін. тривалість (с)","Ykj7Gg": "{count} сеансів: {day}",+ "+zImMB": "",+ "ZXuaOL": "",+ "mJbA00": "",+ "L44v6R": "",+ "26hmQc": "",+ "FiIWox": "",+ "fQsGgo": "",+ "g4dAtI": "",+ "J6C2uX": "",+ "HAlOn1": "Ім'я",+ "sy+pv5": "Email",+ "YI/JAh": "",+ "izvHMl": "",+ "qyJtWy": "Показати менше",+ "/zFGgP": "ще {count}",+ "qGb+T3": "Розташування","10Mcdg": "Сер. тривалість","xf+V9Z": "Перший візит","frN4vy": "Останній візит",+ "HGdcSX": "Залучення",+ "3vvIQA": "Цільова сторінка",+ "JIbDU1": "Останній канал","VqI0Nz": "Локація та пристрій","IJ3j5z": "Календар активності","1bNJRY": "Ознаки користувача (Traits)",+ "34g6zC": "Редагувати атрибути",+ "cxFnnE": "","eGIKNJ": "Популярні сторінки",+ "11UMlL": "Місцевий час","41XJFz": "Ознак не знайдено","Vfm+Ul": "Ознаки з'являться тут, коли ви","cDqj91": "ідентифікуєте користувачів",@@ -804,8 +835,6 @@"H1TwHY": "Не вдалося завантажити користувачів","FQMQOJ": "Виникла проблема під час отримання користувачів. Будь ласка, спробуйте пізніше.","JCIgkj": "Юзернейм",- "HAlOn1": "Ім'я",- "sy+pv5": "Email","bLT8zd": "Шукати за {field}...","8DuSnR": "ID користувача","PE3u2y": "Ознаки",@@ -1288,6 +1317,14 @@"W5IIP8": "Перейдіть на {planName}, щоб розблокувати {message}","4Y+tpi": "Подивитися демо цієї функції","RL7HbL": "Попросіть власника організації перейти на план Pro, щоб розблокувати {message}",+ "l7blVT": "",+ "PT9pg+": "",+ "WeoAO7": "",+ "iJMNSQ": "",+ "DL8gYz": "",+ "yxDujp": "",+ "PZOOdj": "",+ "jvo0vs": "Зберегти","jsy7pk": "Спробувати ще раз","hyfdry": "Перегляд сторінки","TH+8LD": "Зміна поля вводу",@@ -1307,6 +1344,7 @@"E9m5xj": "Ідентифікований користувач","DWxa2O": "ще +{count} ознак","OFEa0m": "Ознаки не задано",+ "zD9VOD": "Натисніть, щоб редагувати атрибути","AB3gDL": "Немає організації","KMWpiw": "Вам потрібно створити або бути доданим до організації, перш ніж ви зможете додати вебсайт.","YgZGCW": "Створити організацію",@@ -1326,7 +1364,6 @@"6t5GFw": "/місяць","U2stty": "рахунок на ${annualPrice} виставляється щорічно","jssBN0": "рахунок виставляється щомісяця",- "qyJtWy": "Показати менше","P3H0J/": "Показати ще ({count} більше)","T7eyOH": "Сесія розпочата","+RUaAj": "Перейдено",@@ -1589,7 +1626,6 @@"ACKiA3": "Ще не додано жодного тегу","B1SDE1": "Введіть новий тег...","wXpKtu": "Існуючі теги:",- "jvo0vs": "Зберегти","DoskyC": "Усі команди","t6nrnE": "Немає команди","mHABbN": "Використання за {period}",@@ -1603,14 +1639,5 @@"QOaR8l": "","IQ5tZg": "","+B+qvw": "",- "vDpLV2": "",- "E2rh1p": "Кнопки",- "yGsZm0": "Форми",- "y3qXTf": "Копіювання",- "eHclX+": "Надсилання форм",- "d6avGo": "Надсилання",- "JaJoAk": "Текст кнопки",- "UgH9Vn": "Скопійований текст",- "J+At6e": "Останнє надсилання",- "LovNd5": "Останнє копіювання"+ "vDpLV2": ""}diff --git a/client/messages/zh.json b/client/messages/zh.jsonindex 5ceaac915..a3dec27b6 100644--- a/client/messages/zh.json+++ b/client/messages/zh.json@@ -649,9 +649,18 @@"Aujn2T": "计数","ogKEiU": "出站链接","VLKK35": "点击次数",+ "E2rh1p": "按钮",+ "JaJoAk": "按钮文本",+ "wU7PzI": "最后点击时间",+ "yGsZm0": "表单",+ "d6avGo": "提交次数",+ "J+At6e": "最后提交时间",+ "eHclX+": "表单提交",+ "y3qXTf": "复制次数",+ "UgH9Vn": "复制的文本",+ "LovNd5": "最后复制时间","6kvpmt": "过滤 {count} 个链接...","pEc/5k": "点击 %",- "wU7PzI": "最后点击时间","4KEfRY": "标题","gvOzOl": "页面标题","87ZCAe": "入口",@@ -785,13 +794,35 @@"wGciYE": "最少事件数","nxIEYS": "最短时长 (秒)","Ykj7Gg": "{day} 有 {count} 个会话",+ "+zImMB": "用户已删除",+ "ZXuaOL": "删除用户失败",+ "mJbA00": "删除用户",+ "L44v6R": "这将永久删除该用户的所有分析数据,包括所有关联设备上的事件、会话、会话回放和特征。此操作无法撤销。",+ "26hmQc": "用户已识别",+ "FiIWox": "识别用户失败",+ "fQsGgo": "识别用户",+ "g4dAtI": "为此访客分配用户 ID。该设备上的历史活动将与其关联。",+ "J6C2uX": "此人在您自己系统中的 ID,例如电子邮件或账户 ID。",+ "HAlOn1": "姓名",+ "sy+pv5": "电子邮件",+ "YI/JAh": "正在识别...",+ "izvHMl": "识别",+ "qyJtWy": "显示较少",+ "/zFGgP": "还有 {count} 个",+ "qGb+T3": "位置","10Mcdg": "平均时长","xf+V9Z": "首次出现","frN4vy": "最后出现",+ "HGdcSX": "获客",+ "3vvIQA": "着陆页",+ "JIbDU1": "最近渠道","VqI0Nz": "位置和设备","IJ3j5z": "活动日历","1bNJRY": "用户特征",+ "34g6zC": "编辑特征",+ "cxFnnE": "暂无特征","eGIKNJ": "热门页面",+ "11UMlL": "当地时间","41XJFz": "未找到特征","Vfm+Ul": "一旦您通过自定义属性","cDqj91": "识别用户",@@ -804,8 +835,6 @@"H1TwHY": "加载用户失败","FQMQOJ": "获取用户时出现问题。请稍后重试。","JCIgkj": "用户名",- "HAlOn1": "姓名",- "sy+pv5": "电子邮件","bLT8zd": "按 {field} 搜索...","8DuSnR": "用户 ID","PE3u2y": "特征",@@ -1288,6 +1317,14 @@"W5IIP8": "升级到 {planName} 即可解锁 {message}","4Y+tpi": "查看此功能的演示","RL7HbL": "请求您的组织所有者升级到 Pro 即可解锁 {message}",+ "l7blVT": "特征已更新",+ "PT9pg+": "更新特征失败",+ "WeoAO7": "添加、编辑或删除此用户的特征。",+ "iJMNSQ": "字段",+ "DL8gYz": "删除特征",+ "yxDujp": "添加特征",+ "PZOOdj": "请输入有效的 JSON 对象",+ "jvo0vs": "保存","jsy7pk": "再试一次","hyfdry": "页面浏览","TH+8LD": "输入更改",@@ -1307,6 +1344,7 @@"E9m5xj": "已识别的用户","DWxa2O": "还有 {count} 个特征","OFEa0m": "未设置特征",+ "zD9VOD": "点击编辑特征","AB3gDL": "无组织","KMWpiw": "在添加网站之前,您需要创建或被添加到某个组织。","YgZGCW": "创建一个组织",@@ -1326,7 +1364,6 @@"6t5GFw": "/月","U2stty": "按年计费,每年 ${annualPrice}","jssBN0": "按月计费",- "qyJtWy": "显示较少","P3H0J/": "显示更多(还有 {count} 个)","T7eyOH": "会话开始","+RUaAj": "已导航",@@ -1589,7 +1626,6 @@"ACKiA3": "尚未添加标签","B1SDE1": "输入新标签...","wXpKtu": "现有标签:",- "jvo0vs": "保存","DoskyC": "所有团队","t6nrnE": "无团队","mHABbN": "{period} 使用情况",@@ -1603,14 +1639,5 @@"QOaR8l": "已提交表单到 \"{action}\"","IQ5tZg": "已提交表单","+B+qvw": "已更改 {type}输入框 \"{name}\"",- "vDpLV2": "已更改 {type}输入框",- "E2rh1p": "按钮",- "yGsZm0": "表单",- "y3qXTf": "复制次数",- "eHclX+": "表单提交",- "d6avGo": "提交次数",- "JaJoAk": "按钮文本",- "UgH9Vn": "复制的文本",- "J+At6e": "最后提交时间",- "LovNd5": "最后复制时间"+ "vDpLV2": "已更改 {type}输入框"}diff --git a/client/src/api/analytics/endpoints/index.ts b/client/src/api/analytics/endpoints/index.tsindex da94c8ee6..247f58248 100644--- a/client/src/api/analytics/endpoints/index.ts+++ b/client/src/api/analytics/endpoints/index.ts@@ -195,16 +195,27 @@ export type {} from "./sessions";// Users endpoints-export { fetchUsers, fetchUserSessionCount, fetchUserInfo } from "./users";+export {+ fetchUsers,+ fetchUserSessionCount,+ fetchUserInfo,+ identifyUser,+ updateUserTraits,+ deleteUser,+} from "./users";export type {UsersResponse,UserInfo,+ UserVitals,+ UserLocationBreakdown,+ UserDeviceBreakdown,LinkedDevice,UserSessionCountResponse,UsersParams,UserSessionsParams,UserSessionCountParams,UsersListResponse,+ IdentifyUserPayload,} from "./users";// Misc endpoints (retention, journeys, page titles, org event count)diff --git a/client/src/api/analytics/endpoints/users.ts b/client/src/api/analytics/endpoints/users.tsindex d08911922..df461438a 100644--- a/client/src/api/analytics/endpoints/users.ts+++ b/client/src/api/analytics/endpoints/users.ts@@ -1,3 +1,4 @@+import { Filter } from "@rybbit/shared";import { authedFetch } from "../../utils";import { CommonApiParams, PaginationParams, SortParams, toQueryParams } from "./types";import type { GetSessionsResponse } from "./sessions";@@ -29,6 +30,39 @@ export type LinkedDevice = {created_at: string;};+// p75 Web Vitals across the user's performance events+export type UserVitals = {+ lcp_p75: number | null;+ cls_p75: number | null;+ inp_p75: number | null;+ fcp_p75: number | null;+ ttfb_p75: number | null;+ performance_events: number;+};++// One location the user was seen in, with session share+export type UserLocationBreakdown = {+ country: string;+ region: string;+ city: string;+ sessions: number;+ last_seen: string;+};++// One device the user was seen on (grouped without versions; versions and+// screen reflect the latest sighting)+export type UserDeviceBreakdown = {+ device_type: string;+ browser: string;+ browser_version: string;+ operating_system: string;+ operating_system_version: string;+ screen_width: number;+ screen_height: number;+ sessions: number;+ last_seen: string;+};+// User info typeexport type UserInfo = {duration: number;@@ -53,8 +87,20 @@ export type UserInfo = {pageviews: number;events: number;ip?: string;+ first_referrer: string;+ first_channel: string;+ first_entry_page: string;+ first_utm_source: string;+ first_utm_medium: string;+ first_utm_campaign: string;+ last_referrer: string;+ last_channel: string;+ timezone: string;traits: Record<string, unknown> | null;linked_devices: LinkedDevice[];+ vitals: UserVitals | null;+ locations: UserLocationBreakdown[];+ devices: UserDeviceBreakdown[];};// User session count response type@@ -77,6 +123,7 @@ export interface UserSessionsParams extends CommonApiParams {export interface UserSessionCountParams {userId: string;timeZone: string;+ filters?: Filter[];}export interface UsersListResponse {@@ -117,15 +164,69 @@ export async function fetchUserSessionCount(const response = await authedFetch<{ data: UserSessionCountResponse[] }>(`/sites/${site}/users/session-count`, {user_id: params.userId,time_zone: params.timeZone,+ filters: params.filters?.length ? params.filters : undefined,});return response;}/**- * Fetch detailed user information+ * Fetch detailed user information, optionally scoped to a time range and filters* GET /api/users/:userId/:site*/-export async function fetchUserInfo(site: string | number, userId: string): Promise<UserInfo> {- const response = await authedFetch<{ data: UserInfo }>(`/sites/${site}/users/${encodeURIComponent(userId)}`);+export async function fetchUserInfo(+ site: string | number,+ userId: string,+ params?: CommonApiParams+): Promise<UserInfo> {+ const response = await authedFetch<{ data: UserInfo }>(+ `/sites/${site}/users/${encodeURIComponent(userId)}`,+ params ? toQueryParams(params) : undefined+ );return response.data;}++export interface IdentifyUserPayload {+ anonymousId: string;+ userId: string;+ traits?: Record<string, unknown>;+}++/**+ * Manually identify an anonymous visitor from the dashboard+ * POST /sites/:site/users/identify+ */+export async function identifyUser(site: string | number, payload: IdentifyUserPayload): Promise<{ success: boolean }> {+ return authedFetch<{ success: boolean }>(`/sites/${site}/users/identify`, undefined, {+ method: "POST",+ data: {+ anonymous_id: payload.anonymousId,+ user_id: payload.userId,+ traits: payload.traits,+ },+ });+}++/**+ * Replace an identified user's traits+ * PUT /sites/:site/users/:userId/traits+ */+export async function updateUserTraits(+ site: string | number,+ userId: string,+ traits: Record<string, unknown>+): Promise<{ success: boolean }> {+ return authedFetch<{ success: boolean }>(`/sites/${site}/users/${encodeURIComponent(userId)}/traits`, undefined, {+ method: "PUT",+ data: { traits },+ });+}++/**+ * Permanently delete all analytics data for a user (GDPR erasure)+ * DELETE /sites/:site/users/:userId+ */+export async function deleteUser(site: string | number, userId: string): Promise<{ success: boolean }> {+ return authedFetch<{ success: boolean }>(`/sites/${site}/users/${encodeURIComponent(userId)}`, undefined, {+ method: "DELETE",+ });+}diff --git a/client/src/api/analytics/hooks/useDeleteUser.ts b/client/src/api/analytics/hooks/useDeleteUser.tsnew file mode 100644index 000000000..2857a138f--- /dev/null+++ b/client/src/api/analytics/hooks/useDeleteUser.ts@@ -0,0 +1,20 @@+import { useMutation, useQueryClient } from "@tanstack/react-query";+import { useStore } from "../../../lib/store";+import { deleteUser } from "../endpoints";++interface DeleteUserParams {+ userId: string;+}++export function useDeleteUser() {+ const { site } = useStore();+ const queryClient = useQueryClient();++ return useMutation({+ mutationFn: ({ userId }: DeleteUserParams) => deleteUser(site, userId),+ onSuccess: (_, { userId }) => {+ queryClient.invalidateQueries({ queryKey: ["users"] });+ queryClient.removeQueries({ queryKey: ["user-info", userId] });+ },+ });+}diff --git a/client/src/api/analytics/hooks/useGetUserSessions.ts b/client/src/api/analytics/hooks/useGetUserSessions.tsindex 2caab81b2..0cc2baa38 100644--- a/client/src/api/analytics/hooks/useGetUserSessions.ts+++ b/client/src/api/analytics/hooks/useGetUserSessions.ts@@ -1,5 +1,5 @@import { useInfiniteQuery, useQuery } from "@tanstack/react-query";-import { SESSION_PAGE_FILTERS } from "../../../lib/filterGroups";+import { SESSION_PAGE_FILTERS, USER_DETAIL_PAGE_FILTERS } from "../../../lib/filterGroups";import { getFilteredFilters, getTimezone, useStore } from "../../../lib/store";import { buildApiParams } from "../../utils";import {@@ -35,11 +35,7 @@ export function useGetSessions({const filteredFilters = getFilteredFilters(SESSION_PAGE_FILTERS);- // When filtering by userId, we fetch all sessions for that user (no time filter)- // Otherwise use buildApiParams which handles past-minutes mode- const params = userId- ? { startDate: "", endDate: "", timeZone: getTimezone(), filters: filteredFilters }- : buildApiParams(timeOverride || time, { filters: filteredFilters });+ const params = buildApiParams(timeOverride || time, { filters: filteredFilters });return useQuery<{ data: GetSessionsResponse }>({queryKey: ["sessions", timeOverride || time, site, filteredFilters, userId, page, limit, identifiedOnly, timezone, minPageviews, minEvents, minDuration],@@ -139,13 +135,17 @@ export function useGetSessionDetailsInfinite(sessionId: string | null) {export function useGetUserSessionCount(userId: string) {const { site, timezone } = useStore();+ // The calendar always spans the user's full history, so it only takes the+ // dimension filters, not the selected time range.+ const filteredFilters = getFilteredFilters(USER_DETAIL_PAGE_FILTERS);return useQuery<{ data: UserSessionCountResponse[] }>({- queryKey: ["user-session-count", userId, site, timezone],+ queryKey: ["user-session-count", userId, site, timezone, filteredFilters],queryFn: () => {return fetchUserSessionCount(site, {userId,timeZone: getTimezone(),+ filters: filteredFilters,});},staleTime: Infinity,diff --git a/client/src/api/analytics/hooks/useIdentifyUser.ts b/client/src/api/analytics/hooks/useIdentifyUser.tsnew file mode 100644index 000000000..20807695d--- /dev/null+++ b/client/src/api/analytics/hooks/useIdentifyUser.ts@@ -0,0 +1,16 @@+import { useMutation, useQueryClient } from "@tanstack/react-query";+import { useStore } from "../../../lib/store";+import { identifyUser, IdentifyUserPayload } from "../endpoints";++export function useIdentifyUser() {+ const { site } = useStore();+ const queryClient = useQueryClient();++ return useMutation({+ mutationFn: (payload: IdentifyUserPayload) => identifyUser(site, payload),+ onSuccess: () => {+ queryClient.invalidateQueries({ queryKey: ["users"] });+ queryClient.invalidateQueries({ queryKey: ["user-info"] });+ },+ });+}diff --git a/client/src/api/analytics/hooks/useUpdateUserTraits.ts b/client/src/api/analytics/hooks/useUpdateUserTraits.tsnew file mode 100644index 000000000..ae471ea79--- /dev/null+++ b/client/src/api/analytics/hooks/useUpdateUserTraits.ts@@ -0,0 +1,29 @@+import { useMutation, useQueryClient } from "@tanstack/react-query";+import { useStore } from "../../../lib/store";+import { updateUserTraits } from "../endpoints";++interface UpdateUserTraitsParams {+ userId: string;+ traits: Record<string, unknown>;+}++export function useUpdateUserTraits() {+ const { site } = useStore();+ const queryClient = useQueryClient();++ return useMutation({+ mutationFn: ({ userId, traits }: UpdateUserTraitsParams) => updateUserTraits(site, userId, traits),+ onSuccess: () => {+ // Traits surface on the users list/detail, trait explorer, and the+ // session/replay cards' identified badges.+ queryClient.invalidateQueries({ queryKey: ["users"] });+ queryClient.invalidateQueries({ queryKey: ["user-info"] });+ queryClient.invalidateQueries({ queryKey: ["user-trait-keys"] });+ queryClient.invalidateQueries({ queryKey: ["user-trait-values"] });+ queryClient.invalidateQueries({ queryKey: ["user-trait-value-users"] });+ queryClient.invalidateQueries({ queryKey: ["sessions"] });+ queryClient.invalidateQueries({ queryKey: ["sessions-infinite"] });+ queryClient.invalidateQueries({ queryKey: ["session-replays"] });+ },+ });+}diff --git a/client/src/api/analytics/hooks/userGetInfo.ts b/client/src/api/analytics/hooks/userGetInfo.tsindex 8738be447..67887d06a 100644--- a/client/src/api/analytics/hooks/userGetInfo.ts+++ b/client/src/api/analytics/hooks/userGetInfo.ts@@ -1,10 +1,17 @@import { useQuery } from "@tanstack/react-query";+import { USER_DETAIL_PAGE_FILTERS } from "../../../lib/filterGroups";+import { getFilteredFilters, useStore } from "../../../lib/store";+import { buildApiParams } from "../../utils";import { fetchUserInfo, UserInfo } from "../endpoints";export function useUserInfo(siteId: number, userId: string) {+ const { time, timezone } = useStore();+ const filteredFilters = getFilteredFilters(USER_DETAIL_PAGE_FILTERS);+ const params = buildApiParams(time, { filters: filteredFilters });+return useQuery<UserInfo>({- queryKey: ["user-info", userId, siteId],- queryFn: () => fetchUserInfo(siteId, userId),+ queryKey: ["user-info", userId, siteId, time, filteredFilters, timezone],+ queryFn: () => fetchUserInfo(siteId, userId, params),enabled: !!siteId && !!userId,});}diff --git a/client/src/app/Providers.tsx b/client/src/app/Providers.tsxindex 0d30f4687..8da6a6572 100644--- a/client/src/app/Providers.tsx+++ b/client/src/app/Providers.tsx@@ -3,10 +3,13 @@import { useAppEnv } from "@/hooks/useIsProduction";import { useStopImpersonation } from "@/hooks/useStopImpersonation";import { IS_CLOUD } from "@/lib/const";+import { getStoredDashboardDefaultTime } from "@/lib/defaultTimeRange";+import { getTimezone, useStore } from "@/lib/store";import QueryProvider from "@/providers/QueryProvider";import { ThemeProvider } from "next-themes";import Script from "next/script";import { NuqsAdapter } from "nuqs/adapters/next/app";+import { useEffect } from "react";import { AuthenticationGuard } from "../components/AuthenticationGuard";import { OrganizationInitializer } from "../components/OrganizationInitializer";import { Toaster } from "../components/ui/sonner";@@ -15,6 +18,21 @@ import { TooltipProvider } from "../components/ui/tooltip";type EmbedTheme = "light" | "dark" | "system";+function DashboardTimeInitializer() {+ const setTime = useStore(state => state.setTime);++ useEffect(() => {+ const params = new URLSearchParams(window.location.search);+ const hasTimeInUrl = params.has("timeMode") || params.has("wellKnown");++ if (!hasTimeInUrl) {+ setTime(getStoredDashboardDefaultTime(getTimezone()), !params.has("bucket"));+ }+ }, [setTime]);++ return null;+}+function getEmbedTheme(): EmbedTheme | null {if (typeof window === "undefined") return null;@@ -47,6 +65,7 @@ export function Providers({ children }: { children: React.ReactNode }) {><TooltipProvider><QueryProvider>+ <DashboardTimeInitializer /><OrganizationInitializer /><AuthenticationGuard />{children}diff --git a/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx b/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsxindex 7d23a0494..f7d96c8ba 100644--- a/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx+++ b/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx@@ -30,6 +30,7 @@ export type StandardSectionBaseProps = {hasSubrow?: boolean;getSubrowLabel?: (item: MetricResponse) => ReactNode;customFilters?: Filter[];+ additionalFilters?: Filter[];customTime?: Time;lite?: boolean;};@@ -54,6 +55,7 @@ export function StandardSection({hasSubrow,getSubrowLabel,customFilters,+ additionalFilters,customTime,lite = false,renderDialog = true,@@ -64,6 +66,7 @@ export function StandardSection({parameter: filterParameter,limit: 100,customFilters,+ additionalFilters,customTime,lite,});@@ -185,6 +188,7 @@ export function StandardSection({expanded={expanded}close={close}customFilters={customFilters}+ additionalFilters={additionalFilters}customTime={customTime}lite={lite}/>diff --git a/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx b/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsxindex bff33a921..994f7ea6c 100644--- a/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx+++ b/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx@@ -37,6 +37,7 @@ export interface StandardSectionDialogBodyProps {countLabel?: string;filterParameter: FilterParameter;customFilters?: Filter[];+ additionalFilters?: Filter[];customTime?: Time;lite?: boolean;}@@ -58,6 +59,7 @@ export function StandardSectionDialogBody({countLabel,filterParameter,customFilters,+ additionalFilters,customTime,lite = false,}: StandardSectionDialogBodyProps) {@@ -67,6 +69,7 @@ export function StandardSectionDialogBody({parameter: filterParameter,limit: 100,customFilters,+ additionalFilters,customTime,lite,});diff --git a/client/src/app/[site]/dashboards/examples.ts b/client/src/app/[site]/dashboards/examples.tsindex c3ec48c12..552c15ad7 100644--- a/client/src/app/[site]/dashboards/examples.ts+++ b/client/src/app/[site]/dashboards/examples.ts@@ -692,6 +692,142 @@ ORDER BY dead_end_rate_pct DESC, exit_sessions DESCLIMIT 50`,},+ // ── Behavior: derived insights ─────────────────────────────────────────────+ {+ id: "page-attention-between-views",+ title: "Page attention between views",+ description: "Median and p90 time until the next pageview, excluding exits and gaps over 30 minutes.",+ category: "Behavior",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH ordered_pageviews AS (+ SELECT session_id,+ pathname,+ timestamp,+ leadInFrame(timestamp, 1, toDateTime(0)) OVER (+ PARTITION BY session_id+ ORDER BY timestamp+ ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING+ ) AS next_page_at+ FROM scoped_events+ WHERE type = 'pageview' AND pathname != ''+)+SELECT pathname,+ count() AS measured_pageviews,+ round(quantile(0.5)(dateDiff('second', timestamp, next_page_at))) AS median_seconds,+ round(quantile(0.9)(dateDiff('second', timestamp, next_page_at))) AS p90_seconds+FROM ordered_pageviews+WHERE next_page_at > timestamp+ AND dateDiff('second', timestamp, next_page_at) BETWEEN 1 AND 1800+GROUP BY pathname+HAVING measured_pageviews >= 5+ORDER BY median_seconds DESC+LIMIT 50`,+ },+ {+ id: "navigation-u-turns",+ title: "Navigation U-turns",+ description: "Immediate A → B → A backtracks that can reveal confusing detours or missing information.",+ category: "Behavior",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH ordered_pageviews AS (+ SELECT session_id,+ pathname AS current_path,+ lagInFrame(pathname, 1, '') OVER (+ PARTITION BY session_id+ ORDER BY timestamp+ ROWS BETWEEN 2 PRECEDING AND CURRENT ROW+ ) AS previous_path,+ lagInFrame(pathname, 2, '') OVER (+ PARTITION BY session_id+ ORDER BY timestamp+ ROWS BETWEEN 2 PRECEDING AND CURRENT ROW+ ) AS two_back_path+ FROM scoped_events+ WHERE type = 'pageview' AND pathname != ''+)+SELECT two_back_path AS returned_to,+ previous_path AS detour,+ count() AS backtracks,+ countDistinct(session_id) AS affected_sessions+FROM ordered_pageviews+WHERE current_path = two_back_path+ AND current_path != previous_path+ AND two_back_path != ''+GROUP BY returned_to, detour+ORDER BY backtracks DESC+LIMIT 50`,+ },+ {+ id: "beyond-bounce-session-quality",+ title: "Beyond bounce: session quality",+ description:+ "Splits one-page sessions into inactive vs engaged through another tracked action or 30+ seconds of activity.",+ category: "Behavior",+ beyondPrebuilt: true,+ vizType: "pie",+ mapping: { xColumn: "session_quality", valueColumn: "sessions" },+ sql: `SELECT multiIf(+ pages > 1, 'Multi-page',+ meaningful_actions > 0 OR duration_seconds >= 30, 'Engaged single-page',+ 'Inactive single-page'+ ) AS session_quality,+ count() AS sessions+FROM (+ SELECT session_id,+ countIf(type = 'pageview') AS pages,+ countIf(type IN ('custom_event', 'outbound', 'button_click', 'copy', 'form_submit', 'input_change')) AS meaningful_actions,+ dateDiff('second', min(timestamp), max(timestamp)) AS duration_seconds+ FROM scoped_events+ GROUP BY session_id+)+WHERE pages > 0+GROUP BY session_quality+ORDER BY sessions DESC`,+ },+ {+ id: "conversion-assist-pages",+ title: "Pages associated with conversion",+ description:+ "Pages seen anywhere in converting sessions, ranked by lift over baseline. Correlation, not attribution; edit event_name.",+ category: "Behavior",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH session_rollup AS (+ SELECT session_id,+ groupUniqArrayIf(pathname, type = 'pageview' AND pathname != '') AS pages,+ maxIf(1, type = 'custom_event' AND event_name = 'signup') AS converted+ FROM scoped_events+ GROUP BY session_id+),+baseline AS (+ SELECT avg(converted) AS baseline_rate+ FROM session_rollup+),+page_sessions AS (+ SELECT session_id,+ converted,+ page+ FROM session_rollup+ ARRAY JOIN pages AS page+)+SELECT page AS pathname,+ count() AS page_sessions,+ countIf(converted = 1) AS conversions,+ round(100 * avg(converted), 1) AS conversion_rate_pct,+ round(100 * any(baseline_rate), 1) AS baseline_rate_pct,+ round(avg(converted) / nullIf(any(baseline_rate), 0), 2) AS conversion_lift+FROM page_sessions+CROSS JOIN baseline+GROUP BY pathname+HAVING page_sessions >= 10+ORDER BY conversion_lift DESC, conversions DESC+LIMIT 50`,+ },// ── Events & interactions ───────────────────────────────────────────────────{id: "custom-events-over-time",@@ -954,6 +1090,84 @@ ORDER BY clicks DESCLIMIT 50`,},+ // ── Events: derived insights ───────────────────────────────────────────────+ {+ id: "form-field-friction",+ title: "Form field friction",+ description: "Fields associated with repeat edits and sessions that never submitted the same form.",+ category: "Events",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH form_events AS (+ SELECT session_id,+ type,+ coalesce(+ nullIf(JSONExtractString(toString(props), 'formName'), ''),+ nullIf(JSONExtractString(toString(props), 'formId'), ''),+ '(unnamed form)'+ ) AS form_name,+ JSONExtractString(toString(props), 'inputName') AS field_name+ FROM scoped_events+ WHERE type IN ('input_change', 'form_submit')+),+field_edits AS (+ SELECT session_id,+ form_name,+ field_name,+ count() AS changes+ FROM form_events+ WHERE type = 'input_change' AND field_name != ''+ GROUP BY session_id, form_name, field_name+),+form_outcomes AS (+ SELECT session_id,+ form_name,+ max(type = 'form_submit') AS submitted+ FROM form_events+ GROUP BY session_id, form_name+)+SELECT form_name,+ field_name,+ count() AS editing_sessions,+ round(avg(changes), 2) AS changes_per_session,+ countIf(changes >= 3) AS repeated_edit_sessions,+ countIf(submitted = 0) AS abandoned_sessions,+ round(100 * countIf(submitted = 0) / count(), 1) AS abandonment_rate_pct+FROM field_edits+INNER JOIN form_outcomes USING (session_id, form_name)+GROUP BY form_name, field_name+HAVING editing_sessions >= 5+ORDER BY repeated_edit_sessions DESC, abandonment_rate_pct DESC+LIMIT 50`,+ },+ {+ id: "error-exposure-impact",+ title: "Error exposure impact",+ description:+ "Compares engagement and a chosen goal for sessions with vs without a JavaScript error; edit event_name.",+ category: "Events",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `SELECT if(errors > 0, 'Saw a JavaScript error', 'No JavaScript error') AS session_cohort,+ count() AS sessions,+ round(avg(pages), 2) AS pages_per_session,+ round(100 * countIf(pages = 1) / count(), 1) AS bounce_rate_pct,+ countIf(converted = 1) AS conversions,+ round(100 * countIf(converted = 1) / count(), 1) AS conversion_rate_pct+FROM (+ SELECT session_id,+ countIf(type = 'pageview') AS pages,+ countIf(type = 'error') AS errors,+ maxIf(1, type = 'custom_event' AND event_name = 'signup') AS converted+ FROM scoped_events+ GROUP BY session_id+)+WHERE pages > 0+GROUP BY session_cohort+ORDER BY session_cohort`,+ },// ── Performance ────────────────────────────────────────────────────────────{id: "web-vitals-over-time",@@ -1044,6 +1258,39 @@ ORDER BY coverage_pct ASC, pageviews DESCLIMIT 50`,},+ // ── Performance: derived insights ──────────────────────────────────────────+ {+ id: "lcp-impact-on-engagement",+ title: "LCP vs. engagement",+ description:+ "Compares bounce and a chosen goal across first-recorded LCP bands. This shows association, not causation.",+ category: "Performance",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH session_quality AS (+ SELECT session_id,+ argMinIf(lcp, timestamp, type = 'performance' AND lcp IS NOT NULL) AS first_lcp_ms,+ countIf(type = 'pageview') AS pages,+ maxIf(1, type = 'custom_event' AND event_name = 'signup') AS converted+ FROM scoped_events+ GROUP BY session_id+)+SELECT multiIf(+ first_lcp_ms <= 2500, 'Good (≤2.5s)',+ first_lcp_ms <= 4000, 'Needs improvement (2.5–4s)',+ 'Poor (>4s)'+ ) AS lcp_band,+ count() AS sessions,+ round(avg(first_lcp_ms)) AS avg_lcp_ms,+ round(avg(pages), 2) AS pages_per_session,+ round(100 * countIf(pages = 1) / count(), 1) AS bounce_rate_pct,+ round(100 * countIf(converted = 1) / count(), 1) AS conversion_rate_pct+FROM session_quality+WHERE first_lcp_ms IS NOT NULL AND pages > 0+GROUP BY lcp_band+ORDER BY min(first_lcp_ms)`,+ },// ── Marketing ──────────────────────────────────────────────────────────────{id: "utm-campaigns",@@ -1168,6 +1415,94 @@ ORDER BY time`,},// ── Power user ─────────────────────────────────────────────────────────────+ {+ id: "experiment-guardrails-by-variant",+ title: "Experiment guardrails by variant",+ description: "Post-exposure errors, LCP, and a chosen goal for an experiment. Edit the flag key and event_name.",+ category: "Power user",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `WITH first_exposures AS (+ SELECT session_id,+ argMin(JSONExtractString(toString(props), 'value'), timestamp) AS variant,+ min(timestamp) AS exposed_at+ FROM scoped_events+ WHERE type = 'custom_event'+ AND event_name = 'feature_flag_exposure'+ AND JSONExtractString(toString(props), 'key') = 'new_checkout'+ GROUP BY session_id+),+session_guardrails AS (+ SELECT x.session_id,+ x.variant,+ countIf(e.type = 'pageview' AND e.timestamp >= x.exposed_at) AS pageviews,+ countIf(e.type = 'error' AND e.timestamp >= x.exposed_at) AS errors,+ maxIf(e.lcp, e.type = 'performance' AND e.timestamp >= x.exposed_at AND e.lcp IS NOT NULL) AS lcp_ms,+ maxIf(1, e.type = 'custom_event' AND e.event_name = 'signup' AND e.timestamp >= x.exposed_at) AS converted+ FROM first_exposures x+ INNER JOIN scoped_events e ON e.session_id = x.session_id+ GROUP BY x.session_id, x.variant+)+SELECT variant,+ count() AS exposed_sessions,+ round(avg(pageviews), 2) AS pageviews_per_session,+ round(100 * countIf(errors > 0) / count(), 1) AS error_session_rate_pct,+ round(quantileIf(0.75)(lcp_ms, lcp_ms IS NOT NULL)) AS lcp_p75_ms,+ countIf(converted = 1) AS conversions,+ round(100 * countIf(converted = 1) / count(), 1) AS conversion_rate_pct+FROM session_guardrails+WHERE variant != ''+GROUP BY variant+ORDER BY exposed_sessions DESC`,+ },+ {+ id: "query-parameter-privacy-audit",+ title: "Query parameter privacy audit",+ description: "High-cardinality URL parameter keys that may contain IDs or tokens, without displaying their values.",+ category: "Power user",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `SELECT parameter,+ uniqExact(session_id) AS sessions,+ uniqExact(url_parameters[parameter]) AS distinct_values,+ round(uniqExact(url_parameters[parameter]) / nullIf(uniqExact(session_id), 0), 2) AS values_per_session+FROM scoped_events+ARRAY JOIN mapKeys(url_parameters) AS parameter+WHERE parameter != ''+GROUP BY parameter+HAVING sessions >= 5+ORDER BY values_per_session DESC, sessions DESC+LIMIT 50`,+ },+ {+ id: "duplicate-pageview-fires",+ title: "Likely duplicate pageview fires",+ description:+ "Same-session pageviews for the same path in one second, which can flag double-loaded tracking or reload loops.",+ category: "Power user",+ beyondPrebuilt: true,+ vizType: "table",+ mapping: {},+ sql: `SELECT pathname,+ sum(occurrences - 1) AS extra_pageviews,+ count() AS duplicate_clusters,+ uniqExact(session_id) AS affected_sessions+FROM (+ SELECT session_id,+ pathname,+ timestamp,+ count() AS occurrences+ FROM scoped_events+ WHERE type = 'pageview' AND pathname != ''+ GROUP BY session_id, pathname, timestamp+ HAVING occurrences > 1+)+GROUP BY pathname+ORDER BY extra_pageviews DESC+LIMIT 50`,+ },{id: "identified-users",title: "Most active identified users",diff --git a/client/src/app/[site]/replay/components/ReplayCard.tsx b/client/src/app/[site]/replay/components/ReplayCard.tsxindex 48dd56e3e..56eaf740c 100644--- a/client/src/app/[site]/replay/components/ReplayCard.tsx+++ b/client/src/app/[site]/replay/components/ReplayCard.tsx@@ -128,7 +128,7 @@ export function ReplayCard({ replay, onSelect }: { replay: SessionReplayListItem<span className="text-xs font-medium text-neutral-800 dark:text-neutral-200 truncate min-w-0">{getUserDisplayName(replay)}</span>- {replay.identified_user_id && <IdentifiedBadge traits={replay.traits} />}+ {replay.identified_user_id && <IdentifiedBadge traits={replay.traits} userId={replay.identified_user_id} />}<AlertDialog open={isDialogOpen} onOpenChange={setIsDialogOpen}><AlertDialogTrigger asChild>diff --git a/client/src/app/[site]/user/[userId]/components/DeleteUserDialog.tsx b/client/src/app/[site]/user/[userId]/components/DeleteUserDialog.tsxnew file mode 100644index 000000000..45b1ba0b6--- /dev/null+++ b/client/src/app/[site]/user/[userId]/components/DeleteUserDialog.tsx@@ -0,0 +1,69 @@+"use client";++import { useExtracted } from "next-intl";+import { useParams, useRouter } from "next/navigation";+import { toast } from "@/components/ui/sonner";++import { useDeleteUser } from "@/api/analytics/hooks/useDeleteUser";+import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+} from "@/components/ui/alert-dialog";++interface DeleteUserDialogProps {+ userId: string;+ open: boolean;+ onOpenChange: (open: boolean) => void;+}++export function DeleteUserDialog({ userId, open, onOpenChange }: DeleteUserDialogProps) {+ const t = useExtracted();+ const { site } = useParams();+ const router = useRouter();+ const deleteUser = useDeleteUser();++ const handleDelete = async () => {+ try {+ await deleteUser.mutateAsync({ userId });+ toast.success(t("User deleted"));+ onOpenChange(false);+ router.push(`/${site}/users`);+ } catch (error) {+ toast.error(error instanceof Error ? error.message : t("Failed to delete user"));+ }+ };++ return (+ <AlertDialog open={open} onOpenChange={onOpenChange}>+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogTitle>{t("Delete User")}</AlertDialogTitle>+ <AlertDialogDescription>+ {t(+ "This permanently deletes all analytics data for this user, including events, sessions, session replays, and traits across all linked devices. This action cannot be undone."+ )}+ </AlertDialogDescription>+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel>{t("Cancel")}</AlertDialogCancel>+ <AlertDialogAction+ variant="destructive"+ onClick={e => {+ e.preventDefault();+ handleDelete();+ }}+ disabled={deleteUser.isPending}+ >+ {deleteUser.isPending ? t("Deleting...") : t("Delete")}+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ );+}diff --git a/client/src/app/[site]/user/[userId]/components/IdentifyUserDialog.tsx b/client/src/app/[site]/user/[userId]/components/IdentifyUserDialog.tsxnew file mode 100644index 000000000..02ea63c0c--- /dev/null+++ b/client/src/app/[site]/user/[userId]/components/IdentifyUserDialog.tsx@@ -0,0 +1,102 @@+"use client";++import { useExtracted } from "next-intl";+import { useState } from "react";+import { toast } from "@/components/ui/sonner";++import { useIdentifyUser } from "@/api/analytics/hooks/useIdentifyUser";+import { Button } from "@/components/ui/button";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { Label } from "@/components/ui/label";++interface IdentifyUserDialogProps {+ anonymousId: string;+ open: boolean;+ onOpenChange: (open: boolean) => void;+}++export function IdentifyUserDialog({ anonymousId, open, onOpenChange }: IdentifyUserDialogProps) {+ const t = useExtracted();+ const identifyUser = useIdentifyUser();+ const [userId, setUserId] = useState("");+ const [name, setName] = useState("");+ const [email, setEmail] = useState("");++ const handleSubmit = async (e: React.FormEvent) => {+ e.preventDefault();+ const trimmedUserId = userId.trim();+ if (!trimmedUserId) return;++ const traits: Record<string, unknown> = {};+ if (name.trim()) traits.name = name.trim();+ if (email.trim()) traits.email = email.trim();++ try {+ await identifyUser.mutateAsync({+ anonymousId,+ userId: trimmedUserId,+ traits: Object.keys(traits).length > 0 ? traits : undefined,+ });+ toast.success(t("User identified"));+ onOpenChange(false);+ setUserId("");+ setName("");+ setEmail("");+ } catch (error) {+ toast.error(error instanceof Error ? error.message : t("Failed to identify user"));+ }+ };++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent className="max-w-md">+ <DialogHeader>+ <DialogTitle>{t("Identify User")}</DialogTitle>+ <DialogDescription>+ {t("Assign a user ID to this visitor. Their past activity from this device will be linked to it.")}+ </DialogDescription>+ </DialogHeader>+ <form onSubmit={handleSubmit} className="space-y-3">+ <div className="space-y-1.5">+ <Label htmlFor="identify-user-id">{t("User ID")}</Label>+ <Input+ id="identify-user-id"+ value={userId}+ onChange={e => setUserId(e.target.value)}+ maxLength={255}+ autoFocus+ required+ />+ <p className="text-xs text-muted-foreground">+ {t("The ID this person has in your own system, like an email or account ID.")}+ </p>+ </div>+ <div className="space-y-1.5">+ <Label htmlFor="identify-name">{t("Name")}</Label>+ <Input id="identify-name" value={name} onChange={e => setName(e.target.value)} />+ </div>+ <div className="space-y-1.5">+ <Label htmlFor="identify-email">{t("Email")}</Label>+ <Input id="identify-email" type="email" value={email} onChange={e => setEmail(e.target.value)} />+ </div>+ <DialogFooter>+ <Button type="button" variant="outline" onClick={() => onOpenChange(false)}>+ {t("Cancel")}+ </Button>+ <Button type="submit" variant="success" disabled={identifyUser.isPending || !userId.trim()}>+ {identifyUser.isPending ? t("Identifying...") : t("Identify")}+ </Button>+ </DialogFooter>+ </form>+ </DialogContent>+ </Dialog>+ );+}diff --git a/client/src/app/[site]/user/[userId]/components/LocationDevices.tsx b/client/src/app/[site]/user/[userId]/components/LocationDevices.tsxnew file mode 100644index 000000000..0417d5770--- /dev/null+++ b/client/src/app/[site]/user/[userId]/components/LocationDevices.tsx@@ -0,0 +1,231 @@+"use client";++import { useExtracted } from "next-intl";+import { ReactNode, useState } from "react";+import { UserDeviceBreakdown, UserInfo, UserLocationBreakdown } from "../../../../../api/analytics/endpoints";+import { getCountryName, getLanguageName } from "../../../../../lib/utils";+import { Browser } from "../../../components/shared/icons/Browser";+import { CountryFlag } from "../../../components/shared/icons/CountryFlag";+import { DeviceIcon } from "../../../components/shared/icons/Device";+import { OperatingSystem } from "../../../components/shared/icons/OperatingSystem";+import { InfoRow, InfoRowSkeleton } from "./SidebarPrimitives";++const COLLAPSED_ROWS = 4;++// Same visual grammar as StandardSection rows: bar normalized to the largest+// row, true session share printed on the right.+function ShareRow({+ icon,+ label,+ share,+ barWidth,+ title,+}: {+ icon: ReactNode;+ label: ReactNode;+ share: number;+ barWidth: number;+ title: string;+}) {+ return (+ <div className="relative h-6 flex items-center text-xs" title={title}>+ <div className="absolute inset-0 bg-dataviz opacity-25 rounded-md" style={{ width: `${barWidth}%` }} />+ <div className="z-10 mx-2 flex justify-between items-center w-full gap-2 min-w-0">+ <div className="flex items-center gap-1.5 min-w-0">+ {icon}+ <span className="truncate text-neutral-700 dark:text-neutral-200">{label}</span>+ </div>+ <span className="shrink-0 text-neutral-500 dark:text-neutral-400">{Math.round(share)}%</span>+ </div>+ </div>+ );+}++function BreakdownList<T>({+ label,+ items,+ getSessions,+ renderRow,+}: {+ label: string;+ items: T[];+ getSessions: (item: T) => number;+ renderRow: (item: T, share: number, barWidth: number) => ReactNode;+}) {+ const t = useExtracted();+ const [showAll, setShowAll] = useState(false);++ const total = items.reduce((sum, item) => sum + getSessions(item), 0);+ const max = Math.max(...items.map(getSessions));+ const visible = showAll ? items : items.slice(0, COLLAPSED_ROWS);+ const hiddenCount = items.length - COLLAPSED_ROWS;++ return (+ <div>+ <div className="text-[10px] text-neutral-500 dark:text-neutral-400 uppercase tracking-wide mt-2 mb-1">+ {label} ({items.length})+ </div>+ <div className="flex flex-col gap-1">+ {visible.map(item => renderRow(item, (getSessions(item) / total) * 100, (getSessions(item) / max) * 100))}+ </div>+ {hiddenCount > 0 && (+ <button+ type="button"+ className="mt-1 text-[11px] text-neutral-500 dark:text-neutral-400 hover:text-neutral-800 dark:hover:text-neutral-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 rounded-sm"+ onClick={() => setShowAll(prev => !prev)}+ >+ {showAll ? t("Show less") : t("+{count} more", { count: String(hiddenCount) })}+ </button>+ )}+ </div>+ );+}++function locationLabel(location: UserLocationBreakdown, getRegionName: (region: string) => string) {+ if (location.city) return location.city;+ if (location.region) return getRegionName(location.region) || location.region;+ return getCountryName(location.country) || location.country;+}++export function LocationDevices({+ data,+ isLoading,+ getRegionName,+}: {+ data: UserInfo | undefined;+ isLoading: boolean;+ getRegionName: (region: string) => string;+}) {+ const t = useExtracted();++ if (isLoading) {+ return (+ <div className="space-y-0">+ <InfoRowSkeleton labelWidth="w-14" valueWidth="w-24" withIcon />+ <InfoRowSkeleton labelWidth="w-12" valueWidth="w-32" />+ <InfoRowSkeleton labelWidth="w-16" valueWidth="w-20" />+ <InfoRowSkeleton labelWidth="w-12" valueWidth="w-14" withIcon />+ <InfoRowSkeleton labelWidth="w-14" valueWidth="w-20" withIcon />+ <InfoRowSkeleton labelWidth="w-8" valueWidth="w-24" withIcon />+ <InfoRowSkeleton labelWidth="w-12" valueWidth="w-16" />+ </div>+ );+ }++ const locations = data?.locations ?? [];+ const devices = data?.devices ?? [];+ const multiLocation = locations.length > 1;+ const multiDevice = devices.length > 1;++ return (+ <div>+ {multiLocation ? (+ <BreakdownList+ label={t("Locations")}+ items={locations}+ getSessions={location => location.sessions}+ renderRow={(location, share, barWidth) => (+ <ShareRow+ key={`${location.country}-${location.region}-${location.city}`}+ icon={<CountryFlag country={location.country} className="w-4 h-4 shrink-0" />}+ label={+ <>+ {locationLabel(location, getRegionName)}+ {location.city && location.region && (+ <span className="text-neutral-500 dark:text-neutral-400">+ {", "}+ {getRegionName(location.region)}+ </span>+ )}+ </>+ }+ share={share}+ barWidth={barWidth}+ title={`${getCountryName(location.country) || location.country} — ${t("{count} sessions", {+ count: String(location.sessions),+ })}`}+ />+ )}+ />+ ) : (+ <>+ <InfoRow+ icon={<CountryFlag country={data?.country || ""} className="w-4 h-4" />}+ label={t("Country")}+ value={data?.country ? getCountryName(data.country) : "—"}+ />+ <InfoRow+ label={t("Region")}+ value={+ <span className="truncate max-w-[160px] inline-block">+ {data?.region ? getRegionName(data.region) : "—"}+ {data?.city && `, ${data.city}`}+ </span>+ }+ />+ </>+ )}++ <InfoRow label={t("Language")} value={data?.language ? getLanguageName(data.language) : "—"} />++ {multiDevice ? (+ <BreakdownList+ label={t("Devices")}+ items={devices}+ getSessions={device => device.sessions}+ renderRow={(device, share, barWidth) => (+ <ShareRow+ key={`${device.device_type}-${device.browser}-${device.operating_system}`}+ icon={+ <span className="flex items-center gap-1 shrink-0">+ <DeviceIcon deviceType={device.device_type} size={13} />+ <Browser browser={device.browser || "Unknown"} size={13} />+ <OperatingSystem os={device.operating_system} size={13} />+ </span>+ }+ label={[device.browser, device.operating_system].filter(Boolean).join(" · ") || device.device_type}+ share={share}+ barWidth={barWidth}+ title={[+ device.device_type,+ device.browser && `${device.browser}${device.browser_version ? ` v${device.browser_version}` : ""}`,+ device.operating_system &&+ `${device.operating_system}${device.operating_system_version ? ` v${device.operating_system_version}` : ""}`,+ device.screen_width && device.screen_height && `${device.screen_width}×${device.screen_height}`,+ t("{count} sessions", { count: String(device.sessions) }),+ ]+ .filter(Boolean)+ .join(" · ")}+ />+ )}+ />+ ) : (+ <>+ <InfoRow+ icon={<DeviceIcon deviceType={data?.device_type || ""} size={13} />}+ label={t("Device")}+ value={data?.device_type ?? "—"}+ />+ <InfoRow+ icon={<Browser browser={data?.browser || "Unknown"} size={13} />}+ label={t("Browser")}+ value={data?.browser ? `${data.browser}${data.browser_version ? ` v${data.browser_version}` : ""}` : "—"}+ />+ <InfoRow+ icon={<OperatingSystem os={data?.operating_system || ""} size={13} />}+ label={t("OS")}+ value={+ data?.operating_system+ ? `${data.operating_system}${data.operating_system_version ? ` v${data.operating_system_version}` : ""}`+ : "—"+ }+ />+ <InfoRow+ label={t("Screen")}+ value={data?.screen_width && data?.screen_height ? `${data.screen_width}×${data.screen_height}` : "—"}+ />+ </>+ )}+ </div>+ );+}diff --git a/client/src/app/[site]/user/[userId]/components/SidebarPrimitives.tsx b/client/src/app/[site]/user/[userId]/components/SidebarPrimitives.tsxnew file mode 100644index 000000000..b2e65152d--- /dev/null+++ b/client/src/app/[site]/user/[userId]/components/SidebarPrimitives.tsx@@ -0,0 +1,77 @@+import { ReactNode } from "react";+import { Skeleton } from "../../../../../components/ui/skeleton";++// Reusable card wrapper for sidebar sections+export function SidebarCard({ children, className = "" }: { children: ReactNode; className?: string }) {+ return (+ <div+ className={`bg-white dark:bg-neutral-900 rounded-lg border border-neutral-100 dark:border-neutral-850 p-4 ${className}`}+ >+ {children}+ </div>+ );+}++// Info row component for consistent styling+export function InfoRow({ icon, label, value }: { icon?: ReactNode; label: ReactNode; value: ReactNode }) {+ return (+ <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850 last:border-0 text-xs">+ <span className="text-neutral-500 dark:text-neutral-400">{label}</span>+ <span className="text-neutral-700 dark:text-neutral-200 flex items-center gap-1.5">+ {icon}+ {value}+ </span>+ </div>+ );+}++// Skeleton matching InfoRow's shape, for card loading states+export function InfoRowSkeleton({ labelWidth = "w-14", valueWidth = "w-24", withIcon = false }: {+ labelWidth?: string;+ valueWidth?: string;+ withIcon?: boolean;+}) {+ return (+ <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850 last:border-0">+ <Skeleton className={`h-3 ${labelWidth} rounded`} />+ <div className="flex items-center gap-1.5">+ {withIcon && <Skeleton className="w-4 h-4 rounded" />}+ <Skeleton className={`h-3 ${valueWidth} rounded`} />+ </div>+ </div>+ );+}++// Stat card component+export function StatCard({+ icon,+ label,+ value,+ isLoading,+}: {+ icon: ReactNode;+ label: string;+ value: ReactNode;+ isLoading: boolean;+}) {+ if (isLoading) {+ return (+ <div className="flex flex-col gap-0.5">+ <div className="text-[10px] text-neutral-500 dark:text-neutral-400 flex items-center gap-1 uppercase tracking-wide">+ <Skeleton className="w-3 h-3 rounded" />+ <Skeleton className="h-2.5 w-14 rounded" />+ </div>+ <Skeleton className="h-4 w-16 rounded" />+ </div>+ );+ }+ return (+ <div className="flex flex-col gap-0.5">+ <div className="text-[10px] text-neutral-500 dark:text-neutral-400 flex items-center gap-1 uppercase tracking-wide">+ {icon}+ {label}+ </div>+ <div className="text-sm">{value}</div>+ </div>+ );+}diff --git a/client/src/app/[site]/user/[userId]/components/UserActions.tsx b/client/src/app/[site]/user/[userId]/components/UserActions.tsxnew file mode 100644index 000000000..b24d2a20e--- /dev/null+++ b/client/src/app/[site]/user/[userId]/components/UserActions.tsx@@ -0,0 +1,46 @@+"use client";++import { useExtracted } from "next-intl";+import { Trash2, UserPlus } from "lucide-react";+import { useState } from "react";++import { UserInfo } from "@/api/analytics/endpoints";+import { Button } from "@/components/ui/button";+import { DeleteUserDialog } from "./DeleteUserDialog";+import { IdentifyUserDialog } from "./IdentifyUserDialog";++interface UserActionsProps {+ userId: string;+ data: UserInfo;+}++export function UserActions({ userId, data }: UserActionsProps) {+ const t = useExtracted();+ const [identifyOpen, setIdentifyOpen] = useState(false);+ const [deleteOpen, setDeleteOpen] = useState(false);++ const isIdentified = !!data.identified_user_id;++ return (+ <div className="flex items-center gap-1">+ {!isIdentified && (+ <Button size="sm" onClick={() => setIdentifyOpen(true)}>+ <UserPlus className="h-3.5 w-3.5 mr-1.5" />+ {t("Identify User")}+ </Button>+ )}+ <Button+ variant="ghost"+ size="smIcon"+ aria-label={t("Delete User")}+ className="text-neutral-500 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400"+ onClick={() => setDeleteOpen(true)}+ >+ <Trash2 className="w-3.5 h-3.5" />+ </Button>++ <IdentifyUserDialog anonymousId={data.user_id || userId} open={identifyOpen} onOpenChange={setIdentifyOpen} />+ <DeleteUserDialog userId={userId} open={deleteOpen} onOpenChange={setDeleteOpen} />+ </div>+ );+}diff --git a/client/src/app/[site]/user/[userId]/components/UserSidebar.tsx b/client/src/app/[site]/user/[userId]/components/UserSidebar.tsxindex 2a3f83b47..fb23d522a 100644--- a/client/src/app/[site]/user/[userId]/components/UserSidebar.tsx+++ b/client/src/app/[site]/user/[userId]/components/UserSidebar.tsx@@ -2,23 +2,34 @@import { useExtracted } from "next-intl";import { getTimezone } from "@/lib/store";-import { Calendar, CalendarCheck, Clock, Files, Globe, Laptop, Monitor, Smartphone, Tablet } from "lucide-react";+import { Calendar, CalendarCheck, Clock, Files, Globe, Laptop, Monitor, Pencil, Smartphone, Tablet } from "lucide-react";import { DateTime } from "luxon";+import { useState } from "react";import { Avatar, generateName } from "../../../../../components/Avatar";import { Badge } from "../../../../../components/ui/badge";-import { Skeleton } from "../../../../../components/ui/skeleton";+import { Button } from "../../../../../components/ui/button";import { IdentifiedBadge } from "../../../../../components/IdentifiedBadge";import { useDateTimeFormat } from "../../../../../hooks/useDateTimeFormat";import { formatDuration } from "../../../../../lib/dateTimeUtils";-import { getCountryName, getLanguageName } from "../../../../../lib/utils";-import { Browser } from "../../../components/shared/icons/Browser";-import { CountryFlag } from "../../../components/shared/icons/CountryFlag";-import { OperatingSystem } from "../../../components/shared/icons/OperatingSystem";import { VisitCalendar } from "./Calendar";import { EventIcon, PageviewIcon } from "../../../../../components/EventIcons";import { UserInfo, UserSessionCountResponse } from "../../../../../api/analytics/endpoints";-import { DeviceIcon } from "../../../components/shared/icons/Device";+import { ChannelIcon, extractDomain, getDisplayName } from "../../../../../components/Channel";+import { Favicon } from "../../../../../components/Favicon";+import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../../components/ui/tooltip";import { useConfigs } from "../../../../../lib/configs";+import { userStore } from "../../../../../lib/userStore";+import { PerformanceMetric } from "../../../performance/performanceStore";+import {+ formatMetricValue,+ getMetricColor,+ getMetricUnit,+ METRIC_LABELS,+ METRIC_LABELS_SHORT,+} from "../../../performance/utils/performanceUtils";+import { EditTraitsDialog } from "../../../../../components/EditTraitsDialog";+import { LocationDevices } from "./LocationDevices";+import { InfoRow, InfoRowSkeleton, SidebarCard, StatCard } from "./SidebarPrimitives";import { UserLocationMap } from "./UserLocationMap";interface UserSidebarProps {@@ -28,68 +39,14 @@ interface UserSidebarProps {getRegionName: (region: string) => string;}-// Reusable card wrapper for sidebar sections-function SidebarCard({ children, className = "" }: { children: React.ReactNode; className?: string }) {- return (- <div- className={`bg-white dark:bg-neutral-900 rounded-lg border border-neutral-100 dark:border-neutral-850 p-4 ${className}`}- >- {children}- </div>- );-}--// Info row component for consistent styling-function InfoRow({ icon, label, value }: { icon?: React.ReactNode; label: string; value: React.ReactNode }) {- return (- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850 last:border-0 text-xs">- <span className="text-neutral-500 dark:text-neutral-400">{label}</span>- <span className="text-neutral-700 dark:text-neutral-200 flex items-center gap-1.5">- {icon}- {value}- </span>- </div>- );-}--// Stat card component-function StatCard({- icon,- label,- value,- isLoading,-}: {- icon: React.ReactNode;- label: string;- value: React.ReactNode;- isLoading: boolean;-}) {- if (isLoading) {- return (- <div className="flex flex-col gap-0.5">- <div className="text-[10px] text-neutral-500 dark:text-neutral-400 flex items-center gap-1 uppercase tracking-wide">- <Skeleton className="w-3 h-3 rounded" />- <Skeleton className="h-2.5 w-14 rounded" />- </div>- <Skeleton className="h-4 w-16 rounded" />- </div>- );- }- return (- <div className="flex flex-col gap-0.5">- <div className="text-[10px] text-neutral-500 dark:text-neutral-400 flex items-center gap-1 uppercase tracking-wide">- {icon}- {label}- </div>- <div className="text-sm">{value}</div>- </div>- );-}+const VITALS_ORDER: PerformanceMetric[] = ["lcp", "cls", "inp", "fcp", "ttfb"];export function UserSidebar({ data, isLoading, sessionCount, getRegionName }: UserSidebarProps) {const t = useExtracted();const { formatRelative } = useDateTimeFormat();const { configs } = useConfigs();+ const { user } = userStore();+ const [traitsOpen, setTraitsOpen] = useState(false);const isIdentified = !!data?.identified_user_id;// Filter custom traits (exclude username, name, email)@@ -97,6 +54,13 @@ export function UserSidebar({ data, isLoading, sessionCount, getRegionName }: Us? Object.entries(data.traits).filter(([key]) => !["username", "name", "email"].includes(key)): [];+ const firstReferrerDomain = data?.first_referrer ? extractDomain(data.first_referrer) : null;+ const channelChanged = !!data?.last_channel && data.last_channel !== data.first_channel;+ const vitals = data?.vitals ?? null;+ const vitalsToShow = vitals+ ? VITALS_ORDER.filter(metric => vitals[`${metric}_p75`] != null)+ : [];+return (<div className="w-full lg:w-[300px] md:shrink-0 space-y-3">{/* Stats Grid */}@@ -149,107 +113,78 @@ export function UserSidebar({ data, isLoading, sessionCount, getRegionName }: Us</div></SidebarCard>- {/* Location & Device Info */}+ {/* Acquisition (first-touch attribution) */}<SidebarCard><h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide mb-2">- {t("Location & Device")}+ {t("Acquisition")}</h3>{isLoading ? (- <div className="space-y-0">- {/* Country */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-14 rounded" />- <div className="flex items-center gap-1.5">- <Skeleton className="w-4 h-4 rounded" />- <Skeleton className="h-3 w-24 rounded" />- </div>- </div>- {/* Region */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-12 rounded" />- <Skeleton className="h-3 w-32 rounded" />- </div>- {/* Language */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-16 rounded" />- <Skeleton className="h-3 w-20 rounded" />- </div>- {/* Device */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-12 rounded" />- <div className="flex items-center gap-1.5">- <Skeleton className="w-4 h-4 rounded" />- <Skeleton className="h-3 w-14 rounded" />- </div>- </div>- {/* Browser */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-14 rounded" />- <div className="flex items-center gap-1.5">- <Skeleton className="w-4 h-4 rounded" />- <Skeleton className="h-3 w-20 rounded" />- </div>- </div>- {/* OS */}- <div className="flex items-center justify-between py-1.5 border-b border-neutral-50 dark:border-neutral-850">- <Skeleton className="h-3 w-8 rounded" />- <div className="flex items-center gap-1.5">- <Skeleton className="w-4 h-4 rounded" />- <Skeleton className="h-3 w-24 rounded" />- </div>- </div>- {/* Screen */}- <div className="flex items-center justify-between py-1.5">- <Skeleton className="h-3 w-12 rounded" />- <Skeleton className="h-3 w-16 rounded" />- </div>+ <div>+ <InfoRowSkeleton labelWidth="w-14" valueWidth="w-24" withIcon />+ <InfoRowSkeleton labelWidth="w-12" valueWidth="w-20" withIcon />+ <InfoRowSkeleton labelWidth="w-16" valueWidth="w-28" /></div>) : (<div><InfoRow- icon={<CountryFlag country={data?.country || ""} className="w-4 h-4" />}- label={t("Country")}- value={data?.country ? getCountryName(data.country) : "—"}- />- <InfoRow- label={t("Region")}- value={- <span className="truncate max-w-[160px] inline-block">- {data?.region ? getRegionName(data.region) : "—"}- {data?.city && `, ${data.city}`}- </span>- }- />- <InfoRow label={t("Language")} value={data?.language ? getLanguageName(data.language) : "—"} />- <InfoRow- icon={- <DeviceIcon deviceType={data?.device_type || ""} size={13} />- }- label={t("Device")}- value={data?.device_type ?? "—"}+ icon={data?.first_channel ? <ChannelIcon channel={data.first_channel} className="w-3.5 h-3.5" /> : undefined}+ label={t("Channel")}+ value={data?.first_channel || "—"}/><InfoRow- icon={<Browser browser={data?.browser || "Unknown"} size={13} />}- label={t("Browser")}- value={data?.browser ? `${data.browser}${data.browser_version ? ` v${data.browser_version}` : ""}` : "—"}+ icon={firstReferrerDomain ? <Favicon domain={firstReferrerDomain} className="w-3.5 h-3.5" /> : undefined}+ label={t("Referrer")}+ value={firstReferrerDomain ? getDisplayName(firstReferrerDomain) : "—"}/><InfoRow- icon={<OperatingSystem os={data?.operating_system || ""} size={13} />}- label={t("OS")}+ label={t("Landing page")}value={- data?.operating_system- ? `${data.operating_system}${data.operating_system_version ? ` v${data.operating_system_version}` : ""}`- : "—"+ data?.first_entry_page ? (+ <span className="truncate max-w-[160px] inline-block" title={data.first_entry_page}>+ {data.first_entry_page}+ </span>+ ) : (+ "—"+ )}/>- <InfoRow- label={t("Screen")}- value={data?.screen_width && data?.screen_height ? `${data.screen_width}×${data.screen_height}` : "—"}- />+ {data?.first_utm_source && (+ <InfoRow+ label={t("Source")}+ value={<span className="truncate max-w-[160px] inline-block">{data.first_utm_source}</span>}+ />+ )}+ {data?.first_utm_medium && (+ <InfoRow+ label={t("Medium")}+ value={<span className="truncate max-w-[160px] inline-block">{data.first_utm_medium}</span>}+ />+ )}+ {data?.first_utm_campaign && (+ <InfoRow+ label={t("Campaign")}+ value={<span className="truncate max-w-[160px] inline-block">{data.first_utm_campaign}</span>}+ />+ )}+ {channelChanged && (+ <InfoRow+ icon={<ChannelIcon channel={data.last_channel} className="w-3.5 h-3.5" />}+ label={t("Latest channel")}+ value={data.last_channel}+ />+ )}</div>)}</SidebarCard>+ {/* Location & Device Info */}+ <SidebarCard>+ <h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide mb-2">+ {t("Location & Device")}+ </h3>+ <LocationDevices data={data} isLoading={isLoading} getRegionName={getRegionName} />+ </SidebarCard>+{/* Activity Calendar */}<SidebarCard className="h-[180px]"><h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide mb-2">@@ -260,23 +195,82 @@ export function UserSidebar({ data, isLoading, sessionCount, getRegionName }: Us</div></SidebarCard>+ {/* Web Vitals (p75 across this user's performance events) */}+ {vitals && vitalsToShow.length > 0 && (+ <SidebarCard>+ <div className="flex items-center justify-between mb-2">+ <h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide">+ {t("Web Vitals")}+ </h3>+ <span className="text-[10px] text-neutral-400 dark:text-neutral-500 uppercase tracking-wide">p75</span>+ </div>+ <div>+ {vitalsToShow.map(metric => {+ const value = vitals[`${metric}_p75`] as number;+ return (+ <InfoRow+ key={metric}+ label={+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="cursor-default">{METRIC_LABELS_SHORT[metric]}</span>+ </TooltipTrigger>+ <TooltipContent>{METRIC_LABELS[metric]}</TooltipContent>+ </Tooltip>+ }+ value={+ <span className={getMetricColor(metric, value)}>+ {formatMetricValue(metric, value)}+ {getMetricUnit(metric, value)}+ </span>+ }+ />+ );+ })}+ </div>+ </SidebarCard>+ )}+{/* User Traits (identified users only) */}- {isIdentified && customTraits.length > 0 && (+ {isIdentified && data && (customTraits.length > 0 || !!user) && (<SidebarCard>- <h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide mb-2">- {t("User Traits")}- </h3>- <div className="space-y-1">- {customTraits.map(([key, value]) => (- <div- key={key}- className="flex items-center justify-between py-1 border-b border-neutral-50 dark:border-neutral-850 last:border-0 text-xs"+ <div className="flex items-center justify-between mb-2">+ <h3 className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide">+ {t("User Traits")}+ </h3>+ {user && (+ <Button+ variant="ghost"+ size="smIcon"+ className="-my-1.5 -mr-1.5 h-6 w-6 text-neutral-500"+ aria-label={t("Edit Traits")}+ onClick={() => setTraitsOpen(true)}>- <span className="text-neutral-500 dark:text-neutral-400 capitalize">{key.replace(/_/g, " ")}</span>- <span className="text-neutral-700 dark:text-neutral-200 truncate max-w-[160px]">{String(value)}</span>- </div>- ))}+ <Pencil className="w-3 h-3" />+ </Button>+ )}</div>+ {customTraits.length > 0 ? (+ <div className="space-y-1">+ {customTraits.map(([key, value]) => (+ <div+ key={key}+ className="flex items-center justify-between py-1 border-b border-neutral-50 dark:border-neutral-850 last:border-0 text-xs"+ >+ <span className="text-neutral-500 dark:text-neutral-400 capitalize">{key.replace(/_/g, " ")}</span>+ <span className="text-neutral-700 dark:text-neutral-200 truncate max-w-[160px]">{String(value)}</span>+ </div>+ ))}+ </div>+ ) : (+ <p className="text-xs text-neutral-400 dark:text-neutral-500">{t("No traits yet")}</p>+ )}+ <EditTraitsDialog+ userId={data.identified_user_id}+ traits={data.traits}+ open={traitsOpen}+ onOpenChange={setTraitsOpen}+ /></SidebarCard>)}diff --git a/client/src/app/[site]/user/[userId]/components/UserTopPages.tsx b/client/src/app/[site]/user/[userId]/components/UserTopPages.tsxindex 0bcc38384..552886f27 100644--- a/client/src/app/[site]/user/[userId]/components/UserTopPages.tsx+++ b/client/src/app/[site]/user/[userId]/components/UserTopPages.tsx@@ -22,10 +22,8 @@ export function UserTopPages({ userId }: { userId: string }) {<div className="flex flex-row gap-2 items-center"><TabsList><TabsTrigger value="pages">{t("Top Pages")}</TabsTrigger>+ <TabsTrigger value="events">{t("Events")}</TabsTrigger></TabsList>- {/* <TabsList>- <TabsTrigger value="events">Events</TabsTrigger>- </TabsList> */}</div><TabsContent value="pages"><StandardSection@@ -38,33 +36,18 @@ export function UserTopPages({ userId }: { userId: string }) {const host = e.hostname || siteMetadata?.domain;return host ? `https://${host}${e.value}` : "#";}}- expanded={false}- close={close}- customFilters={[{ parameter: "user_id", value: [userId], type: "equals" }]}- customTime={{- mode: "all-time",- wellKnown: "all-time",- }}+ additionalFilters={[{ parameter: "user_id", value: [userId], type: "equals" }]}/></TabsContent><TabsContent value="events"><StandardSection- filterParameter="pathname"- title={t("Pages")}+ filterParameter="event_name"+ title={t("Events")}+ countLabel={t("Count")}getValue={e => e.value}getKey={e => e.value}getLabel={e => truncateString(e.value, 50) || "Other"}- getLink={e => {- const host = e.hostname || siteMetadata?.domain;- return host ? `https://${host}${e.value}` : "#";- }}- expanded={false}- close={close}- customFilters={[{ parameter: "user_id", value: [userId], type: "equals" }]}- customTime={{- mode: "all-time",- wellKnown: "all-time",- }}+ additionalFilters={[{ parameter: "user_id", value: [userId], type: "equals" }]}/></TabsContent></Tabs>diff --git a/client/src/app/[site]/user/[userId]/page.tsx b/client/src/app/[site]/user/[userId]/page.tsxindex 2304c4ec1..009052a96 100644--- a/client/src/app/[site]/user/[userId]/page.tsx+++ b/client/src/app/[site]/user/[userId]/page.tsx@@ -1,12 +1,20 @@"use client";-import { useExtracted } from "next-intl";+import { useExtracted, useLocale } from "next-intl";import { SessionsList } from "@/components/Sessions/SessionsList";+import { ChevronLeft, ChevronRight, Clock } from "lucide-react";+import { DateTime } from "luxon";import Link from "next/link";import { useParams } from "next/navigation";import { useState } from "react";import { useUserInfo } from "../../../../api/analytics/hooks/userGetInfo";import { useGetSessions, useGetUserSessionCount } from "../../../../api/analytics/hooks/useGetUserSessions";+import { DateSelector } from "../../../../components/DateSelector/DateSelector";+import { Button } from "../../../../components/ui/button";+import { canGoForward, goBack, goForward, useStore } from "../../../../lib/store";+import { USER_DETAIL_PAGE_FILTERS } from "../../../../lib/filterGroups";+import { Filters } from "../../components/SubHeader/Filters/Filters";+import { NewFilterButton } from "../../components/SubHeader/Filters/NewFilterButton";import {Breadcrumb,BreadcrumbItem,@@ -17,7 +25,9 @@ import {} from "../../../../components/ui/breadcrumb";import { useSetPageTitle } from "../../../../hooks/useSetPageTitle";import { useGetRegionName } from "../../../../lib/geo";+import { userStore } from "../../../../lib/userStore";import { MobileSidebar } from "../../components/Sidebar/MobileSidebar";+import { UserActions } from "./components/UserActions";import { UserSidebar } from "./components/UserSidebar";import { Skeleton } from "../../../../components/ui/skeleton";import { Avatar, generateName } from "../../../../components/Avatar";@@ -31,7 +41,10 @@ export default function UserPage() {useSetPageTitle("User");const t = useExtracted();+ const locale = useLocale();const { userId: rawUserId, site } = useParams();+ const { user } = userStore();+ const { time, setTime } = useStore();const userId = (() => {const value = Array.isArray(rawUserId) ? rawUserId[0] : rawUserId;if (!value) return "";@@ -62,28 +75,62 @@ export default function UserPage() {const traitsName = data?.traits?.name as string | undefined;const traitsEmail = data?.traits?.email as string | undefined;const isIdentified = !!data?.identified_user_id;- const displayName =- traitsUsername || traitsName || (isIdentified ? userId : generateName(userId));+ const displayName = traitsUsername || traitsName || (isIdentified ? userId : generateName(userId));++ // The user's clock, from the timezone captured on their latest event+ const localTime = data?.timezone ? DateTime.now().setZone(data.timezone) : null;+ const localTimeValid = localTime?.isValid ? localTime : null;+ const timezoneCity = data?.timezone?.split("/").pop()?.replace(/_/g, " ");return (<div className="p-2 md:p-4 max-w-[1200px] mx-auto">+ <Breadcrumb className="min-w-0">+ <BreadcrumbList className="flex-nowrap">+ <BreadcrumbItem>+ <BreadcrumbLink asChild>+ <Link href={`/${site}/users`}>{t("Users")}</Link>+ </BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem className="min-w-0">+ <BreadcrumbPage className="truncate">{isLoading ? t("Loading...") : displayName}</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>{/* Header */}- <div className="flex items-center gap-2 mb-4">+ <div className="flex items-center gap-2 mt-2 mb-3"><MobileSidebar />- <Breadcrumb>- <BreadcrumbList>- <BreadcrumbItem>- <BreadcrumbLink asChild>- <Link href={`/${site}/users`}>{t("Users")}</Link>- </BreadcrumbLink>- </BreadcrumbItem>- <BreadcrumbSeparator />- <BreadcrumbItem>- <BreadcrumbPage>{isLoading ? t("Loading...") : displayName}</BreadcrumbPage>- </BreadcrumbItem>- </BreadcrumbList>- </Breadcrumb>+ <div className="hidden md:block">+ <NewFilterButton availableFilters={USER_DETAIL_PAGE_FILTERS} />+ </div>+ <div className="ml-auto flex items-center gap-2 shrink-0">+ <DateSelector time={time} setTime={setTime} />+ <div className="flex items-center">+ <Button+ variant="secondary"+ size="icon"+ onClick={goBack}+ disabled={time.mode === "past-minutes"}+ className="rounded-r-none h-8 w-8"+ >+ <ChevronLeft />+ </Button>+ <Button+ variant="secondary"+ size="icon"+ onClick={goForward}+ disabled={!canGoForward(time)}+ className="rounded-l-none -ml-px h-8 w-8"+ >+ <ChevronRight />+ </Button>+ </div>+ </div>+ </div>+ <div className="md:hidden mb-2">+ <NewFilterButton availableFilters={USER_DETAIL_PAGE_FILTERS} /></div>+ <Filters availableFilters={USER_DETAIL_PAGE_FILTERS} /><div className="flex items-center gap-4 mb-4"><Avatar size={64} id={userId} />@@ -91,7 +138,9 @@ export default function UserPage() {<div><div className="font-semibold text-lg flex items-center gap-2">{isLoading ? <Skeleton className="h-6 w-32" /> : displayName}- {!isLoading && isIdentified && <IdentifiedBadge traits={data?.traits} />}+ {!isLoading && isIdentified && (+ <IdentifiedBadge traits={data?.traits} userId={data?.identified_user_id} />+ )}</div>{isLoading ? (<div className="flex flex-col items-center gap-1 mt-1">@@ -106,13 +155,25 @@ export default function UserPage() {)}</div></div>- {data?.ip && (- <div>+ <div className="ml-auto flex items-center gap-2">+ {localTimeValid && (+ <Badge+ variant="outline"+ className="text-xs whitespace-nowrap"+ title={`${t("Local time")} · ${data?.timezone}`}+ >+ <Clock className="w-3 h-3 mr-1 text-neutral-400 dark:text-neutral-500" />+ {localTimeValid.setLocale(locale).toLocaleString(DateTime.TIME_SIMPLE)}+ {timezoneCity && <span className="text-neutral-400 dark:text-neutral-500 ml-1">{timezoneCity}</span>}+ </Badge>+ )}+ {data?.ip && (<Badge variant="outline" className="text-xs whitespace-nowrap">IP: {data.ip}</Badge>- </div>- )}+ )}+ {user && data && <UserActions userId={userId} data={data} />}+ </div></div>{/* Main two-column layout */}diff --git a/client/src/app/[site]/users/components/TraitValueUsersList.tsx b/client/src/app/[site]/users/components/TraitValueUsersList.tsxindex 63e10abe8..78b8efd90 100644--- a/client/src/app/[site]/users/components/TraitValueUsersList.tsx+++ b/client/src/app/[site]/users/components/TraitValueUsersList.tsx@@ -146,7 +146,7 @@ export function TraitValueUsersList({</span></Link><div className="flex items-center gap-1.5 shrink-0">- {isIdentified && <IdentifiedBadge traits={user.traits} />}+ {isIdentified && <IdentifiedBadge traits={user.traits} userId={user.identified_user_id} />}<CountryFlagTooltipIconcountry={user.country || ""}city={user.city || ""}diff --git a/client/src/app/[site]/users/components/UsersTable.tsx b/client/src/app/[site]/users/components/UsersTable.tsxindex 2fa3d9a0e..81111dbe3 100644--- a/client/src/app/[site]/users/components/UsersTable.tsx+++ b/client/src/app/[site]/users/components/UsersTable.tsx@@ -148,7 +148,7 @@ export function UsersTable() {<span className="max-w-32 truncate hover:underline" title={displayName}>{displayName}</span>- {isIdentified && <IdentifiedBadge traits={info.row.original.traits} />}+ {isIdentified && <IdentifiedBadge traits={info.row.original.traits} userId={identifiedUserId} />}</Link>);},diff --git a/client/src/components/EditTraitsDialog.tsx b/client/src/components/EditTraitsDialog.tsxnew file mode 100644index 000000000..ad9d00f39--- /dev/null+++ b/client/src/components/EditTraitsDialog.tsx@@ -0,0 +1,235 @@+"use client";++import { useExtracted } from "next-intl";+import { Plus, Trash2 } from "lucide-react";+import { useEffect, useState } from "react";+import { toast } from "@/components/ui/sonner";++import { useUpdateUserTraits } from "@/api/analytics/hooks/useUpdateUserTraits";+import { Button } from "@/components/ui/button";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { Textarea } from "@/components/ui/textarea";++interface EditTraitsDialogProps {+ userId: string;+ traits: Record<string, unknown> | null;+ open: boolean;+ onOpenChange: (open: boolean) => void;+}++interface TraitRow {+ key: string;+ value: string;+}++type EditorMode = "fields" | "json";++// Traits can hold non-string values (numbers, booleans, objects); edit them as+// their JSON representation so they round-trip.+function serializeTraitValue(value: unknown): string {+ return typeof value === "string" ? value : JSON.stringify(value);+}++function parseTraitValue(raw: string): unknown {+ const trimmed = raw.trim();+ if (trimmed === "") return "";+ try {+ return JSON.parse(trimmed);+ } catch {+ return raw;+ }+}++function traitsToRows(traits: Record<string, unknown> | null): TraitRow[] {+ return Object.entries(traits ?? {}).map(([key, value]) => ({ key, value: serializeTraitValue(value) }));+}++// Untouched rows keep the baseline value (and its type); edited ones are parsed+function rowsToTraits(rows: TraitRow[], baseline: Record<string, unknown>): Record<string, unknown> {+ const result: Record<string, unknown> = {};+ for (const row of rows) {+ const key = row.key.trim();+ if (!key) continue;+ result[key] =+ key in baseline && serializeTraitValue(baseline[key]) === row.value ? baseline[key] : parseTraitValue(row.value);+ }+ return result;+}++export function EditTraitsDialog({ userId, traits, open, onOpenChange }: EditTraitsDialogProps) {+ const t = useExtracted();+ const updateTraits = useUpdateUserTraits();+ const [rows, setRows] = useState<TraitRow[]>([]);+ // Reference for type preservation of untouched values; starts as the stored+ // traits and is replaced by the parsed object after a JSON -> fields switch+ const [baseline, setBaseline] = useState<Record<string, unknown>>({});+ const [mode, setMode] = useState<EditorMode>("fields");+ const [jsonText, setJsonText] = useState("");+ const [jsonError, setJsonError] = useState(false);++ // `open` is controlled by the parent, so onOpenChange never fires for the+ // opening transition — sync state from the current traits whenever it opens.+ // Deliberately not keyed on `traits`: a background refetch while the dialog+ // is open must not clobber in-progress edits.+ useEffect(() => {+ if (open) {+ const initial = traitsToRows(traits);+ setRows(initial.length > 0 ? initial : [{ key: "", value: "" }]);+ setBaseline(traits ?? {});+ setMode("fields");+ setJsonError(false);+ }+ }, [open]);++ const updateRow = (index: number, field: keyof TraitRow, value: string) => {+ setRows(prev => prev.map((row, i) => (i === index ? { ...row, [field]: value } : row)));+ };++ const parseJsonTraits = (): Record<string, unknown> | null => {+ try {+ const parsed = JSON.parse(jsonText);+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return null;+ return parsed as Record<string, unknown>;+ } catch {+ return null;+ }+ };++ const switchMode = (next: EditorMode) => {+ if (next === mode) return;+ if (next === "json") {+ setJsonText(JSON.stringify(rowsToTraits(rows, baseline), null, 2));+ setJsonError(false);+ setMode("json");+ } else {+ const parsed = parseJsonTraits();+ if (!parsed) {+ setJsonError(true);+ return;+ }+ const nextRows = traitsToRows(parsed);+ setRows(nextRows.length > 0 ? nextRows : [{ key: "", value: "" }]);+ setBaseline(parsed);+ setJsonError(false);+ setMode("fields");+ }+ };++ const handleSave = async () => {+ let result: Record<string, unknown>;+ if (mode === "json") {+ const parsed = parseJsonTraits();+ if (!parsed) {+ setJsonError(true);+ return;+ }+ result = parsed;+ } else {+ result = rowsToTraits(rows, baseline);+ }++ try {+ await updateTraits.mutateAsync({ userId, traits: result });+ toast.success(t("Traits updated"));+ onOpenChange(false);+ } catch (error) {+ toast.error(error instanceof Error ? error.message : t("Failed to update traits"));+ }+ };++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent className="max-w-lg">+ <DialogHeader>+ <DialogTitle>{t("Edit Traits")}</DialogTitle>+ <DialogDescription>{t("Add, edit, or remove attributes attached to this user.")}</DialogDescription>+ </DialogHeader>+ <Tabs value={mode} onValueChange={value => switchMode(value as EditorMode)}>+ <TabsList className="h-7 p-0.5">+ <TabsTrigger value="fields" className="h-6 px-2 py-0 text-xs">+ {t("Fields")}+ </TabsTrigger>+ <TabsTrigger value="json" className="h-6 px-2 py-0 text-xs">+ JSON+ </TabsTrigger>+ </TabsList>+ </Tabs>+ {mode === "fields" ? (+ // Negative margin + matching padding keeps the inputs' focus rings+ // from being clipped by the scroll container+ <div className="space-y-2 max-h-[50vh] overflow-y-auto -m-1 p-1">+ {rows.map((row, index) => (+ <div key={index} className="flex items-center gap-2">+ <Input+ value={row.key}+ onChange={e => updateRow(index, "key", e.target.value)}+ placeholder={t("Key")}+ aria-label={t("Key")}+ className="flex-1"+ />+ <Input+ value={row.value}+ onChange={e => updateRow(index, "value", e.target.value)}+ placeholder={t("Value")}+ aria-label={t("Value")}+ className="flex-1"+ />+ <Button+ type="button"+ variant="ghost"+ size="smIcon"+ onClick={() => setRows(prev => prev.filter((_, i) => i !== index))}+ aria-label={t("Remove trait")}+ >+ <Trash2 className="h-3.5 w-3.5" />+ </Button>+ </div>+ ))}+ <Button+ type="button"+ variant="outline"+ size="sm"+ onClick={() => setRows(prev => [...prev, { key: "", value: "" }])}+ >+ <Plus className="h-3.5 w-3.5 mr-1" />+ {t("Add trait")}+ </Button>+ </div>+ ) : (+ <div className="space-y-1.5">+ <Textarea+ value={jsonText}+ onChange={e => {+ setJsonText(e.target.value);+ setJsonError(false);+ }}+ rows={12}+ spellCheck={false}+ aria-label="JSON"+ aria-invalid={jsonError}+ className={`font-mono text-xs max-h-[50vh] ${jsonError ? "border-red-500 dark:border-red-400" : ""}`}+ />+ {jsonError && <p className="text-xs text-red-500 dark:text-red-400">{t("Enter a valid JSON object")}</p>}+ </div>+ )}+ <DialogFooter>+ <Button type="button" variant="outline" onClick={() => onOpenChange(false)}>+ {t("Cancel")}+ </Button>+ <Button variant="success" onClick={handleSave} disabled={updateTraits.isPending}>+ {updateTraits.isPending ? t("Saving...") : t("Save")}+ </Button>+ </DialogFooter>+ </DialogContent>+ </Dialog>+ );+}diff --git a/client/src/components/IdentifiedBadge.tsx b/client/src/components/IdentifiedBadge.tsxindex d7c504550..3f9e1f82f 100644--- a/client/src/components/IdentifiedBadge.tsx+++ b/client/src/components/IdentifiedBadge.tsx@@ -1,49 +1,92 @@+"use client";+import { IdCard } from "lucide-react";import { useExtracted } from "next-intl";+import { useState } from "react";+import { userStore } from "../lib/userStore";+import { EditTraitsDialog } from "./EditTraitsDialog";import { Badge } from "./ui/badge";import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";interface IdentifiedBadgeProps {className?: string;traits?: Record<string, unknown> | null;+ // Identified user id; when set and the viewer is signed in, clicking the+ // badge opens the trait editor+ userId?: string;}-export function IdentifiedBadge({ className, traits }: IdentifiedBadgeProps) {+export function IdentifiedBadge({ className, traits, userId }: IdentifiedBadgeProps) {const t = useExtracted();+ const { user } = userStore();+ const [editOpen, setEditOpen] = useState(false);+ // Lazily mounted so lists full of badges don't each carry a dialog+ const [dialogMounted, setDialogMounted] = useState(false);++ const canEdit = !!userId && !!user;+// Filter out null/undefined values and format for displayconst traitEntries = traits? Object.entries(traits).filter(([, value]) => value !== null && value !== undefined): [];+ const badge = (+ <Badge variant="success" className={className}>+ <IdCard className="w-3 h-3" />+ </Badge>+ );+return (- <Tooltip>- <TooltipTrigger asChild>- <Badge variant="success" className={className}>- <IdCard className="w-3 h-3" />- </Badge>- </TooltipTrigger>- <TooltipContent className="max-w-xs">- <p className="font-medium mb-1">{t("Identified User")}</p>- {traitEntries.length > 0 ? (- <div className="text-xs space-y-0.5">- {traitEntries.slice(0, 8).map(([key, value]) => (- <div key={key} className="flex gap-2">- <span className="text-neutral-400">{key}:</span>- <span className="truncate max-w-[180px]">- {typeof value === "object" ? JSON.stringify(value) : String(value)}- </span>- </div>- ))}- {traitEntries.length > 8 && (- <div className="text-neutral-400 text-xs mt-1">- {t("+{count} more traits", { count: String(traitEntries.length - 8) })}- </div>- )}- </div>- ) : (- <p className="text-xs text-neutral-400">{t("No traits set")}</p>- )}- </TooltipContent>- </Tooltip>+ <>+ <Tooltip>+ <TooltipTrigger asChild>+ {canEdit ? (+ <button+ type="button"+ aria-label={t("Edit Traits")}+ className="cursor-pointer rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400"+ onClick={e => {+ // Badges sit inside clickable cards and links; editing must+ // not trigger the surrounding navigation+ e.preventDefault();+ e.stopPropagation();+ setDialogMounted(true);+ setEditOpen(true);+ }}+ >+ {badge}+ </button>+ ) : (+ badge+ )}+ </TooltipTrigger>+ <TooltipContent className="max-w-xs">+ <p className="font-medium mb-1">{t("Identified User")}</p>+ {traitEntries.length > 0 ? (+ <div className="text-xs space-y-0.5">+ {traitEntries.slice(0, 8).map(([key, value]) => (+ <div key={key} className="flex gap-2">+ <span className="text-neutral-400">{key}:</span>+ <span className="truncate max-w-[180px]">+ {typeof value === "object" ? JSON.stringify(value) : String(value)}+ </span>+ </div>+ ))}+ {traitEntries.length > 8 && (+ <div className="text-neutral-400 text-xs mt-1">+ {t("+{count} more traits", { count: String(traitEntries.length - 8) })}+ </div>+ )}+ </div>+ ) : (+ <p className="text-xs text-neutral-400">{t("No traits set")}</p>+ )}+ {canEdit && <p className="text-xs text-neutral-400 mt-1">{t("Click to edit traits")}</p>}+ </TooltipContent>+ </Tooltip>+ {dialogMounted && userId && (+ <EditTraitsDialog userId={userId} traits={traits ?? null} open={editOpen} onOpenChange={setEditOpen} />+ )}+ </>);}diff --git a/client/src/components/Sessions/SessionCard.tsx b/client/src/components/Sessions/SessionCard.tsxindex ccb7853c5..36fc3776e 100644--- a/client/src/components/Sessions/SessionCard.tsx+++ b/client/src/components/Sessions/SessionCard.tsx@@ -87,7 +87,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault, highl<span className="text-xs text-neutral-600 dark:text-neutral-200 truncate max-w-[150px]">{getUserDisplayName(session)}</span>- {!!session.identified_user_id && <IdentifiedBadge traits={session.traits} />}+ {!!session.identified_user_id && <IdentifiedBadge traits={session.traits} userId={session.identified_user_id} />}</div><span className="text-xs text-neutral-500 dark:text-neutral-400 "><span className="group-hover/card:hidden">@@ -190,7 +190,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault, highl<span className="text-xs text-neutral-600 dark:text-neutral-200 w-24 truncate hover:underline">{getUserDisplayName(session)}</span>- {!!session.identified_user_id && <IdentifiedBadge traits={session.traits} />}+ {!!session.identified_user_id && <IdentifiedBadge traits={session.traits} userId={session.identified_user_id} />}</Link>)}diff --git a/client/src/components/Sessions/SessionDetails/SessionInfoTab.tsx b/client/src/components/Sessions/SessionDetails/SessionInfoTab.tsxindex 7dd10657d..fd6618114 100644--- a/client/src/components/Sessions/SessionDetails/SessionInfoTab.tsx+++ b/client/src/components/Sessions/SessionDetails/SessionInfoTab.tsx@@ -71,7 +71,7 @@ export function SessionInfoTab({: generateName(sessionDetails.user_id)}</span>{isIdentified && (- <IdentifiedBadge traits={session.traits} />+ <IdentifiedBadge traits={session.traits} userId={session.identified_user_id} />)}</div><div className="text-sm text-neutral-500 dark:text-neutral-400 flex items-center">diff --git a/client/src/components/replay/ReplayBreadcrumbs.tsx b/client/src/components/replay/ReplayBreadcrumbs.tsxindex d092c2140..876ea260c 100644--- a/client/src/components/replay/ReplayBreadcrumbs.tsx+++ b/client/src/components/replay/ReplayBreadcrumbs.tsx@@ -367,7 +367,7 @@ function UserHeader({ data, siteId }: { data: any; siteId: number }) {}/><span className="truncate">{getUserDisplayName(data.metadata)}</span>- {isIdentified && <IdentifiedBadge traits={data.metadata.traits} />}+ {isIdentified && <IdentifiedBadge traits={data.metadata.traits} userId={data.metadata.identified_user_id} />}</div><Link href={userLink} className="shrink-0"><Button size="sm">{t("View User")}</Button>diff --git a/client/src/lib/filterGroups.ts b/client/src/lib/filterGroups.tsindex ddbb1112c..6661f3bb0 100644--- a/client/src/lib/filterGroups.ts+++ b/client/src/lib/filterGroups.ts@@ -29,6 +29,10 @@ const BASE_FILTERS: FilterParameter[] = [export const SESSION_PAGE_FILTERS: FilterParameter[] = [...BASE_FILTERS, "pathname", "entry_page", "exit_page", "event_name"];+// Single-user detail page: the page is already scoped to one user, so the+// user_id filter is excluded.+export const USER_DETAIL_PAGE_FILTERS: FilterParameter[] = SESSION_PAGE_FILTERS.filter(f => f !== "user_id");+export const EVENT_FILTERS: FilterParameter[] = [...BASE_FILTERS,"pathname",diff --git a/client/src/lib/store.ts b/client/src/lib/store.tsindex b97dd93ab..d8bc6657d 100644--- a/client/src/lib/store.ts+++ b/client/src/lib/store.ts@@ -4,7 +4,7 @@ import { create } from "zustand";import { persist } from "zustand/middleware";import { Time } from "../components/DateSelector/types";import { LITE_DASHBOARD } from "./const";-import { getStoredDashboardDefaultTime } from "./defaultTimeRange";+import { getDashboardTimeForRange, getStoredDashboardDefaultTime } from "./defaultTimeRange";// The lite dashboard is backed by hourly materialized views, so anything finer// than an hour has no underlying data. Clamp auto-selected buckets up to "hour".@@ -244,6 +244,11 @@ const getDefaultTime = (): Time => getStoredDashboardDefaultTime(getSystemTimezoconst getDefaultTimeState = () => getTimeState(getDefaultTime());+// The store is created during both server rendering and the browser's first+// render. Keep that initial state independent of localStorage so React hydrates+// the same markup; client-side URL/default-range initialization runs afterward.+const getInitialTimeState = () => getTimeState(getDashboardTimeForRange("today", "UTC"));+const getSiteStateForUrl = (state: Store, site: string, privateKey?: string | null): Partial<Store> => {const urlParams = getUrlParams();const hasTimeInUrl = urlParams?.has("timeMode") || urlParams?.has("wellKnown");@@ -275,7 +280,7 @@ export const useStore = create<Store, [["zustand/persist", PersistedStore]]>(setSiteContext: (site, privateKey) => {set(state => getSiteStateForUrl(state, site, privateKey));},- ...getDefaultTimeState(),+ ...getInitialTimeState(),setTime: (time, changeBucket = true) => {const nextTimeState = getTimeState(time);diff --git a/server/src/api/analytics/index.ts b/server/src/api/analytics/index.tsindex cc3b4ad90..c4ea5f069 100644--- a/server/src/api/analytics/index.ts+++ b/server/src/api/analytics/index.ts@@ -64,7 +64,10 @@ export { runCustomQuery } from "./runCustomQuery.js";export { getSession } from "./sessions/getSession.js";export { getSessionLocations } from "./sessions/getSessionLocations.js";export { getSessions } from "./sessions/getSessions.js";+export { deleteUser } from "./users/deleteUser.js";export { getUserInfo } from "./users/getUserInfo.js";export { getUserSessionCount } from "./users/getUserSessionCount.js";export { getUsers } from "./users/getUsers.js";export { getUserTraitKeys, getUserTraitValues, getUserTraitValueUsers } from "./users/getUserTraits.js";+export { identifyUser } from "./users/identifyUser.js";+export { updateUserTraits } from "./users/updateUserTraits.js";diff --git a/server/src/api/analytics/users/deleteUser.ts b/server/src/api/analytics/users/deleteUser.tsnew file mode 100644index 000000000..486f3ae28--- /dev/null+++ b/server/src/api/analytics/users/deleteUser.ts@@ -0,0 +1,88 @@+import { FastifyReply, FastifyRequest } from "fastify";+import { and, eq, or } from "drizzle-orm";+import { clickhouse } from "../../../db/clickhouse/clickhouse.js";+import { db } from "../../../db/postgres/postgres.js";+import { userAliases, userProfiles } from "../../../db/postgres/schema.js";+import { r2Storage } from "../../../services/storage/r2StorageService.js";+import { processResults } from "../utils/utils.js";++export interface DeleteUserRequest {+ Params: {+ siteId: string;+ userId: string;+ };+}++/**+ * GDPR erasure: permanently delete all analytics data for a user — events,+ * session replays (including R2-stored payloads), profile, and aliases.+ * Accepts either an identified user ID or an anonymous device fingerprint.+ *+ * Events a linked device produced while identified as a DIFFERENT user are+ * preserved (shared-device case): device-scoped deletion only applies to+ * unattributed events.+ */+export async function deleteUser(req: FastifyRequest<DeleteUserRequest>, res: FastifyReply) {+ const { userId } = req.params;+ const siteId = Number(req.params.siteId);++ try {+ // Devices linked to this user via identify() calls+ const aliases = await db+ .select({ anonymousId: userAliases.anonymousId })+ .from(userAliases)+ .where(and(eq(userAliases.siteId, siteId), eq(userAliases.userId, userId)));+ const deviceIds = [userId, ...aliases.map(a => a.anonymousId)];++ const userCondition = `site_id = {siteId:UInt16}+ AND (+ identified_user_id = {userId:String}+ OR (user_id IN ({deviceIds:Array(String)}) AND identified_user_id = '')+ )`;+ const queryParams = { siteId, userId, deviceIds };++ // Delete R2-stored replay payloads first (cloud deployments); best-effort —+ // proceed with ClickHouse deletion even if R2 cleanup fails.+ if (r2Storage.isEnabled()) {+ try {+ const r2KeysResult = await clickhouse.query({+ query: `+ SELECT DISTINCT event_data_key+ FROM session_replay_events+ WHERE ${userCondition}+ AND event_data_key IS NOT NULL+ `,+ query_params: queryParams,+ format: "JSONEachRow",+ });+ const r2Keys = await processResults<{ event_data_key: string }>(r2KeysResult);+ await Promise.all(r2Keys.map(row => r2Storage.deleteBatch(row.event_data_key)));+ } catch (error) {+ console.error(`Failed to delete R2 replay data for user ${userId}:`, error);+ }+ }++ await Promise.all(+ ["events", "session_replay_events", "session_replay_metadata"].map(table =>+ clickhouse.command({+ query: `DELETE FROM ${table} WHERE ${userCondition}`,+ query_params: queryParams,+ })+ )+ );++ await Promise.all([+ db.delete(userProfiles).where(and(eq(userProfiles.siteId, siteId), eq(userProfiles.userId, userId))),+ db+ .delete(userAliases)+ .where(+ and(eq(userAliases.siteId, siteId), or(eq(userAliases.userId, userId), eq(userAliases.anonymousId, userId)))+ ),+ ]);++ return res.send({ success: true });+ } catch (error) {+ console.error("Error deleting user:", error);+ return res.status(500).send({ error: "Failed to delete user" });+ }+}diff --git a/server/src/api/analytics/users/getUserInfo.ts b/server/src/api/analytics/users/getUserInfo.tsindex 9189dd257..51941930b 100644--- a/server/src/api/analytics/users/getUserInfo.ts+++ b/server/src/api/analytics/users/getUserInfo.ts@@ -1,10 +1,12 @@+import { FilterParams } from "@rybbit/shared";import { FastifyReply, FastifyRequest } from "fastify";import { eq, and } from "drizzle-orm";import { clickhouse } from "../../../db/clickhouse/clickhouse.js";import { db } from "../../../db/postgres/postgres.js";import { userProfiles, userAliases } from "../../../db/postgres/schema.js";+import { getFilterStatement } from "../utils/getFilterStatement.js";import { SESSION_CHANNEL_AGG, SESSION_REFERRER_AGG } from "../utils/sessionAttribution.js";-import { processResults } from "../utils/utils.js";+import { getTimeStatement, processResults } from "../utils/utils.js";interface UserPageviewData {sessions: number;@@ -27,6 +29,44 @@ interface UserPageviewData {pageviews: number;events: number;ip: string;+ first_referrer: string;+ first_channel: string;+ first_entry_page: string;+ first_utm_source: string;+ first_utm_medium: string;+ first_utm_campaign: string;+ last_referrer: string;+ last_channel: string;+ timezone: string;+}++interface UserVitalsData {+ lcp_p75: number | null;+ cls_p75: number | null;+ inp_p75: number | null;+ fcp_p75: number | null;+ ttfb_p75: number | null;+ performance_events: number;+}++interface UserLocationBreakdown {+ country: string;+ region: string;+ city: string;+ sessions: number;+ last_seen: string;+}++interface UserDeviceBreakdown {+ device_type: string;+ browser: string;+ browser_version: string;+ operating_system: string;+ operating_system_version: string;+ screen_width: number;+ screen_height: number;+ sessions: number;+ last_seen: string;}interface LinkedDevice {@@ -38,6 +78,9 @@ export interface UserInfoResponse {data: UserPageviewData & {traits: Record<string, unknown> | null;linked_devices: LinkedDevice[];+ vitals: UserVitalsData | null;+ locations: UserLocationBreakdown[];+ devices: UserDeviceBreakdown[];};}@@ -47,15 +90,36 @@ export async function getUserInfo(siteId: string;userId: string;};+ Querystring: FilterParams;}>,res: FastifyReply) {const { userId, siteId } = req.params;+ const { filters } = req.query;const numericSiteId = Number(siteId);+ // Optional time range + dimension filters; both empty when the page is on+ // all-time with no filters, which keeps the original full-history behavior.+ const timeStatement = getTimeStatement(req.query);+ const filterStatement = getFilterStatement(filters, numericSiteId, timeStatement);++ // Filters run in a subquery below each aggregation: the aggregate SELECTs+ // alias argMax(...) to the same names as raw columns (browser_version, …),+ // and ClickHouse resolves unqualified WHERE references at that level to the+ // aliases, throwing ILLEGAL_AGGREGATION.+ const scopedEvents = `(+ SELECT *+ FROM events+ WHERE+ (events.identified_user_id = {userId:String} OR events.user_id = {userId:String})+ AND site_id = {site:Int32}+ ${timeStatement}+ ${filterStatement}+ ) AS events`;+try {- const [queryResult, profileResult, aliasesResult] = await Promise.all([+ const [queryResult, vitalsResult, locationsResult, devicesResult, profileResult, aliasesResult] = await Promise.all([clickhouse.query({query: `WITH sessions AS (@@ -76,6 +140,10 @@ export async function getUserInfo(argMax(screen_height, timestamp) AS screen_height,${SESSION_REFERRER_AGG} AS referrer,${SESSION_CHANNEL_AGG} AS channel,+ argMinIf(url_parameters['utm_source'], timestamp, url_parameters['utm_source'] != '') AS utm_source,+ argMinIf(url_parameters['utm_medium'], timestamp, url_parameters['utm_medium'] != '') AS utm_medium,+ argMinIf(url_parameters['utm_campaign'], timestamp, url_parameters['utm_campaign'] != '') AS utm_campaign,+ argMaxIf(timezone, timestamp, timezone != '') AS user_timezone,MAX(timestamp) AS session_end,MIN(timestamp) AS session_start,dateDiff('second', MIN(timestamp), MAX(timestamp)) AS session_duration,@@ -84,11 +152,7 @@ export async function getUserInfo(countIf(type = 'pageview') AS pageviews,countIf(type = 'custom_event') AS events,argMax(ip, timestamp) AS ip- FROM- events- WHERE- (events.identified_user_id = {userId:String} OR events.user_id = {userId:String})- AND site_id = {site:Int32}+ FROM ${scopedEvents}GROUP BYsession_idORDER BY@@ -114,7 +178,16 @@ export async function getUserInfo(MIN(session_start) AS first_seen,SUM(pageviews) AS pageviews,SUM(events) AS events,- any(ip) AS ip+ any(ip) AS ip,+ argMin(referrer, session_start) AS first_referrer,+ argMin(channel, session_start) AS first_channel,+ argMinIf(entry_page, session_start, entry_page != '') AS first_entry_page,+ argMinIf(utm_source, session_start, utm_source != '') AS first_utm_source,+ argMinIf(utm_medium, session_start, utm_medium != '') AS first_utm_medium,+ argMinIf(utm_campaign, session_start, utm_campaign != '') AS first_utm_campaign,+ argMax(referrer, session_end) AS last_referrer,+ argMax(channel, session_end) AS last_channel,+ argMaxIf(user_timezone, session_end, user_timezone != '') AS timezoneFROMsessions`,@@ -124,6 +197,80 @@ export async function getUserInfo(},format: "JSONEachRow",}),+ // p75 Web Vitals across every performance event this user produced.+ // Separate query: the sessions CTE collapses rows per session, which+ // would turn an event-level quantile into a quantile of session picks.+ clickhouse.query({+ query: `+ SELECT+ quantile(0.75)(lcp) AS lcp_p75,+ quantile(0.75)(cls) AS cls_p75,+ quantile(0.75)(inp) AS inp_p75,+ quantile(0.75)(fcp) AS fcp_p75,+ quantile(0.75)(ttfb) AS ttfb_p75,+ COUNT(*) AS performance_events+ FROM ${scopedEvents}+ WHERE type = 'performance'+ `,+ query_params: {+ userId,+ site: siteId,+ },+ format: "JSONEachRow",+ }),+ // Every location this user was seen in, by session share. A session that+ // moves between cities counts once per city, so shares are approximate.+ clickhouse.query({+ query: `+ SELECT+ country,+ region,+ city,+ uniq(session_id) AS sessions,+ MAX(timestamp) AS last_seen+ FROM ${scopedEvents}+ WHERE country != ''+ GROUP BY+ country, region, city+ ORDER BY+ sessions DESC, last_seen DESC+ LIMIT 20+ `,+ query_params: {+ userId,+ site: siteId,+ },+ format: "JSONEachRow",+ }),+ // Every device this user was seen on. Grouped without versions so a+ // browser update doesn't split one physical device into many rows;+ // versions and screen are argMax'd to the latest sighting instead.+ clickhouse.query({+ query: `+ SELECT+ device_type,+ browser,+ operating_system,+ argMax(browser_version, timestamp) AS browser_version,+ argMax(operating_system_version, timestamp) AS operating_system_version,+ argMax(screen_width, timestamp) AS screen_width,+ argMax(screen_height, timestamp) AS screen_height,+ uniq(session_id) AS sessions,+ MAX(timestamp) AS last_seen+ FROM ${scopedEvents}+ WHERE NOT (device_type = '' AND browser = '' AND operating_system = '')+ GROUP BY+ device_type, browser, operating_system+ ORDER BY+ sessions DESC, last_seen DESC+ LIMIT 20+ `,+ query_params: {+ userId,+ site: siteId,+ },+ format: "JSONEachRow",+ }),// Get user profile traits from Postgresdb.select()@@ -141,6 +288,9 @@ export async function getUserInfo(]);const data = await processResults<UserPageviewData>(queryResult);+ const vitalsData = await processResults<UserVitalsData>(vitalsResult);+ const locations = await processResults<UserLocationBreakdown>(locationsResult);+ const devices = await processResults<UserDeviceBreakdown>(devicesResult);// If no data found for userif (data.length === 0) {@@ -149,17 +299,45 @@ export async function getUserInfo(});}- const traits = profileResult[0]?.traits || null;+ let identifiedUserId = data[0].identified_user_id;+ let traits = profileResult[0]?.traits || null;++ // The identify backfill mutation in ClickHouse is async, so a freshly+ // identified device can still have all-blank identified_user_id here.+ // Fall back to the alias table so identity and traits show immediately.+ if (!identifiedUserId) {+ const alias = await db+ .select({ userId: userAliases.userId })+ .from(userAliases)+ .where(and(eq(userAliases.siteId, numericSiteId), eq(userAliases.anonymousId, userId)))+ .limit(1);+ if (alias.length > 0) {+ identifiedUserId = alias[0].userId;+ const aliasProfile = await db+ .select()+ .from(userProfiles)+ .where(and(eq(userProfiles.siteId, numericSiteId), eq(userProfiles.userId, identifiedUserId)))+ .limit(1);+ traits = aliasProfile[0]?.traits || traits;+ }+ }+const linked_devices = aliasesResult.map(alias => ({anonymous_id: alias.anonymous_id,created_at: alias.created_at,}));+ const vitals = vitalsData[0]?.performance_events > 0 ? vitalsData[0] : null;+return res.send({data: {...data[0],+ identified_user_id: identifiedUserId,traits,linked_devices,+ vitals,+ locations,+ devices,},});} catch (error) {diff --git a/server/src/api/analytics/users/getUserSessionCount.ts b/server/src/api/analytics/users/getUserSessionCount.tsindex 2559422a1..5e90f2e85 100644--- a/server/src/api/analytics/users/getUserSessionCount.ts+++ b/server/src/api/analytics/users/getUserSessionCount.ts@@ -1,5 +1,6 @@import { FastifyReply, FastifyRequest } from "fastify";import { clickhouse } from "../../../db/clickhouse/clickhouse.js";+import { getFilterStatement } from "../utils/getFilterStatement.js";import { processResults } from "../utils/utils.js";import SqlString from "sqlstring";@@ -10,6 +11,7 @@ export interface GetUserSessionCountRequest {Querystring: {user_id?: string;time_zone?: string;+ filters?: string;};}@@ -20,12 +22,16 @@ export type GetUserSessionCountResponse = {export async function getUserSessionCount(req: FastifyRequest<GetUserSessionCountRequest>, res: FastifyReply) {const { siteId } = req.params;- const { user_id: userId, time_zone: timeZone = "UTC" } = req.query;+ const { user_id: userId, time_zone: timeZone = "UTC", filters } = req.query;if (!userId) {return res.status(400).send({ error: "user_id is required" });}+ // The calendar spans the user's full history, so dimension filters apply+ // but no time range does.+ const filterStatement = getFilterStatement(filters ?? "", Number(siteId));+const query = `SELECTtoDate(timestamp, ${SqlString.escape(timeZone)}) as date,@@ -34,6 +40,7 @@ export async function getUserSessionCount(req: FastifyRequest<GetUserSessionCounWHEREsite_id = {siteId:Int32}AND (user_id = {userId:String} OR identified_user_id = {userId:String})+ ${filterStatement}GROUP BY dateORDER BY date ASC`;diff --git a/server/src/api/analytics/users/identifyUser.ts b/server/src/api/analytics/users/identifyUser.tsnew file mode 100644index 000000000..652f543f9--- /dev/null+++ b/server/src/api/analytics/users/identifyUser.ts@@ -0,0 +1,89 @@+import { FastifyReply, FastifyRequest } from "fastify";+import { sql } from "drizzle-orm";+import { z } from "zod";+import { db } from "../../../db/postgres/postgres.js";+import { userAliases, userProfiles } from "../../../db/postgres/schema.js";+import { backfillIdentifiedUserId } from "../../../services/tracker/identifyService.js";++// Max traits size in bytes (2KB) — matches the tracker identify endpoint+const MAX_TRAITS_SIZE = 2048;++const identifyUserBodySchema = z.object({+ anonymous_id: z.string().min(1).max(255),+ user_id: z.string().min(1).max(255),+ traits: z+ .record(z.unknown())+ .optional()+ .refine(+ traits => {+ if (!traits) return true;+ const size = new TextEncoder().encode(JSON.stringify(traits)).length;+ return size <= MAX_TRAITS_SIZE;+ },+ { message: `Traits must be less than ${MAX_TRAITS_SIZE} bytes (2KB)` }+ ),+});++export interface IdentifyUserRequest {+ Params: {+ siteId: string;+ };+ Body: unknown;+}++/**+ * Manually identify an anonymous visitor from the dashboard: links the device+ * fingerprint (anonymous_id) to a user ID, exactly like the tracking script's+ * identify() call, but initiated by a dashboard user instead of the visitor.+ */+export async function identifyUser(req: FastifyRequest<IdentifyUserRequest>, res: FastifyReply) {+ const validationResult = identifyUserBodySchema.safeParse(req.body);+ if (!validationResult.success) {+ return res.status(400).send({ error: "Invalid payload", details: validationResult.error.flatten() });+ }++ const { anonymous_id, user_id, traits } = validationResult.data;+ const siteId = Number(req.params.siteId);++ if (anonymous_id === user_id) {+ return res.status(400).send({ error: "User ID must be different from the anonymous ID" });+ }++ try {+ const filteredTraits = traits ? Object.fromEntries(Object.entries(traits).filter(([, v]) => v !== null)) : {};++ if (Object.keys(filteredTraits).length > 0) {+ await db+ .insert(userProfiles)+ .values({ siteId, userId: user_id, traits: filteredTraits })+ .onConflictDoUpdate({+ target: [userProfiles.siteId, userProfiles.userId],+ set: {+ traits: sql`${userProfiles.traits} || ${JSON.stringify(filteredTraits)}::jsonb`,+ updatedAt: sql`now()`,+ },+ });+ } else {+ // Profile shell so the user shows up in search/inventory even without traits+ await db.insert(userProfiles).values({ siteId, userId: user_id }).onConflictDoNothing();+ }++ await db+ .insert(userAliases)+ .values({ siteId, anonymousId: anonymous_id, userId: user_id })+ .onConflictDoUpdate({+ target: [userAliases.siteId, userAliases.anonymousId],+ set: { userId: user_id },+ });++ // Fire-and-forget: the ClickHouse mutation can take a while on large sites,+ // so don't hold the response on it. No backfill window — the operator is+ // explicitly asserting this device's history belongs to this user.+ backfillIdentifiedUserId(siteId, anonymous_id, user_id, null);++ return res.send({ success: true });+ } catch (error) {+ console.error("Error identifying user:", error);+ return res.status(500).send({ error: "Failed to identify user" });+ }+}diff --git a/server/src/api/analytics/users/updateUserTraits.ts b/server/src/api/analytics/users/updateUserTraits.tsnew file mode 100644index 000000000..7bc37a1f0--- /dev/null+++ b/server/src/api/analytics/users/updateUserTraits.ts@@ -0,0 +1,62 @@+import { FastifyReply, FastifyRequest } from "fastify";+import { sql } from "drizzle-orm";+import { z } from "zod";+import { db } from "../../../db/postgres/postgres.js";+import { userProfiles } from "../../../db/postgres/schema.js";++// Max traits size in bytes (2KB) — matches the tracker identify endpoint+const MAX_TRAITS_SIZE = 2048;++const updateUserTraitsBodySchema = z.object({+ traits: z.record(z.unknown()).refine(+ traits => {+ const size = new TextEncoder().encode(JSON.stringify(traits)).length;+ return size <= MAX_TRAITS_SIZE;+ },+ { message: `Traits must be less than ${MAX_TRAITS_SIZE} bytes (2KB)` }+ ),+});++export interface UpdateUserTraitsRequest {+ Params: {+ siteId: string;+ userId: string;+ };+ Body: unknown;+}++/**+ * Replace a user's traits from the dashboard. Unlike the tracking script's+ * identify() (which merges), the dashboard editor submits the full set, so+ * the stored traits are replaced wholesale.+ */+export async function updateUserTraits(req: FastifyRequest<UpdateUserTraitsRequest>, res: FastifyReply) {+ const validationResult = updateUserTraitsBodySchema.safeParse(req.body);+ if (!validationResult.success) {+ return res.status(400).send({ error: "Invalid payload", details: validationResult.error.flatten() });+ }++ const { userId } = req.params;+ const siteId = Number(req.params.siteId);+ const traits = Object.fromEntries(+ Object.entries(validationResult.data.traits).filter(([, v]) => v !== null && v !== undefined)+ );++ try {+ await db+ .insert(userProfiles)+ .values({ siteId, userId, traits })+ .onConflictDoUpdate({+ target: [userProfiles.siteId, userProfiles.userId],+ set: {+ traits,+ updatedAt: sql`now()`,+ },+ });++ return res.send({ success: true });+ } catch (error) {+ console.error("Error updating user traits:", error);+ return res.status(500).send({ error: "Failed to update user traits" });+ }+}diff --git a/server/src/index.ts b/server/src/index.tsindex 80ae3fefe..a2dbb864d 100644--- a/server/src/index.ts+++ b/server/src/index.ts@@ -21,6 +21,7 @@ import {deleteDashboard,deleteFunnel,deleteGoal,+ deleteUser,generatePdfReport,getDashboard,getDashboards,@@ -68,10 +69,12 @@ import {getUserTraitValueUsers,getUserTraitValues,getUsers,+ identifyUser,runCustomQuery,runDashboardCardQuery,updateDashboard,updateGoal,+ updateUserTraits,} from "./api/analytics/index.js";import { getConfig, getVersion } from "./api/getConfig.js";import {@@ -308,6 +311,9 @@ async function analyticsRoutes(fastify: FastifyInstance) {fastify.get("/sites/:siteId/users/session-count", publicSite, getUserSessionCount);fastify.get("/sites/:siteId/users/:userId", publicSite, getUserInfo);+ fastify.post("/sites/:siteId/users/identify", authSite, identifyUser);+ fastify.put("/sites/:siteId/users/:userId/traits", authSite, updateUserTraits);+ fastify.delete("/sites/:siteId/users/:userId", adminSite, deleteUser);fastify.get("/sites/:siteId/user-traits/keys", publicSite, getUserTraitKeys);fastify.get("/sites/:siteId/user-traits/values", publicSite, getUserTraitValues);fastify.get("/sites/:siteId/user-traits/users", publicSite, getUserTraitValueUsers);diff --git a/server/src/services/tracker/identifyService.ts b/server/src/services/tracker/identifyService.tsindex 4fa8225ac..a424a1467 100644--- a/server/src/services/tracker/identifyService.ts+++ b/server/src/services/tracker/identifyService.ts@@ -39,7 +39,15 @@ const identifyPayloadSchema = z.object({// Anonymous events older than this are unlikely to belong to the identifying user.const BACKFILL_DAYS = 30;-async function backfillIdentifiedUserId(siteId: number, anonymousId: string, userId: string) {+// days: null backfills the device's full history — only for explicit admin+// actions (dashboard identify), where the operator asserts the whole history+// belongs to this user and the unbounded partition scan is a one-off.+export async function backfillIdentifiedUserId(+ siteId: number,+ anonymousId: string,+ userId: string,+ days: number | null = BACKFILL_DAYS+) {try {// session_replay_metadata has no `timestamp` column; its time column is// `start_time`. Using `timestamp` there throws ClickHouse error 47@@ -51,8 +59,10 @@ async function backfillIdentifiedUserId(siteId: number, anonymousId: string, use];for (const { name, timeColumn } of tables) {await clickhouse.command({- query: `ALTER TABLE ${name} UPDATE identified_user_id = {userId: String} WHERE site_id = {siteId: UInt16} AND user_id = {anonymousId: String} AND identified_user_id = '' AND ${timeColumn} >= now() - INTERVAL {days: UInt16} DAY`,- query_params: { userId, siteId, anonymousId, days: BACKFILL_DAYS },+ query: `ALTER TABLE ${name} UPDATE identified_user_id = {userId: String} WHERE site_id = {siteId: UInt16} AND user_id = {anonymousId: String} AND identified_user_id = ''${+ days !== null ? ` AND ${timeColumn} >= now() - INTERVAL {days: UInt16} DAY` : ""+ }`,+ query_params: { userId, siteId, anonymousId, ...(days !== null ? { days } : {}) },});}logger.info({ siteId, anonymousId, userId }, "Backfilled identified_user_id in ClickHouse");