Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

More goal funnel event types (#1042)

Goldflag3414369c54ec
diff --git a/client/messages/cs.json b/client/messages/cs.json
index 8226d0e35..85a770a67 100644
--- a/client/messages/cs.json
+++ b/client/messages/cs.json
@@ -331,6 +331,7 @@
"TUwf1V": "",
"vmlGzW": "",
"Dmxerh": "",
+ "zwhI6a": "",
"wzKC2G": "",
"itC9lG": "",
"XPX/Qj": "",
@@ -475,6 +476,9 @@
"gMhqKV": "Naklonovat trychtýř",
"IZnwKa": "Upravit trychtýř",
"rIc2Hm": "Aktualizovat trychtýř",
+ "m1czzY": "Událost",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "relací",
"lHFZhY": "{count} odpadlo",
"zIaJNz": "Dosáhlo ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Nastav kroky trychtýře",
"XFyfI5": "Celková konverze",
"AFl3K6": "Konverze z předchozího kroku",
+ "Y6DkLY": "Cesta (např. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Náhled trychtýře",
"Cf6LHR": "Název trychtýře",
"TOuHNM": "Zadej název trychtýře",
"+U6ozc": "Typ",
- "m1czzY": "Událost",
- "Y6DkLY": "Cesta (např. /pricing)",
"Hp/0iW": "Zadej cestu (např. /checkout), ne celou URL.",
"Asi2Jg": "Skrýt pokročilé možnosti",
"lIEejV": "Zobrazit pokročilé možnosti",
@@ -507,6 +514,7 @@
"ox304v": "Došlo k chybě",
"KbGBQH": "Při ukládání došlo k chybě",
"/liMUf": "Trychtýř úspěšně smazán",
+ "ToO3/h": "",
"753yX5": "Popisek",
"+SDMR3": "Vlastnost",
"znwd1N": "Smazat trychtýř",
@@ -549,8 +557,6 @@
"5WuADX": "Přidat cíl",
"WuHoZ9": "Konverze",
"e/U0Xt": "Konverzní poměr",
- "+Ior19": "Cíl stránky",
- "rTE34i": "Cíl události",
"pW4lxD": "Vzor",
"99Lkvz": "",
"sOXElg": "Upravit cíl",
@@ -562,6 +568,25 @@
"6VzeBI": "Ve zvoleném období se žádné relace na tento cíl nekonvertovaly.",
"XYTxH5": "Opravdu chceš smazat tento cíl?",
"AcQH1r": "Tuto akci nelze vrátit zpět. Cíl bude trvale smazán a odstraněn ze všech reportů.",
+ "cegNe7": "Odchozí odkaz",
+ "/kZg9i": "Kliknutí na tlačítko",
+ "b2DnPM": "Odeslání formuláře",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Shoda s konkrétními vlastnostmi události",
+ "zyQ3nw": "Přidat další vlastnost",
+ "GXgKR9": "Shoda s konkrétními URL parametry",
+ "Uu8skg": "Přidat další parametr",
+ "y467+0": "",
"X2PZ7D": "Vytvořit cíl",
"JiYl78": "Uprav níže podrobnosti cíle.",
"giLKKG": "Naklonuj tento cíl se stejnou konfigurací.",
@@ -571,10 +596,8 @@
"yZaYFs": "Typ cíle",
"FfRGEE": "Vzor cesty",
"JoUePd": "Použij * pro shodu s jedním segmentem cesty. Použij ** pro shodu napříč segmenty.",
- "GXgKR9": "Shoda s konkrétními URL parametry",
- "Uu8skg": "Přidat další parametr",
- "23lYVR": "Shoda s konkrétními vlastnostmi události",
- "zyQ3nw": "Přidat další vlastnost",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Aktualizovat",
"VzzYJk": "Vytvořit",
"maXs2s": "Filtrovat cíle",
@@ -619,7 +642,6 @@
"ogKEiU": "Odchozí odkazy",
"VLKK35": "Kliknutí",
"6kvpmt": "Filtrovat {count} odkazů...",
- "cegNe7": "Odchozí odkaz",
"pEc/5k": "Kliknutí %",
"wU7PzI": "Naposledy kliknuto",
"4KEfRY": "Titulky",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Požádej vlastníka organizace o upgrade na Pro pro odemknutí {message}",
"jsy7pk": "Zkusit znovu",
"hyfdry": "Zobrazení stránky",
- "/kZg9i": "Kliknutí na tlačítko",
- "b2DnPM": "Odeslání formuláře",
"TH+8LD": "Změna vstupu",
"yQUiLi": "Načítám data o využití...",
"xIpQN1": "Nepodařilo se načíst data o využití",
diff --git a/client/messages/de.json b/client/messages/de.json
index 252ffb547..7729fd1f1 100644
--- a/client/messages/de.json
+++ b/client/messages/de.json
@@ -331,6 +331,7 @@
"TUwf1V": "Varianten-Implementierung",
"vmlGzW": "Konversionsevent",
"Dmxerh": "Für dieses Pfadziel wird kein Konversionsevent-Code benötigt. Rybbit zählt Sitzungen, die {goalLabel} erreichen.",
+ "zwhI6a": "Für dieses Ziel wird kein Konversionsevent-Code benötigt. Rybbit erfasst es automatisch basierend auf dem Nutzerverhalten.",
"wzKC2G": "Fügen Sie später ein primäres Ziel hinzu, um Konversionen für jede Variante zu berechnen.",
"itC9lG": "Grundlagen",
"XPX/Qj": "Zuteilung",
@@ -475,6 +476,9 @@
"gMhqKV": "Trichter duplizieren",
"IZnwKa": "Trichter bearbeiten",
"rIc2Hm": "Trichter aktualisieren",
+ "m1czzY": "Ereignis",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "Sitzungen",
"lHFZhY": "{count} abgebrochen",
"zIaJNz": "Erreicht ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Konfigurieren Sie Ihre Trichterschritte",
"XFyfI5": "Gesamtkonversion",
"AFl3K6": "Konversion vom vorherigen Schritt",
+ "Y6DkLY": "Pfad (z.B. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Trichtervorschau",
"Cf6LHR": "Trichtername",
"TOuHNM": "Trichternamen eingeben",
"+U6ozc": "Typ",
- "m1czzY": "Ereignis",
- "Y6DkLY": "Pfad (z.B. /pricing)",
"Hp/0iW": "Geben Sie einen Pfad ein (z.B. /checkout), keine vollständige URL.",
"Asi2Jg": "Erweiterte Optionen ausblenden",
"lIEejV": "Erweiterte Optionen anzeigen",
@@ -507,6 +514,7 @@
"ox304v": "Ein Fehler ist aufgetreten",
"KbGBQH": "Beim Speichern ist ein Fehler aufgetreten",
"/liMUf": "Trichter erfolgreich gelöscht",
+ "ToO3/h": "",
"753yX5": "Bezeichnung",
"+SDMR3": "Eigenschaft",
"znwd1N": "Trichter löschen",
@@ -549,8 +557,6 @@
"5WuADX": "Ziel hinzufügen",
"WuHoZ9": "Konversionen",
"e/U0Xt": "Konversionsrate",
- "+Ior19": "Seitenziel",
- "rTE34i": "Event-Ziel",
"pW4lxD": "Muster",
"99Lkvz": "Zielaktionen",
"sOXElg": "Ziel bearbeiten",
@@ -562,6 +568,25 @@
"6VzeBI": "Keine Sitzungen haben dieses Ziel im ausgewählten Zeitraum erreicht.",
"XYTxH5": "Sind Sie sicher, dass Sie dieses Ziel löschen möchten?",
"AcQH1r": "Diese Aktion kann nicht rückgängig gemacht werden. Das Ziel wird dauerhaft gelöscht und aus allen Berichten entfernt.",
+ "cegNe7": "Ausgehender Link",
+ "/kZg9i": "Klick auf Schaltfläche",
+ "b2DnPM": "Formular absenden",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Bestimmte Event-Eigenschaften abgleichen",
+ "zyQ3nw": "Weitere Eigenschaft hinzufügen",
+ "GXgKR9": "Bestimmte URL-Parameter abgleichen",
+ "Uu8skg": "Weiteren Parameter hinzufügen",
+ "y467+0": "Ziel konnte nicht gespeichert werden",
"X2PZ7D": "Ziel erstellen",
"JiYl78": "Aktualisieren Sie die Zieldetails unten.",
"giLKKG": "Dieses Ziel mit der gleichen Konfiguration duplizieren.",
@@ -571,10 +596,8 @@
"yZaYFs": "Zieltyp",
"FfRGEE": "Pfadmuster",
"JoUePd": "Verwenden Sie * für ein einzelnes Pfadsegment. Verwenden Sie ** für segmentübergreifende Übereinstimmung.",
- "GXgKR9": "Bestimmte URL-Parameter abgleichen",
- "Uu8skg": "Weiteren Parameter hinzufügen",
- "23lYVR": "Bestimmte Event-Eigenschaften abgleichen",
- "zyQ3nw": "Weitere Eigenschaft hinzufügen",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Aktualisieren",
"VzzYJk": "Erstellen",
"maXs2s": "Ziele filtern",
@@ -619,7 +642,6 @@
"ogKEiU": "Ausgehende Links",
"VLKK35": "Klicks",
"6kvpmt": "{count} Links filtern...",
- "cegNe7": "Ausgehender Link",
"pEc/5k": "Klick %",
"wU7PzI": "Zuletzt geklickt",
"4KEfRY": "Titel",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Bitten Sie Ihren Organisationsinhaber, auf Pro upzugraden, um {message} freizuschalten",
"jsy7pk": "Erneut versuchen",
"hyfdry": "Seitenaufruf",
- "/kZg9i": "Klick auf Schaltfläche",
- "b2DnPM": "Formular absenden",
"TH+8LD": "Eingabeänderung",
"yQUiLi": "Nutzungsdaten werden geladen...",
"xIpQN1": "Nutzungsdaten konnten nicht geladen werden",
diff --git a/client/messages/en.json b/client/messages/en.json
index 43ea9d14f..fbb0f36e1 100644
--- a/client/messages/en.json
+++ b/client/messages/en.json
@@ -331,6 +331,7 @@
"TUwf1V": "Variant implementation",
"vmlGzW": "Conversion event",
"Dmxerh": "No conversion event code is needed for this path goal. Rybbit will count sessions that reach {goalLabel}.",
+ "zwhI6a": "No conversion event code is needed for this goal. Rybbit tracks it automatically based on user behavior.",
"wzKC2G": "Add a primary goal later to calculate conversions for each variant.",
"itC9lG": "Basics",
"XPX/Qj": "Assignment",
@@ -475,6 +476,9 @@
"gMhqKV": "Clone Funnel",
"IZnwKa": "Edit Funnel",
"rIc2Hm": "Update Funnel",
+ "m1czzY": "Event",
+ "KP63fg": "Button",
+ "baRFiF": "Form",
"29V0Ci": "sessions",
"lHFZhY": "{count} dropped",
"zIaJNz": "Reached ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Configure your funnel steps",
"XFyfI5": "Overall conversion",
"AFl3K6": "Conversion from previous step",
+ "Y6DkLY": "Path (e.g. /pricing)",
+ "OZ7LR+": "URL pattern (optional)",
+ "+aHMUx": "Button text (optional)",
+ "vHXIqS": "Form name or ID (optional)",
+ "tWsaCv": "Copied text (optional)",
"s+vZVl": "Funnel Preview",
"Cf6LHR": "Funnel Name",
"TOuHNM": "Enter funnel name",
"+U6ozc": "Type",
- "m1czzY": "Event",
- "Y6DkLY": "Path (e.g. /pricing)",
"Hp/0iW": "Enter a path (e.g., /checkout), not a full URL.",
"Asi2Jg": "Hide advanced options",
"lIEejV": "Show advanced options",
@@ -507,6 +514,7 @@
"ox304v": "An error occurred",
"KbGBQH": "An error occurred while saving",
"/liMUf": "Funnel deleted successfully",
+ "ToO3/h": "Any",
"753yX5": "Label",
"+SDMR3": "Property",
"znwd1N": "Delete Funnel",
@@ -549,8 +557,6 @@
"5WuADX": "Add Goal",
"WuHoZ9": "Conversions",
"e/U0Xt": "Conversion Rate",
- "+Ior19": "Page Goal",
- "rTE34i": "Event Goal",
"pW4lxD": "Pattern",
"99Lkvz": "Goal actions",
"sOXElg": "Edit Goal",
@@ -562,6 +568,25 @@
"6VzeBI": "No sessions converted to this goal in the selected time period.",
"XYTxH5": "Are you sure you want to delete this goal?",
"AcQH1r": "This action cannot be undone. This will permanently delete the goal and remove it from all reports.",
+ "cegNe7": "Outbound Link",
+ "/kZg9i": "Button Click",
+ "b2DnPM": "Form Submit",
+ "8VHF7f": "URL Pattern (optional)",
+ "3f4M9X": "Matches the destination URL of the outbound link. Leave empty to count any outbound click.",
+ "RzSw2z": "Button Text (optional)",
+ "aY/v+a": "e.g., Sign Up",
+ "PbRfhj": "Matches the button's visible text. Leave empty to count any button click.",
+ "HTIpVv": "Form Name or ID (optional)",
+ "L/Sv0H": "e.g., signup-form",
+ "/EZDL1": "Matches the form's name or id attribute. Leave empty to count any form submission.",
+ "iEFpLb": "Copied Text (optional)",
+ "3Q4Tx9": "e.g., PROMO*",
+ "BhbATb": "Matches the text that was copied. Leave empty to count any copied text.",
+ "23lYVR": "Match specific event properties",
+ "zyQ3nw": "Add Another Property",
+ "GXgKR9": "Match specific URL parameters",
+ "Uu8skg": "Add Another Parameter",
+ "y467+0": "Failed to save goal",
"X2PZ7D": "Create Goal",
"JiYl78": "Update the goal details below.",
"giLKKG": "Clone this goal with the same configuration.",
@@ -571,10 +596,8 @@
"yZaYFs": "Goal Type",
"FfRGEE": "Path Pattern",
"JoUePd": "Use * to match a single path segment. Use ** to match across segments.",
- "GXgKR9": "Match specific URL parameters",
- "Uu8skg": "Add Another Parameter",
- "23lYVR": "Match specific event properties",
- "zyQ3nw": "Add Another Property",
+ "u4SPeu": "e.g., sign_up_completed",
+ "KYAqNj": "Use * to match within a segment. Use ** to match anything.",
"BWpuKl": "Update",
"VzzYJk": "Create",
"maXs2s": "Filter goals",
@@ -619,7 +642,6 @@
"ogKEiU": "Outbound Links",
"VLKK35": "Clicks",
"6kvpmt": "Filter {count} links...",
- "cegNe7": "Outbound Link",
"pEc/5k": "Click %",
"wU7PzI": "Last Clicked",
"4KEfRY": "Titles",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Ask your organization owner to upgrade to Pro to unlock {message}",
"jsy7pk": "Try Again",
"hyfdry": "Pageview",
- "/kZg9i": "Button Click",
- "b2DnPM": "Form Submit",
"TH+8LD": "Input Change",
"yQUiLi": "Loading usage data...",
"xIpQN1": "Failed to load usage data",
diff --git a/client/messages/es.json b/client/messages/es.json
index 0c24fcea0..9024fbd17 100644
--- a/client/messages/es.json
+++ b/client/messages/es.json
@@ -331,6 +331,7 @@
"TUwf1V": "Implementación de variante",
"vmlGzW": "Evento de conversión",
"Dmxerh": "No se necesita código de evento de conversión para este objetivo de ruta. Rybbit contará las sesiones que lleguen a {goalLabel}.",
+ "zwhI6a": "No se necesita código de evento de conversión para este objetivo. Rybbit lo rastrea automáticamente según el comportamiento del usuario.",
"wzKC2G": "Añade un objetivo principal más adelante para calcular las conversiones de cada variante.",
"itC9lG": "Conceptos básicos",
"XPX/Qj": "Asignación",
@@ -475,6 +476,9 @@
"gMhqKV": "Clonar embudo",
"IZnwKa": "Editar embudo",
"rIc2Hm": "Actualizar embudo",
+ "m1czzY": "Evento",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "sesiones",
"lHFZhY": "{count} abandonados",
"zIaJNz": "Alcanzados ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Configura los pasos de tu embudo",
"XFyfI5": "Conversión general",
"AFl3K6": "Conversión desde el paso anterior",
+ "Y6DkLY": "Ruta (ej. /precios)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Vista previa del embudo",
"Cf6LHR": "Nombre del embudo",
"TOuHNM": "Introduce el nombre del embudo",
"+U6ozc": "Tipo",
- "m1czzY": "Evento",
- "Y6DkLY": "Ruta (ej. /precios)",
"Hp/0iW": "Introduce una ruta (ej. /pago), no una URL completa.",
"Asi2Jg": "Ocultar opciones avanzadas",
"lIEejV": "Mostrar opciones avanzadas",
@@ -507,6 +514,7 @@
"ox304v": "Ocurrió un error",
"KbGBQH": "Ocurrió un error al guardar",
"/liMUf": "Embudo eliminado correctamente",
+ "ToO3/h": "",
"753yX5": "Etiqueta",
"+SDMR3": "Propiedad",
"znwd1N": "Eliminar embudo",
@@ -549,8 +557,6 @@
"5WuADX": "Añadir objetivo",
"WuHoZ9": "Conversiones",
"e/U0Xt": "Tasa de conversión",
- "+Ior19": "Objetivo de página",
- "rTE34i": "Objetivo de evento",
"pW4lxD": "Patrón",
"99Lkvz": "Acciones del objetivo",
"sOXElg": "Editar objetivo",
@@ -562,6 +568,25 @@
"6VzeBI": "Ninguna sesión se convirtió en este objetivo en el periodo seleccionado.",
"XYTxH5": "¿Estás seguro de que quieres eliminar este objetivo?",
"AcQH1r": "Esta acción no se puede deshacer. Se eliminará permanentemente el objetivo y se quitará de todos los informes.",
+ "cegNe7": "Enlace saliente",
+ "/kZg9i": "Clic en botón",
+ "b2DnPM": "Envío de formulario",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Coincidir propiedades de evento específicas",
+ "zyQ3nw": "Añadir otra propiedad",
+ "GXgKR9": "Coincidir parámetros URL específicos",
+ "Uu8skg": "Añadir otro parámetro",
+ "y467+0": "Error al guardar el objetivo",
"X2PZ7D": "Crear objetivo",
"JiYl78": "Actualiza los detalles del objetivo a continuación.",
"giLKKG": "Clona este objetivo con la misma configuración.",
@@ -571,10 +596,8 @@
"yZaYFs": "Tipo de objetivo",
"FfRGEE": "Patrón de ruta",
"JoUePd": "Usa * para coincidir con un segmento de ruta. Usa ** para coincidir con varios segmentos.",
- "GXgKR9": "Coincidir parámetros URL específicos",
- "Uu8skg": "Añadir otro parámetro",
- "23lYVR": "Coincidir propiedades de evento específicas",
- "zyQ3nw": "Añadir otra propiedad",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Actualizar",
"VzzYJk": "Crear",
"maXs2s": "Filtrar objetivos",
@@ -619,7 +642,6 @@
"ogKEiU": "Enlaces salientes",
"VLKK35": "Clics",
"6kvpmt": "Filtrar {count} enlaces...",
- "cegNe7": "Enlace saliente",
"pEc/5k": "% Clic",
"wU7PzI": "Último clic",
"4KEfRY": "Títulos",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Pide al propietario de tu organización que actualice a Pro para desbloquear {message}",
"jsy7pk": "Intentar de nuevo",
"hyfdry": "Vista de página",
- "/kZg9i": "Clic en botón",
- "b2DnPM": "Envío de formulario",
"TH+8LD": "Cambio de entrada",
"yQUiLi": "Cargando datos de uso...",
"xIpQN1": "Error al cargar datos de uso",
diff --git a/client/messages/fr.json b/client/messages/fr.json
index 0c35b6773..7cca15cc0 100644
--- a/client/messages/fr.json
+++ b/client/messages/fr.json
@@ -331,6 +331,7 @@
"TUwf1V": "Implémentation de la variante",
"vmlGzW": "Événement de conversion",
"Dmxerh": "Aucun code d'événement de conversion n'est nécessaire pour cet objectif de page. Rybbit comptabilisera les sessions atteignant {goalLabel}.",
+ "zwhI6a": "Aucun code d'événement de conversion n'est nécessaire pour cet objectif. Rybbit le suit automatiquement en fonction du comportement de l'utilisateur.",
"wzKC2G": "Ajoutez un objectif principal ultérieurement pour calculer les conversions de chaque variante.",
"itC9lG": "Bases",
"XPX/Qj": "Assignation",
@@ -475,6 +476,9 @@
"gMhqKV": "Dupliquer l'entonnoir",
"IZnwKa": "Modifier l'entonnoir",
"rIc2Hm": "Mettre à jour l'entonnoir",
+ "m1czzY": "Événement",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "Vues d'écran",
"lHFZhY": "{count} abandonnées",
"zIaJNz": "Atteint ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Configurez les étapes de votre entonnoir",
"XFyfI5": "Conversion globale",
"AFl3K6": "Conversion depuis l'étape précédente",
+ "Y6DkLY": "Chemin (ex. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Aperçu de l'entonnoir",
"Cf6LHR": "Nom de l'entonnoir",
"TOuHNM": "Saisir le nom de l'entonnoir",
"+U6ozc": "Écrans",
- "m1czzY": "Événement",
- "Y6DkLY": "Chemin (ex. /pricing)",
"Hp/0iW": "Saisissez un chemin (ex. /checkout), pas une URL complète.",
"Asi2Jg": "Masquer les options avancées",
"lIEejV": "Afficher les options avancées",
@@ -507,6 +514,7 @@
"ox304v": "Une erreur est survenue",
"KbGBQH": "Une erreur est survenue lors de l'enregistrement",
"/liMUf": "Entonnoir supprimé avec succès",
+ "ToO3/h": "",
"753yX5": "Libellé",
"+SDMR3": "Propriété",
"znwd1N": "Supprimer l'entonnoir",
@@ -549,8 +557,6 @@
"5WuADX": "Ajouter un objectif",
"WuHoZ9": "Conversions",
"e/U0Xt": "Taux de conversion",
- "+Ior19": "Objectif de page",
- "rTE34i": "Objectif d'événement",
"pW4lxD": "Modèle",
"99Lkvz": "Actions de l'objectif",
"sOXElg": "Modifier l'objectif",
@@ -562,6 +568,25 @@
"6VzeBI": "Aucune session n'a converti vers cet objectif dans la période sélectionnée.",
"XYTxH5": "Êtes-vous sûr de vouloir supprimer cet objectif ?",
"AcQH1r": "Cette action est irréversible. L'objectif sera définitivement supprimé et retiré de tous les rapports.",
+ "cegNe7": "Lien sortant",
+ "/kZg9i": "Clic sur bouton",
+ "b2DnPM": "Soumission de formulaire",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Correspondre à des propriétés d'événement spécifiques",
+ "zyQ3nw": "Ajouter une autre propriété",
+ "GXgKR9": "Correspondre à des paramètres URL spécifiques",
+ "Uu8skg": "Ajouter un autre paramètre",
+ "y467+0": "Échec de l'enregistrement de l'objectif",
"X2PZ7D": "Créer un objectif",
"JiYl78": "Mettez à jour les détails de l'objectif ci-dessous.",
"giLKKG": "Dupliquer cet objectif avec la même configuration.",
@@ -571,10 +596,8 @@
"yZaYFs": "Type d'objectif",
"FfRGEE": "Modèle de chemin",
"JoUePd": "Utilisez * pour un seul segment de chemin. Utilisez ** pour une correspondance multi-segments.",
- "GXgKR9": "Correspondre à des paramètres URL spécifiques",
- "Uu8skg": "Ajouter un autre paramètre",
- "23lYVR": "Correspondre à des propriétés d'événement spécifiques",
- "zyQ3nw": "Ajouter une autre propriété",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Mettre à jour",
"VzzYJk": "Créer",
"maXs2s": "Filtrer les objectifs",
@@ -619,7 +642,6 @@
"ogKEiU": "Liens sortants",
"VLKK35": "Clics",
"6kvpmt": "Filtrer {count} liens...",
- "cegNe7": "Lien sortant",
"pEc/5k": "Clic %",
"wU7PzI": "Dernier clic",
"4KEfRY": "Titres",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Demandez au propriétaire de votre organisation de passer à Pro pour débloquer {message}",
"jsy7pk": "Réessayer",
"hyfdry": "Page vue",
- "/kZg9i": "Clic sur bouton",
- "b2DnPM": "Soumission de formulaire",
"TH+8LD": "Changement de saisie",
"yQUiLi": "Chargement des données d'utilisation...",
"xIpQN1": "Échec du chargement des données d'utilisation",
diff --git a/client/messages/it.json b/client/messages/it.json
index c83bbeab5..b1b83a439 100644
--- a/client/messages/it.json
+++ b/client/messages/it.json
@@ -331,6 +331,7 @@
"TUwf1V": "Implementazione variante",
"vmlGzW": "Evento di conversione",
"Dmxerh": "Non è necessario alcun codice di evento di conversione per questo obiettivo di percorso. Rybbit conterà le sessioni che raggiungono {goalLabel}.",
+ "zwhI6a": "Non è necessario alcun codice di evento di conversione per questo obiettivo. Rybbit lo traccia automaticamente in base al comportamento dell'utente.",
"wzKC2G": "Aggiungi un obiettivo principale in seguito per calcolare le conversioni per ogni variante.",
"itC9lG": "Informazioni di base",
"XPX/Qj": "Assegnazione",
@@ -475,6 +476,9 @@
"gMhqKV": "Clona Funnel",
"IZnwKa": "Modifica Funnel",
"rIc2Hm": "Aggiorna Funnel",
+ "m1czzY": "Evento",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "sessioni",
"lHFZhY": "{count} abbandonati",
"zIaJNz": "Raggiunti ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Configura i passaggi del tuo funnel",
"XFyfI5": "Conversione complessiva",
"AFl3K6": "Conversione dal passaggio precedente",
+ "Y6DkLY": "Percorso (es. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Anteprima Funnel",
"Cf6LHR": "Nome Funnel",
"TOuHNM": "Inserisci il nome del funnel",
"+U6ozc": "Tipo",
- "m1czzY": "Evento",
- "Y6DkLY": "Percorso (es. /pricing)",
"Hp/0iW": "Inserisci un percorso (es. /checkout), non un URL completo.",
"Asi2Jg": "Nascondi opzioni avanzate",
"lIEejV": "Mostra opzioni avanzate",
@@ -507,6 +514,7 @@
"ox304v": "Si è verificato un errore",
"KbGBQH": "Si è verificato un errore durante il salvataggio",
"/liMUf": "Funnel eliminato con successo",
+ "ToO3/h": "",
"753yX5": "Etichetta",
"+SDMR3": "Proprietà",
"znwd1N": "Elimina Funnel",
@@ -549,8 +557,6 @@
"5WuADX": "Aggiungi Obiettivo",
"WuHoZ9": "Conversioni",
"e/U0Xt": "Tasso di Conversione",
- "+Ior19": "Obiettivo Pagina",
- "rTE34i": "Obiettivo Evento",
"pW4lxD": "Modello",
"99Lkvz": "Azioni obiettivo",
"sOXElg": "Modifica Obiettivo",
@@ -562,6 +568,25 @@
"6VzeBI": "Nessuna sessione convertita per questo obiettivo nel periodo di tempo selezionato.",
"XYTxH5": "Sei sicuro di voler eliminare questo obiettivo?",
"AcQH1r": "Questa azione non può essere annullata. Questo eliminerà permanentemente l'obiettivo e lo rimuoverà da tutti i report.",
+ "cegNe7": "Link Esterno",
+ "/kZg9i": "Clic su pulsante",
+ "b2DnPM": "Invio modulo",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Corrispondi proprietà evento specifiche",
+ "zyQ3nw": "Aggiungi un'altra proprietà",
+ "GXgKR9": "Corrispondi parametri URL specifici",
+ "Uu8skg": "Aggiungi un altro parametro",
+ "y467+0": "Impossibile salvare l'obiettivo",
"X2PZ7D": "Crea Obiettivo",
"JiYl78": "Aggiorna i dettagli dell'obiettivo qui sotto.",
"giLKKG": "Clona questo obiettivo con la stessa configurazione.",
@@ -571,10 +596,8 @@
"yZaYFs": "Tipo Obiettivo",
"FfRGEE": "Modello Percorso",
"JoUePd": "Usa * per corrispondere a un singolo segmento di percorso. Usa ** per corrispondere attraverso i segmenti.",
- "GXgKR9": "Corrispondi parametri URL specifici",
- "Uu8skg": "Aggiungi un altro parametro",
- "23lYVR": "Corrispondi proprietà evento specifiche",
- "zyQ3nw": "Aggiungi un'altra proprietà",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Aggiorna",
"VzzYJk": "Crea",
"maXs2s": "Filtra obiettivi",
@@ -619,7 +642,6 @@
"ogKEiU": "Link Esterni",
"VLKK35": "Clic",
"6kvpmt": "Filtra {count} link...",
- "cegNe7": "Link Esterno",
"pEc/5k": "% Clic",
"wU7PzI": "Ultimo Clic",
"4KEfRY": "Titoli",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Chiedi al proprietario della tua organizzazione di passare a Pro per sbloccare {message}",
"jsy7pk": "Riprova",
"hyfdry": "Visualizzazione pagina",
- "/kZg9i": "Clic su pulsante",
- "b2DnPM": "Invio modulo",
"TH+8LD": "Modifica input",
"yQUiLi": "Caricamento dati di utilizzo...",
"xIpQN1": "Impossibile caricare i dati di utilizzo",
diff --git a/client/messages/ja.json b/client/messages/ja.json
index 0d33cf2c0..e83980f6c 100644
--- a/client/messages/ja.json
+++ b/client/messages/ja.json
@@ -331,6 +331,7 @@
"TUwf1V": "バリアントの実装",
"vmlGzW": "コンバージョンイベント",
"Dmxerh": "このパスゴールにコンバージョンイベントのコードは不要です。Rybbitは{goalLabel}に到達したセッションをカウントします。",
+ "zwhI6a": "このゴールにコンバージョンイベントのコードは不要です。Rybbitはユーザーの行動に基づいて自動的に追跡します。",
"wzKC2G": "後で主要ゴールを追加して、各バリアントのコンバージョンを算出します。",
"itC9lG": "基本設定",
"XPX/Qj": "割り当て",
@@ -475,6 +476,9 @@
"gMhqKV": "ファネルを複製",
"IZnwKa": "ファネルを編集",
"rIc2Hm": "ファネルを更新",
+ "m1czzY": "イベント",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "セッション",
"lHFZhY": "{count}件離脱",
"zIaJNz": "到達({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "ファネルのステップを設定",
"XFyfI5": "全体のコンバージョン",
"AFl3K6": "前のステップからのコンバージョン",
+ "Y6DkLY": "パス(例:/pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "ファネルプレビュー",
"Cf6LHR": "ファネル名",
"TOuHNM": "ファネル名を入力",
"+U6ozc": "タイプ",
- "m1czzY": "イベント",
- "Y6DkLY": "パス(例:/pricing)",
"Hp/0iW": "パスを入力してください(例:/checkout)。完全なURLではありません。",
"Asi2Jg": "詳細オプションを非表示",
"lIEejV": "詳細オプションを表示",
@@ -507,6 +514,7 @@
"ox304v": "エラーが発生しました",
"KbGBQH": "保存中にエラーが発生しました",
"/liMUf": "ファネルを削除しました",
+ "ToO3/h": "",
"753yX5": "ラベル",
"+SDMR3": "プロパティ",
"znwd1N": "ファネルを削除",
@@ -549,8 +557,6 @@
"5WuADX": "ゴールを追加",
"WuHoZ9": "コンバージョン",
"e/U0Xt": "コンバージョン率",
- "+Ior19": "ページゴール",
- "rTE34i": "イベントゴール",
"pW4lxD": "パターン",
"99Lkvz": "ゴールのアクション",
"sOXElg": "ゴールを編集",
@@ -562,6 +568,25 @@
"6VzeBI": "選択した期間にこのゴールにコンバージョンしたセッションはありません。",
"XYTxH5": "このゴールを削除してもよろしいですか?",
"AcQH1r": "この操作は元に戻せません。ゴールは完全に削除され、すべてのレポートから除外されます。",
+ "cegNe7": "外部リンク",
+ "/kZg9i": "ボタンクリック",
+ "b2DnPM": "フォーム送信",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "特定のイベントプロパティに一致",
+ "zyQ3nw": "プロパティを追加",
+ "GXgKR9": "特定のURLパラメータに一致",
+ "Uu8skg": "パラメータを追加",
+ "y467+0": "ゴールの保存に失敗しました",
"X2PZ7D": "ゴールを作成",
"JiYl78": "以下のゴール詳細を更新してください。",
"giLKKG": "同じ設定でこのゴールを複製します。",
@@ -571,10 +596,8 @@
"yZaYFs": "ゴールタイプ",
"FfRGEE": "パスパターン",
"JoUePd": "*で単一のパスセグメントに一致。**でセグメントをまたいで一致。",
- "GXgKR9": "特定のURLパラメータに一致",
- "Uu8skg": "パラメータを追加",
- "23lYVR": "特定のイベントプロパティに一致",
- "zyQ3nw": "プロパティを追加",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "更新",
"VzzYJk": "作成",
"maXs2s": "ゴールをフィルター",
@@ -619,7 +642,6 @@
"ogKEiU": "外部リンク",
"VLKK35": "クリック",
"6kvpmt": "{count}件のリンクをフィルター...",
- "cegNe7": "外部リンク",
"pEc/5k": "クリック率",
"wU7PzI": "最終クリック",
"4KEfRY": "タイトル",
@@ -1242,8 +1264,6 @@
"RL7HbL": "組織オーナーにProへのアップグレードを依頼して{message}をアンロック",
"jsy7pk": "再試行",
"hyfdry": "ページビュー",
- "/kZg9i": "ボタンクリック",
- "b2DnPM": "フォーム送信",
"TH+8LD": "入力変更",
"yQUiLi": "使用量データを読み込み中...",
"xIpQN1": "使用量データの読み込みに失敗しました",
diff --git a/client/messages/ko.json b/client/messages/ko.json
index 39d9f6240..b6000f7fd 100644
--- a/client/messages/ko.json
+++ b/client/messages/ko.json
@@ -331,6 +331,7 @@
"TUwf1V": "변형 구현",
"vmlGzW": "전환 이벤트",
"Dmxerh": "이 경로 목표에는 전환 이벤트 코드가 필요하지 않습니다. Rybbit이 {goalLabel}에 도달한 세션을 계산합니다.",
+ "zwhI6a": "이 목표에는 전환 이벤트 코드가 필요하지 않습니다. Rybbit이 사용자 행동을 기반으로 자동으로 추적합니다.",
"wzKC2G": "나중에 주요 목표를 추가하여 각 변형의 전환을 계산하세요.",
"itC9lG": "기본 설정",
"XPX/Qj": "할당",
@@ -475,6 +476,9 @@
"gMhqKV": "퍼널 복제",
"IZnwKa": "퍼널 편집",
"rIc2Hm": "퍼널 업데이트",
+ "m1czzY": "이벤트",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "세션",
"lHFZhY": "{count}명 이탈",
"zIaJNz": "도달 ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "퍼널 단계를 구성하세요",
"XFyfI5": "전체 전환율",
"AFl3K6": "이전 단계 대비 전환율",
+ "Y6DkLY": "경로 (예: /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "퍼널 미리보기",
"Cf6LHR": "퍼널 이름",
"TOuHNM": "퍼널 이름 입력",
"+U6ozc": "유형",
- "m1czzY": "이벤트",
- "Y6DkLY": "경로 (예: /pricing)",
"Hp/0iW": "경로를 입력하세요 (예: /checkout), 전체 URL이 아닙니다.",
"Asi2Jg": "고급 옵션 숨기기",
"lIEejV": "고급 옵션 표시",
@@ -507,6 +514,7 @@
"ox304v": "오류가 발생했습니다",
"KbGBQH": "저장 중 오류가 발생했습니다",
"/liMUf": "퍼널이 성공적으로 삭제되었습니다",
+ "ToO3/h": "",
"753yX5": "라벨",
"+SDMR3": "속성",
"znwd1N": "퍼널 삭제",
@@ -549,8 +557,6 @@
"5WuADX": "목표 추가",
"WuHoZ9": "전환",
"e/U0Xt": "전환율",
- "+Ior19": "페이지 목표",
- "rTE34i": "이벤트 목표",
"pW4lxD": "패턴",
"99Lkvz": "목표 액션",
"sOXElg": "목표 편집",
@@ -562,6 +568,25 @@
"6VzeBI": "선택한 기간에 이 목표로 전환된 세션이 없습니다.",
"XYTxH5": "이 목표를 삭제하시겠습니까?",
"AcQH1r": "이 작업은 취소할 수 없습니다. 목표가 영구적으로 삭제되고 모든 보고서에서 제거됩니다.",
+ "cegNe7": "외부 링크",
+ "/kZg9i": "버튼 클릭",
+ "b2DnPM": "폼 제출",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "특정 이벤트 속성 일치",
+ "zyQ3nw": "속성 추가",
+ "GXgKR9": "특정 URL 매개변수 일치",
+ "Uu8skg": "매개변수 추가",
+ "y467+0": "목표 저장 실패",
"X2PZ7D": "목표 만들기",
"JiYl78": "아래에서 목표 세부사항을 업데이트하세요.",
"giLKKG": "동일한 구성으로 이 목표를 복제합니다.",
@@ -571,10 +596,8 @@
"yZaYFs": "목표 유형",
"FfRGEE": "경로 패턴",
"JoUePd": "*를 사용하여 단일 경로 세그먼트를 일치시킵니다. **를 사용하여 세그먼트 간 일치시킵니다.",
- "GXgKR9": "특정 URL 매개변수 일치",
- "Uu8skg": "매개변수 추가",
- "23lYVR": "특정 이벤트 속성 일치",
- "zyQ3nw": "속성 추가",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "업데이트",
"VzzYJk": "만들기",
"maXs2s": "목표 필터",
@@ -619,7 +642,6 @@
"ogKEiU": "외부 링크",
"VLKK35": "클릭",
"6kvpmt": "{count}개 링크 필터...",
- "cegNe7": "외부 링크",
"pEc/5k": "클릭 %",
"wU7PzI": "마지막 클릭",
"4KEfRY": "제목",
@@ -1242,8 +1264,6 @@
"RL7HbL": "{message}을(를) 잠금 해제하려면 조직 소유자에게 Pro 업그레이드를 요청하세요",
"jsy7pk": "다시 시도",
"hyfdry": "페이지뷰",
- "/kZg9i": "버튼 클릭",
- "b2DnPM": "폼 제출",
"TH+8LD": "입력 변경",
"yQUiLi": "사용량 데이터 로딩 중...",
"xIpQN1": "사용량 데이터 로드 실패",
diff --git a/client/messages/pl.json b/client/messages/pl.json
index 435e8df22..6bc9ec3e7 100644
--- a/client/messages/pl.json
+++ b/client/messages/pl.json
@@ -331,6 +331,7 @@
"TUwf1V": "Implementacja wariantu",
"vmlGzW": "Zdarzenie konwersji",
"Dmxerh": "Dla tego celu ścieżki nie jest potrzebny kod zdarzenia konwersji. Rybbit zliczy sesje, które dotrą do {goalLabel}.",
+ "zwhI6a": "Dla tego celu nie jest potrzebny kod zdarzenia konwersji. Rybbit śledzi go automatycznie na podstawie zachowania użytkownika.",
"wzKC2G": "Dodaj główny cel później, aby obliczać konwersje dla każdego wariantu.",
"itC9lG": "Podstawy",
"XPX/Qj": "Przypisanie",
@@ -475,6 +476,9 @@
"gMhqKV": "Klonuj lejek",
"IZnwKa": "Edytuj lejek",
"rIc2Hm": "Zaktualizuj lejek",
+ "m1czzY": "Zdarzenie",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "sesje",
"lHFZhY": "{count} porzuciło",
"zIaJNz": "Dotarło ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Skonfiguruj kroki lejka",
"XFyfI5": "Ogólna konwersja",
"AFl3K6": "Konwersja z poprzedniego kroku",
+ "Y6DkLY": "Ścieżka (np. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Podgląd lejka",
"Cf6LHR": "Nazwa lejka",
"TOuHNM": "Wprowadź nazwę lejka",
"+U6ozc": "Typ",
- "m1czzY": "Zdarzenie",
- "Y6DkLY": "Ścieżka (np. /pricing)",
"Hp/0iW": "Wprowadź ścieżkę (np. /checkout), nie pełny URL.",
"Asi2Jg": "Ukryj zaawansowane opcje",
"lIEejV": "Pokaż zaawansowane opcje",
@@ -507,6 +514,7 @@
"ox304v": "Wystąpił błąd",
"KbGBQH": "Wystąpił błąd podczas zapisywania",
"/liMUf": "Lejek usunięty pomyślnie",
+ "ToO3/h": "",
"753yX5": "Etykieta",
"+SDMR3": "Właściwość",
"znwd1N": "Usuń lejek",
@@ -549,8 +557,6 @@
"5WuADX": "Dodaj cel",
"WuHoZ9": "Konwersje",
"e/U0Xt": "Współczynnik konwersji",
- "+Ior19": "Cel strony",
- "rTE34i": "Cel zdarzenia",
"pW4lxD": "Wzorzec",
"99Lkvz": "Akcje celu",
"sOXElg": "Edytuj cel",
@@ -562,6 +568,25 @@
"6VzeBI": "Żadna sesja nie skonwertowała na ten cel w wybranym okresie.",
"XYTxH5": "Czy na pewno chcesz usunąć ten cel?",
"AcQH1r": "Tej czynności nie można cofnąć. Cel zostanie trwale usunięty i usunięty ze wszystkich raportów.",
+ "cegNe7": "Link wychodzący",
+ "/kZg9i": "Kliknięcie przycisku",
+ "b2DnPM": "Wysłanie formularza",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Dopasuj określone właściwości zdarzenia",
+ "zyQ3nw": "Dodaj kolejną właściwość",
+ "GXgKR9": "Dopasuj określone parametry URL",
+ "Uu8skg": "Dodaj kolejny parametr",
+ "y467+0": "Nie udało się zapisać celu",
"X2PZ7D": "Utwórz cel",
"JiYl78": "Zaktualizuj szczegóły celu poniżej.",
"giLKKG": "Sklonuj ten cel z taką samą konfiguracją.",
@@ -571,10 +596,8 @@
"yZaYFs": "Typ celu",
"FfRGEE": "Wzorzec ścieżki",
"JoUePd": "Użyj * aby dopasować pojedynczy segment ścieżki. Użyj ** aby dopasować wiele segmentów.",
- "GXgKR9": "Dopasuj określone parametry URL",
- "Uu8skg": "Dodaj kolejny parametr",
- "23lYVR": "Dopasuj określone właściwości zdarzenia",
- "zyQ3nw": "Dodaj kolejną właściwość",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Zaktualizuj",
"VzzYJk": "Utwórz",
"maXs2s": "Filtruj cele",
@@ -619,7 +642,6 @@
"ogKEiU": "Linki wychodzące",
"VLKK35": "Kliknięcia",
"6kvpmt": "Filtruj {count} linków...",
- "cegNe7": "Link wychodzący",
"pEc/5k": "% kliknięć",
"wU7PzI": "Ostatnio kliknięto",
"4KEfRY": "Tytuły",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Poproś właściciela organizacji o ulepszenie do Pro, aby odblokować {message}",
"jsy7pk": "Spróbuj ponownie",
"hyfdry": "Odsłona",
- "/kZg9i": "Kliknięcie przycisku",
- "b2DnPM": "Wysłanie formularza",
"TH+8LD": "Zmiana danych wejściowych",
"yQUiLi": "Ładowanie danych o wykorzystaniu...",
"xIpQN1": "Nie udało się załadować danych o wykorzystaniu",
diff --git a/client/messages/pt.json b/client/messages/pt.json
index 51d2e311f..35c54eaa6 100644
--- a/client/messages/pt.json
+++ b/client/messages/pt.json
@@ -331,6 +331,7 @@
"TUwf1V": "Implementação da variante",
"vmlGzW": "Evento de conversão",
"Dmxerh": "Nenhum código de evento de conversão é necessário para esta meta de caminho. O Rybbit contará as sessões que chegarem a {goalLabel}.",
+ "zwhI6a": "Nenhum código de evento de conversão é necessário para esta meta. O Rybbit a rastreia automaticamente com base no comportamento do usuário.",
"wzKC2G": "Adicione uma meta principal depois para calcular as conversões de cada variante.",
"itC9lG": "Básico",
"XPX/Qj": "Atribuição",
@@ -475,6 +476,9 @@
"gMhqKV": "Clonar Funil",
"IZnwKa": "Editar Funil",
"rIc2Hm": "Atualizar Funil",
+ "m1czzY": "Evento",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "sessões",
"lHFZhY": "{count} abandonaram",
"zIaJNz": "Alcançaram ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Configure as etapas do seu funil",
"XFyfI5": "Conversão geral",
"AFl3K6": "Conversão da etapa anterior",
+ "Y6DkLY": "Caminho (ex. /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Pré-visualização do Funil",
"Cf6LHR": "Nome do Funil",
"TOuHNM": "Digite o nome do funil",
"+U6ozc": "Tipo",
- "m1czzY": "Evento",
- "Y6DkLY": "Caminho (ex. /pricing)",
"Hp/0iW": "Digite um caminho (ex., /checkout), não uma URL completa.",
"Asi2Jg": "Ocultar opções avançadas",
"lIEejV": "Mostrar opções avançadas",
@@ -507,6 +514,7 @@
"ox304v": "Ocorreu um erro",
"KbGBQH": "Ocorreu um erro ao salvar",
"/liMUf": "Funil excluído com sucesso",
+ "ToO3/h": "",
"753yX5": "Rótulo",
"+SDMR3": "Propriedade",
"znwd1N": "Excluir Funil",
@@ -549,8 +557,6 @@
"5WuADX": "Adicionar Meta",
"WuHoZ9": "Conversões",
"e/U0Xt": "Taxa de Conversão",
- "+Ior19": "Meta de Página",
- "rTE34i": "Meta de Evento",
"pW4lxD": "Padrão",
"99Lkvz": "Ações da meta",
"sOXElg": "Editar Meta",
@@ -562,6 +568,25 @@
"6VzeBI": "Nenhuma sessão converteu para esta meta no período selecionado.",
"XYTxH5": "Tem certeza de que deseja excluir esta meta?",
"AcQH1r": "Esta ação não pode ser desfeita. Isso excluirá permanentemente a meta e a removerá de todos os relatórios.",
+ "cegNe7": "Link Externo",
+ "/kZg9i": "Clique no botão",
+ "b2DnPM": "Envio de formulário",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Corresponder propriedades de evento específicas",
+ "zyQ3nw": "Adicionar Outra Propriedade",
+ "GXgKR9": "Corresponder parâmetros de URL específicos",
+ "Uu8skg": "Adicionar Outro Parâmetro",
+ "y467+0": "Falha ao salvar meta",
"X2PZ7D": "Criar Meta",
"JiYl78": "Atualize os detalhes da meta abaixo.",
"giLKKG": "Clone esta meta com a mesma configuração.",
@@ -571,10 +596,8 @@
"yZaYFs": "Tipo de Meta",
"FfRGEE": "Padrão de Caminho",
"JoUePd": "Use * para corresponder a um único segmento de caminho. Use ** para corresponder entre segmentos.",
- "GXgKR9": "Corresponder parâmetros de URL específicos",
- "Uu8skg": "Adicionar Outro Parâmetro",
- "23lYVR": "Corresponder propriedades de evento específicas",
- "zyQ3nw": "Adicionar Outra Propriedade",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Atualizar",
"VzzYJk": "Criar",
"maXs2s": "Filtrar metas",
@@ -619,7 +642,6 @@
"ogKEiU": "Links Externos",
"VLKK35": "Cliques",
"6kvpmt": "Filtrar {count} links...",
- "cegNe7": "Link Externo",
"pEc/5k": "Clique %",
"wU7PzI": "Último Clique",
"4KEfRY": "Títulos",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Peça ao proprietário da sua organização para atualizar para Pro para desbloquear {message}",
"jsy7pk": "Tentar Novamente",
"hyfdry": "Visualização de página",
- "/kZg9i": "Clique no botão",
- "b2DnPM": "Envio de formulário",
"TH+8LD": "Alteração de entrada",
"yQUiLi": "Carregando dados de uso...",
"xIpQN1": "Falha ao carregar dados de uso",
diff --git a/client/messages/uk.json b/client/messages/uk.json
index fcab58f16..f0a6391ba 100644
--- a/client/messages/uk.json
+++ b/client/messages/uk.json
@@ -331,6 +331,7 @@
"TUwf1V": "",
"vmlGzW": "",
"Dmxerh": "",
+ "zwhI6a": "",
"wzKC2G": "",
"itC9lG": "",
"XPX/Qj": "",
@@ -475,6 +476,9 @@
"gMhqKV": "Клонувати воронку",
"IZnwKa": "Редагувати воронку",
"rIc2Hm": "Оновити воронку",
+ "m1czzY": "Подія",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "сеанси",
"lHFZhY": "Відпало: {count}",
"zIaJNz": "Досягли ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "Налаштуйте кроки вашої воронки",
"XFyfI5": "Загальна конверсія",
"AFl3K6": "Конверсія з попереднього кроку",
+ "Y6DkLY": "Шлях (наприклад, /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "Попередній перегляд воронки",
"Cf6LHR": "Назва воронки",
"TOuHNM": "Введіть назву воронки",
"+U6ozc": "Тип",
- "m1czzY": "Подія",
- "Y6DkLY": "Шлях (наприклад, /pricing)",
"Hp/0iW": "Введіть шлях (наприклад, /checkout), а не повну URL-адресу.",
"Asi2Jg": "Приховати розширені опції",
"lIEejV": "Показати розширені опції",
@@ -507,6 +514,7 @@
"ox304v": "Сталася помилка",
"KbGBQH": "Сталася помилка під час збереження",
"/liMUf": "Воронку успішно видалено",
+ "ToO3/h": "",
"753yX5": "Мітка",
"+SDMR3": "Властивість",
"znwd1N": "Видалити воронку",
@@ -549,8 +557,6 @@
"5WuADX": "Додати ціль",
"WuHoZ9": "Конверсії",
"e/U0Xt": "Коефіцієнт конверсії",
- "+Ior19": "Цільова сторінка",
- "rTE34i": "Цільова подія",
"pW4lxD": "Шаблон",
"99Lkvz": "",
"sOXElg": "Редагувати ціль",
@@ -562,6 +568,25 @@
"6VzeBI": "Жоден сеанс не виконав цю ціль за вибраний період.",
"XYTxH5": "Ви впевнені, що хочете видалити цю ціль?",
"AcQH1r": "Цю дію неможливо скасувати. Ціль буде остаточно видалено з усіх звітів.",
+ "cegNe7": "Вихідне посилання",
+ "/kZg9i": "Клік по кнопці",
+ "b2DnPM": "Відправка форми",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "Відповідність певним властивостям події",
+ "zyQ3nw": "Додати ще одну властивість",
+ "GXgKR9": "Відповідність певним параметрам URL",
+ "Uu8skg": "Додати ще один параметр",
+ "y467+0": "",
"X2PZ7D": "Створити ціль",
"JiYl78": "Оновіть деталі цілі нижче.",
"giLKKG": "Клонувати цю ціль із тією ж конфігурацією.",
@@ -571,10 +596,8 @@
"yZaYFs": "Тип цілі",
"FfRGEE": "Шаблон шляху",
"JoUePd": "Використовуйте * для збігу з одним сегментом шляху. Використовуйте ** для збігу з кількома сегментами.",
- "GXgKR9": "Відповідність певним параметрам URL",
- "Uu8skg": "Додати ще один параметр",
- "23lYVR": "Відповідність певним властивостям події",
- "zyQ3nw": "Додати ще одну властивість",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "Оновити",
"VzzYJk": "Створити",
"maXs2s": "Фільтрувати цілі",
@@ -619,7 +642,6 @@
"ogKEiU": "Вихідні посилання",
"VLKK35": "Кліки",
"6kvpmt": "Фільтрувати {count} посилань...",
- "cegNe7": "Вихідне посилання",
"pEc/5k": "% кліків",
"wU7PzI": "Останній клік",
"4KEfRY": "Заголовки",
@@ -1242,8 +1264,6 @@
"RL7HbL": "Попросіть власника організації перейти на план Pro, щоб розблокувати {message}",
"jsy7pk": "Спробувати ще раз",
"hyfdry": "Перегляд сторінки",
- "/kZg9i": "Клік по кнопці",
- "b2DnPM": "Відправка форми",
"TH+8LD": "Зміна поля вводу",
"yQUiLi": "Завантаження даних про використання...",
"xIpQN1": "Не вдалося завантажити дані про використання",
diff --git a/client/messages/zh.json b/client/messages/zh.json
index 62d8faeba..3f4fcfd5c 100644
--- a/client/messages/zh.json
+++ b/client/messages/zh.json
@@ -331,6 +331,7 @@
"TUwf1V": "变体实现",
"vmlGzW": "转化事件",
"Dmxerh": "此路径目标无需转化事件代码。Rybbit 将统计到达 {goalLabel} 的会话数。",
+ "zwhI6a": "此目标无需转化事件代码。Rybbit 会根据用户行为自动追踪。",
"wzKC2G": "稍后添加主要目标以计算各变体的转化情况。",
"itC9lG": "基本信息",
"XPX/Qj": "分配",
@@ -475,6 +476,9 @@
"gMhqKV": "克隆漏斗",
"IZnwKa": "编辑漏斗",
"rIc2Hm": "更新漏斗",
+ "m1czzY": "事件",
+ "KP63fg": "",
+ "baRFiF": "",
"29V0Ci": "个会话",
"lHFZhY": "{count} 人流失",
"zIaJNz": "已到达 ({count})",
@@ -487,12 +491,15 @@
"gUKiFL": "配置您的漏斗步骤",
"XFyfI5": "整体转化率",
"AFl3K6": "较上一步的转化率",
+ "Y6DkLY": "路径(例如 /pricing)",
+ "OZ7LR+": "",
+ "+aHMUx": "",
+ "vHXIqS": "",
+ "tWsaCv": "",
"s+vZVl": "漏斗预览",
"Cf6LHR": "漏斗名称",
"TOuHNM": "输入漏斗名称",
"+U6ozc": "类型",
- "m1czzY": "事件",
- "Y6DkLY": "路径(例如 /pricing)",
"Hp/0iW": "输入一个路径(例如 /checkout),而不是完整的 URL。",
"Asi2Jg": "隐藏高级选项",
"lIEejV": "显示高级选项",
@@ -507,6 +514,7 @@
"ox304v": "发生错误",
"KbGBQH": "保存时发生错误",
"/liMUf": "漏斗删除成功",
+ "ToO3/h": "",
"753yX5": "标签",
"+SDMR3": "属性",
"znwd1N": "删除漏斗",
@@ -549,8 +557,6 @@
"5WuADX": "添加目标",
"WuHoZ9": "转化次数",
"e/U0Xt": "转化率",
- "+Ior19": "页面目标",
- "rTE34i": "事件目标",
"pW4lxD": "模式",
"99Lkvz": "目标操作",
"sOXElg": "编辑目标",
@@ -562,6 +568,25 @@
"6VzeBI": "在选定的时间段内,没有会话转化为该目标。",
"XYTxH5": "您确定要删除此目标吗?",
"AcQH1r": "此操作无法撤销。这将永久删除该目标,并将其从所有报告中移除。",
+ "cegNe7": "出站链接",
+ "/kZg9i": "按钮点击",
+ "b2DnPM": "表单提交",
+ "8VHF7f": "",
+ "3f4M9X": "",
+ "RzSw2z": "",
+ "aY/v+a": "",
+ "PbRfhj": "",
+ "HTIpVv": "",
+ "L/Sv0H": "",
+ "/EZDL1": "",
+ "iEFpLb": "",
+ "3Q4Tx9": "",
+ "BhbATb": "",
+ "23lYVR": "匹配特定的事件属性",
+ "zyQ3nw": "添加另一个属性",
+ "GXgKR9": "匹配特定的 URL 参数",
+ "Uu8skg": "添加另一个参数",
+ "y467+0": "保存目标失败",
"X2PZ7D": "创建目标",
"JiYl78": "在下方更新目标详情。",
"giLKKG": "使用相同配置克隆此目标。",
@@ -571,10 +596,8 @@
"yZaYFs": "目标类型",
"FfRGEE": "路径模式",
"JoUePd": "使用 * 匹配单个路径段。使用 ** 匹配多个路径段。",
- "GXgKR9": "匹配特定的 URL 参数",
- "Uu8skg": "添加另一个参数",
- "23lYVR": "匹配特定的事件属性",
- "zyQ3nw": "添加另一个属性",
+ "u4SPeu": "",
+ "KYAqNj": "",
"BWpuKl": "更新",
"VzzYJk": "创建",
"maXs2s": "过滤目标",
@@ -619,7 +642,6 @@
"ogKEiU": "出站链接",
"VLKK35": "点击次数",
"6kvpmt": "过滤 {count} 个链接...",
- "cegNe7": "出站链接",
"pEc/5k": "点击 %",
"wU7PzI": "最后点击时间",
"4KEfRY": "标题",
@@ -1242,8 +1264,6 @@
"RL7HbL": "请求您的组织所有者升级到 Pro 即可解锁 {message}",
"jsy7pk": "再试一次",
"hyfdry": "页面浏览",
- "/kZg9i": "按钮点击",
- "b2DnPM": "表单提交",
"TH+8LD": "输入更改",
"yQUiLi": "正在加载使用情况数据...",
"xIpQN1": "加载使用情况数据失败",
diff --git a/client/src/api/analytics/endpoints/events.ts b/client/src/api/analytics/endpoints/events.ts
index 9a072764c..f5bd55bf9 100644
--- a/client/src/api/analytics/endpoints/events.ts
+++ b/client/src/api/analytics/endpoints/events.ts
@@ -60,6 +60,12 @@ export type EventProperty = {
count: number;
};
+// Common value of an autocapture event type's primary props (used for suggestions)
+export type AutocaptureValue = {
+ value: string;
+ count: number;
+};
+
// Outbound link click data
export type OutboundLink = {
url: string;
@@ -198,6 +204,27 @@ export async function fetchOutboundLinks(
return response.data;
}
+/**
+ * Fetch common values for an autocapture event type (outbound urls, button
+ * texts, form names/ids, copied texts)
+ * GET /api/sites/:site/events/autocapture-values
+ */
+export async function fetchAutocaptureValues(
+ site: string | number,
+ params: CommonApiParams & { type: string }
+): Promise<AutocaptureValue[]> {
+ const queryParams = {
+ ...toQueryParams(params),
+ type: params.type,
+ };
+
+ const response = await authedFetch<{ data: AutocaptureValue[] }>(
+ `/sites/${site}/events/autocapture-values`,
+ queryParams
+ );
+ return response.data;
+}
+
/**
* Fetch bucketed event counts for top custom events
* GET /api/sites/:site/events/time-series
diff --git a/client/src/api/analytics/endpoints/experiments.ts b/client/src/api/analytics/endpoints/experiments.ts
index 3557d3679..0e3143a87 100644
--- a/client/src/api/analytics/endpoints/experiments.ts
+++ b/client/src/api/analytics/endpoints/experiments.ts
@@ -6,6 +6,7 @@ import type {
FeatureFlagType,
FeatureFlagVariant,
} from "./featureFlags";
+import type { GoalConfig, GoalType } from "./goals";
import { CommonApiParams, toQueryParams } from "./types";
export type ExperimentStatus = "draft" | "running" | "paused" | "completed";
@@ -31,17 +32,8 @@ export type ExperimentGoal = {
goalId: number;
siteId: number;
name: string | null;
- goalType: "path" | "event";
- config: {
- pathPattern?: string;
- eventName?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
- };
+ goalType: GoalType;
+ config: GoalConfig;
createdAt: string;
};
diff --git a/client/src/api/analytics/endpoints/funnels.ts b/client/src/api/analytics/endpoints/funnels.ts
index ddc450c8f..5a1daacc4 100644
--- a/client/src/api/analytics/endpoints/funnels.ts
+++ b/client/src/api/analytics/endpoints/funnels.ts
@@ -1,12 +1,16 @@
+import type { AutocaptureTargetType } from "../../../lib/events";
import { authedFetch } from "../../utils";
import { CommonApiParams, PaginationParams, toQueryParams } from "./types";
import type { GetSessionsResponse } from "./sessions";
+// Funnel step types: page paths, custom events, and autocaptured event types
+export type FunnelStepType = "page" | "event" | AutocaptureTargetType;
+
// Funnel step type
export type FunnelStep = {
value: string;
name?: string;
- type: "page" | "event";
+ type: FunnelStepType;
hostname?: string;
// Deprecated fields - kept for backwards compatibility
eventPropertyKey?: string;
@@ -18,6 +22,16 @@ export type FunnelStep = {
}>;
};
+// Page and event steps need a value; autocapture steps may leave it empty to
+// match any event of their type
+export function stepRequiresValue(step: FunnelStep): boolean {
+ return step.type === "page" || step.type === "event";
+}
+
+export function hasIncompleteSteps(steps: FunnelStep[]): boolean {
+ return steps.some(step => stepRequiresValue(step) && !step.value);
+}
+
// Funnel request type
export type FunnelRequest = {
steps: FunnelStep[];
diff --git a/client/src/api/analytics/endpoints/goals.ts b/client/src/api/analytics/endpoints/goals.ts
index 9f18f0551..f6df823f1 100644
--- a/client/src/api/analytics/endpoints/goals.ts
+++ b/client/src/api/analytics/endpoints/goals.ts
@@ -1,3 +1,4 @@
+import type { AutocaptureTargetType } from "../../../lib/events";
import { authedFetch } from "../../utils";
import {
BucketedParams,
@@ -9,23 +10,30 @@ import {
} from "./types";
import type { GetSessionsResponse } from "./sessions";
+// Goal types: page paths, custom events, and autocaptured event types
+export type GoalType = "path" | "event" | AutocaptureTargetType;
+
+export interface GoalConfig {
+ pathPattern?: string;
+ eventName?: string;
+ // Optional wildcard pattern for autocapture goals (URL, button text, form name/id, copied text)
+ valuePattern?: string;
+ // Deprecated fields - kept for backwards compatibility
+ eventPropertyKey?: string;
+ eventPropertyValue?: string | number | boolean;
+ // New field for multiple property filters
+ propertyFilters?: Array<{
+ key: string;
+ value: string | number | boolean;
+ }>;
+}
+
// Goal type
export interface Goal {
goalId: number;
name: string | null;
- goalType: "path" | "event";
- config: {
- pathPattern?: string;
- eventName?: string;
- // Deprecated fields - kept for backwards compatibility
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- // New field for multiple property filters
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
- };
+ goalType: GoalType;
+ config: GoalConfig;
createdAt: string;
total_conversions: number;
total_sessions: number;
@@ -70,17 +78,8 @@ export interface GoalSessionsParams extends CommonApiParams, PaginationParams {
export interface CreateGoalParams {
name?: string;
- goalType: "path" | "event";
- config: {
- pathPattern?: string;
- eventName?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
- };
+ goalType: GoalType;
+ config: GoalConfig;
}
export interface UpdateGoalParams extends CreateGoalParams {
diff --git a/client/src/api/analytics/endpoints/index.ts b/client/src/api/analytics/endpoints/index.ts
index 42a78cf27..3a9954294 100644
--- a/client/src/api/analytics/endpoints/index.ts
+++ b/client/src/api/analytics/endpoints/index.ts
@@ -25,6 +25,7 @@ export {
fetchEventsCursor,
fetchEventNames,
fetchEventProperties,
+ fetchAutocaptureValues,
fetchOutboundLinks,
fetchSiteEventCount,
} from "./events";
@@ -35,6 +36,7 @@ export type {
CursorEventsResponse,
EventName,
EventProperty,
+ AutocaptureValue,
OutboundLink,
EventBucketedParams,
EventPropertiesParams,
@@ -82,6 +84,8 @@ export type {
export { fetchGoals, fetchGoalTimeSeries, fetchGoalSessions, createGoal, updateGoal, deleteGoal } from "./goals";
export type {
Goal,
+ GoalType,
+ GoalConfig,
GoalTimeSeriesPoint,
PaginationMeta,
GoalsResponse,
@@ -127,10 +131,19 @@ export type {
} from "./experiments";
// Funnels endpoints
-export { fetchFunnels, analyzeFunnel, fetchFunnelStepSessions, saveFunnel, deleteFunnel } from "./funnels";
+export {
+ fetchFunnels,
+ analyzeFunnel,
+ fetchFunnelStepSessions,
+ saveFunnel,
+ deleteFunnel,
+ stepRequiresValue,
+ hasIncompleteSteps,
+} from "./funnels";
export type {
SavedFunnel,
FunnelStep,
+ FunnelStepType,
FunnelRequest,
SaveFunnelRequest,
FunnelResponse,
diff --git a/client/src/api/analytics/hooks/events/useAutocaptureValues.ts b/client/src/api/analytics/hooks/events/useAutocaptureValues.ts
new file mode 100644
index 000000000..d8fb75cfc
--- /dev/null
+++ b/client/src/api/analytics/hooks/events/useAutocaptureValues.ts
@@ -0,0 +1,48 @@
+import { useQueries, useQuery } from "@tanstack/react-query";
+import { useMemo } from "react";
+import { AUTOCAPTURE_TARGET_TYPES, AutocaptureTargetType } from "../../../../lib/events";
+import { useStore } from "../../../../lib/store";
+import { buildApiParams } from "../../../utils";
+import { AutocaptureValue, fetchAutocaptureValues } from "../../endpoints";
+
+// Suggestions for goal/funnel-step value patterns: the most common values of
+// an autocapture type's primary props (urls, button texts, form names, ...)
+export function useAutocaptureValues(type: string, enabled: boolean = true) {
+ const { site, time, timezone } = useStore();
+
+ const params = buildApiParams(time);
+
+ return useQuery({
+ queryKey: ["autocapture-values", site, type, time, timezone],
+ enabled: enabled && !!site,
+ queryFn: () => fetchAutocaptureValues(site, { ...params, type }),
+ });
+}
+
+// Same suggestions, fetched for every autocapture type at once (only types in
+// `enabledTypes` actually query). Returns a map keyed by type so callers don't
+// need one useAutocaptureValues call per type.
+export function useAutocaptureValuesByType(
+ enabledTypes: ReadonlySet<AutocaptureTargetType>
+): Record<AutocaptureTargetType, AutocaptureValue[] | undefined> {
+ const { site, time, timezone } = useStore();
+ const params = buildApiParams(time);
+
+ const results = useQueries({
+ queries: AUTOCAPTURE_TARGET_TYPES.map(type => ({
+ queryKey: ["autocapture-values", site, type, time, timezone],
+ enabled: enabledTypes.has(type) && !!site,
+ queryFn: () => fetchAutocaptureValues(site, { ...params, type }),
+ })),
+ });
+
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ return useMemo(
+ () =>
+ Object.fromEntries(AUTOCAPTURE_TARGET_TYPES.map((type, index) => [type, results[index].data])) as Record<
+ AutocaptureTargetType,
+ AutocaptureValue[] | undefined
+ >,
+ results.map(result => result.data)
+ );
+}
diff --git a/client/src/api/analytics/hooks/goals/useCreateGoal.ts b/client/src/api/analytics/hooks/goals/useCreateGoal.ts
index 3e35090d5..9def65649 100644
--- a/client/src/api/analytics/hooks/goals/useCreateGoal.ts
+++ b/client/src/api/analytics/hooks/goals/useCreateGoal.ts
@@ -1,16 +1,11 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
-import { createGoal } from "../../endpoints";
+import { createGoal, GoalConfig, GoalType } from "../../endpoints";
export interface CreateGoalRequest {
siteId: number;
name?: string;
- goalType: "path" | "event";
- config: {
- pathPattern?: string;
- eventName?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- };
+ goalType: GoalType;
+ config: GoalConfig;
}
interface CreateGoalResponse {
diff --git a/client/src/api/analytics/hooks/goals/useUpdateGoal.ts b/client/src/api/analytics/hooks/goals/useUpdateGoal.ts
index ba0461aa5..e3aa1b137 100644
--- a/client/src/api/analytics/hooks/goals/useUpdateGoal.ts
+++ b/client/src/api/analytics/hooks/goals/useUpdateGoal.ts
@@ -1,22 +1,13 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useStore } from "../../../../lib/store";
-import { updateGoal } from "../../endpoints";
+import { GoalConfig, GoalType, updateGoal } from "../../endpoints";
export interface UpdateGoalRequest {
goalId: number;
siteId: number;
name?: string;
- goalType: "path" | "event";
- config: {
- pathPattern?: string;
- eventName?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
- };
+ goalType: GoalType;
+ config: GoalConfig;
}
interface UpdateGoalResponse {
diff --git a/client/src/app/[site]/experiments/components/CreateExperimentWizard.tsx b/client/src/app/[site]/experiments/components/CreateExperimentWizard.tsx
index 0d9f22bd2..3d9bc7d4f 100644
--- a/client/src/app/[site]/experiments/components/CreateExperimentWizard.tsx
+++ b/client/src/app/[site]/experiments/components/CreateExperimentWizard.tsx
@@ -1,6 +1,6 @@
"use client";
-import type { Experiment, FeatureFlagVariant } from "@/api/analytics/endpoints";
+import type { Experiment, FeatureFlagVariant, GoalType as AnyGoalType } from "@/api/analytics/endpoints";
import { useCreateExperiment, useUpdateExperiment } from "@/api/analytics/hooks/experiments/useExperiments";
import { useCreateFeatureFlag, useFeatureFlags } from "@/api/analytics/hooks/featureFlags/useFeatureFlags";
import { useCreateGoal } from "@/api/analytics/hooks/goals/useCreateGoal";
@@ -55,7 +55,7 @@ type ImplementationState = {
flagKey: string;
variants: string[];
goalMode: GoalMode;
- goalType?: GoalType;
+ goalType?: AnyGoalType;
goalLabel?: string;
};
@@ -131,7 +131,7 @@ function initialForm(experiment?: Experiment): WizardForm {
goalMode: experiment.primaryGoalId ? "existing" : "none",
existingGoalId: experiment.primaryGoalId ? String(experiment.primaryGoalId) : "",
goalName: primaryGoal?.name || "",
- goalType: primaryGoal?.goalType || "path",
+ goalType: primaryGoal?.goalType === "event" ? "event" : "path",
pathPattern: primaryGoal?.config.pathPattern || "",
eventName: primaryGoal?.config.eventName || "",
};
@@ -158,6 +158,19 @@ function initialForm(experiment?: Experiment): WizardForm {
};
}
+// The pattern a goal matches against, regardless of its type (path/event/autocapture)
+function goalDisplayPattern(
+ goal?: {
+ goalType: AnyGoalType;
+ config: { pathPattern?: string; eventName?: string; valuePattern?: string };
+ } | null
+): string | undefined {
+ if (!goal) return undefined;
+ if (goal.goalType === "path") return goal.config.pathPattern;
+ if (goal.goalType === "event") return goal.config.eventName;
+ return goal.config.valuePattern;
+}
+
function getVariantKeys(flag: VariantSourceFlag) {
return [
...new Set([
@@ -502,9 +515,7 @@ export function CreateExperimentWizard({
form.goalMode === "existing" ? selectedGoal?.goalType : form.goalMode === "new" ? form.goalType : undefined;
const goalLabel =
form.goalMode === "existing"
- ? selectedGoal?.goalType === "path"
- ? selectedGoal.config.pathPattern
- : selectedGoal?.config.eventName
+ ? goalDisplayPattern(selectedGoal)
: form.goalMode === "new"
? form.goalType === "path"
? form.pathPattern.trim()
@@ -570,15 +581,8 @@ export function CreateExperimentWizard({
}
let primaryGoalId: number | null = form.goalMode === "existing" ? Number(form.existingGoalId) : null;
- let goalType: GoalType | undefined = selectedGoal?.goalType;
- let goalLabel =
- selectedGoal?.goalType === "path"
- ? selectedGoal.config.pathPattern
- : selectedGoal?.goalType === "event"
- ? selectedGoal.config.eventName
- : form.goalMode === "none"
- ? undefined
- : form.goalName.trim();
+ let goalType: AnyGoalType | undefined = selectedGoal?.goalType;
+ let goalLabel = form.goalMode === "none" ? undefined : (goalDisplayPattern(selectedGoal) ?? form.goalName.trim());
if (form.goalMode === "new") {
const createdGoal = await createGoalMutation.mutateAsync({
@@ -665,15 +669,8 @@ export function CreateExperimentWizard({
}
let primaryGoalId: number | null = form.goalMode === "existing" ? Number(form.existingGoalId) : null;
- let goalType: GoalType | undefined = selectedGoal?.goalType;
- let goalLabel =
- selectedGoal?.goalType === "path"
- ? selectedGoal.config.pathPattern
- : selectedGoal?.goalType === "event"
- ? selectedGoal.config.eventName
- : form.goalMode === "none"
- ? undefined
- : form.goalName.trim();
+ let goalType: AnyGoalType | undefined = selectedGoal?.goalType;
+ let goalLabel = form.goalMode === "none" ? undefined : (goalDisplayPattern(selectedGoal) ?? form.goalName.trim());
if (form.goalMode === "new") {
const createdGoal = await createGoalMutation.mutateAsync({
@@ -1085,6 +1082,10 @@ window.rybbit.onReady((rybbit) => {
}
)}
</p>
+ ) : implementationState.goalType && implementationState.goalType !== "event" ? (
+ <p className="rounded-md border border-neutral-150 bg-neutral-50 p-3 text-sm text-neutral-600 dark:border-neutral-800 dark:bg-neutral-900/40 dark:text-neutral-300">
+ {t("No conversion event code is needed for this goal. Rybbit tracks it automatically based on user behavior.")}
+ </p>
) : (
<p className="rounded-md border border-neutral-150 bg-neutral-50 p-3 text-sm text-neutral-600 dark:border-neutral-800 dark:bg-neutral-900/40 dark:text-neutral-300">
{t("Add a primary goal later to calculate conversions for each variant.")}
diff --git a/client/src/app/[site]/funnels/components/CreateFunnel.tsx b/client/src/app/[site]/funnels/components/CreateFunnel.tsx
index 8bee4c9ac..5c65e08c5 100644
--- a/client/src/app/[site]/funnels/components/CreateFunnel.tsx
+++ b/client/src/app/[site]/funnels/components/CreateFunnel.tsx
@@ -7,7 +7,7 @@ import { Plus } from "lucide-react";
import { useState } from "react";
import { toast } from "@/components/ui/sonner";
import { useGetFunnel, useSaveFunnel } from "../../../../api/analytics/hooks/funnels/useGetFunnel";
-import { FunnelStep } from "../../../../api/analytics/endpoints";
+import { FunnelStep, hasIncompleteSteps } from "../../../../api/analytics/endpoints";
import { FunnelForm } from "./FunnelForm";
export function CreateFunnelDialog() {
@@ -30,7 +30,7 @@ export function CreateFunnelDialog() {
error,
isLoading: isPending,
} = useGetFunnel(
- steps.some(step => !step.value)
+ hasIncompleteSteps(steps)
? undefined
: {
steps,
@@ -44,7 +44,7 @@ export function CreateFunnelDialog() {
// Query funnel without saving
const handleQueryFunnel = () => {
// Validate steps have values
- const hasEmptySteps = steps.some(step => !step.value);
+ const hasEmptySteps = hasIncompleteSteps(steps);
if (hasEmptySteps) {
alert(t("All steps must have values"));
return;
@@ -60,7 +60,7 @@ export function CreateFunnelDialog() {
}
// Validate steps have values
- const hasEmptySteps = steps.some(step => !step.value);
+ const hasEmptySteps = hasIncompleteSteps(steps);
if (hasEmptySteps) {
alert(t("All steps must have values"));
return;
diff --git a/client/src/app/[site]/funnels/components/EditFunnel.tsx b/client/src/app/[site]/funnels/components/EditFunnel.tsx
index ef52aeff1..66b14cc11 100644
--- a/client/src/app/[site]/funnels/components/EditFunnel.tsx
+++ b/client/src/app/[site]/funnels/components/EditFunnel.tsx
@@ -5,7 +5,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/u
import { useEffect, useState } from "react";
import { toast } from "@/components/ui/sonner";
import { useGetFunnel, useSaveFunnel } from "../../../../api/analytics/hooks/funnels/useGetFunnel";
-import { FunnelStep, SavedFunnel } from "../../../../api/analytics/endpoints";
+import { FunnelStep, hasIncompleteSteps, SavedFunnel } from "../../../../api/analytics/endpoints";
import { FunnelForm } from "./FunnelForm";
interface EditFunnelDialogProps {
@@ -42,7 +42,7 @@ export function EditFunnelDialog({ funnel, isOpen, onClose, isCloneMode = false
// Query funnel without saving
const handleQueryFunnel = () => {
// Validate steps have values
- const hasEmptySteps = steps.some(step => !step.value);
+ const hasEmptySteps = hasIncompleteSteps(steps);
if (hasEmptySteps) {
alert(t("All steps must have values"));
return;
@@ -58,7 +58,7 @@ export function EditFunnelDialog({ funnel, isOpen, onClose, isCloneMode = false
}
// Validate steps have values
- const hasEmptySteps = steps.some(step => !step.value);
+ const hasEmptySteps = hasIncompleteSteps(steps);
if (hasEmptySteps) {
alert(t("All steps must have values"));
return;
diff --git a/client/src/app/[site]/funnels/components/Funnel.tsx b/client/src/app/[site]/funnels/components/Funnel.tsx
index 1013658e3..17862a3a4 100644
--- a/client/src/app/[site]/funnels/components/Funnel.tsx
+++ b/client/src/app/[site]/funnels/components/Funnel.tsx
@@ -4,9 +4,10 @@ import { useExtracted } from "next-intl";
import round from "lodash/round";
import { ChevronDown, ChevronUp } from "lucide-react";
import { useState } from "react";
-import { FunnelResponse, FunnelStep } from "../../../../api/analytics/endpoints";
+import { FunnelResponse, FunnelStep, FunnelStepType } from "../../../../api/analytics/endpoints";
import { useGetFunnelStepSessions } from "../../../../api/analytics/hooks/funnels/useGetFunnelStepSessions";
-import { EventIcon, PageviewIcon } from "../../../../components/EventIcons";
+import { EventTypeIcon } from "../../../../components/EventIcons";
+import { targetTypeToEventType } from "../../../../lib/events";
import { SessionsList } from "../../../../components/Sessions/SessionsList";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../../components/ui/tabs";
import { useStore } from "../../../../lib/store";
@@ -40,6 +41,16 @@ interface FunnelStepComponentProps {
function FunnelStepComponent({ step, index, steps, chartData, firstStep, siteId }: FunnelStepComponentProps) {
const t = useExtracted();
+
+ const stepTypeLabels: Record<FunnelStepType, string> = {
+ page: t("Page"),
+ event: t("Event"),
+ outbound: t("Outbound"),
+ button_click: t("Button"),
+ form_submit: t("Form"),
+ copy: t("Copy"),
+ };
+
const [isExpanded, setIsExpanded] = useState(false);
const [currentTab, setCurrentTab] = useState<"reached" | "dropped">("reached");
const [reachedPage, setReachedPage] = useState(1);
@@ -110,8 +121,8 @@ function FunnelStepComponent({ step, index, steps, chartData, firstStep, siteId
{step.stepNumber}
</div>
<div className="font-medium text-sm flex items-center gap-2 flex-1">
- {steps[index]?.type === "page" ? <PageviewIcon /> : <EventIcon />}
- {step.stepName}
+ <EventTypeIcon type={targetTypeToEventType(steps[index]?.type || "event")} />
+ {step.stepName || stepTypeLabels[steps[index]?.type || "event"]}
</div>
<div className="shrink-0">
{isExpanded ? <ChevronUp className="h-4 w-4" /> : <ChevronDown className="h-4 w-4" />}
diff --git a/client/src/app/[site]/funnels/components/FunnelForm.tsx b/client/src/app/[site]/funnels/components/FunnelForm.tsx
index 01387508b..26a4fea26 100644
--- a/client/src/app/[site]/funnels/components/FunnelForm.tsx
+++ b/client/src/app/[site]/funnels/components/FunnelForm.tsx
@@ -7,11 +7,13 @@ import { cn } from "@/lib/utils";
import { Reorder } from "framer-motion";
import { ChevronDown, ChevronUp, GripVertical, Plus, Save, Trash2, X } from "lucide-react";
import { useMemo, useState } from "react";
-import { FunnelResponse, FunnelStep } from "../../../../api/analytics/endpoints";
+import { FunnelResponse, FunnelStep, FunnelStepType, hasIncompleteSteps } from "../../../../api/analytics/endpoints";
+import { useAutocaptureValuesByType } from "../../../../api/analytics/hooks/events/useAutocaptureValues";
import { useMetric } from "../../../../api/analytics/hooks/useGetMetric";
import { ThreeDotLoader } from "../../../../components/Loaders";
import { Label } from "../../../../components/ui/label";
import { Switch } from "../../../../components/ui/switch";
+import { isAutocaptureTargetType } from "../../../../lib/events";
import { Funnel } from "./Funnel";
const URL_PATTERN = /^(https?:\/\/|www\.|[a-zA-Z0-9-]+\.[a-zA-Z]{2,}\/)/i;
@@ -50,6 +52,25 @@ export function FunnelForm({
funnelData,
}: FunnelFormProps) {
const t = useExtracted();
+
+ const stepTypeLabels: Record<FunnelStepType, string> = {
+ page: t("Path"),
+ event: t("Event"),
+ outbound: t("Outbound"),
+ button_click: t("Button"),
+ form_submit: t("Form"),
+ copy: t("Copy"),
+ };
+
+ const stepValuePlaceholders: Record<FunnelStepType, string> = {
+ page: t("Path (e.g. /pricing)"),
+ event: t("Event name"),
+ outbound: t("URL pattern (optional)"),
+ button_click: t("Button text (optional)"),
+ form_submit: t("Form name or ID (optional)"),
+ copy: t("Copied text (optional)"),
+ };
+
// State to track which event steps have property filtering enabled
const [useProperties, setUseProperties] = useState<boolean[]>(() =>
steps.map(
@@ -111,23 +132,41 @@ export function FunnelForm({
});
// Transform data into SuggestionOption format
- const pathSuggestions: SuggestionOption[] =
- pathsData?.data?.map(item => ({
- value: item.value,
- label: item.value,
- })) || [];
-
- const eventSuggestions: SuggestionOption[] =
- eventsData?.data?.map(item => ({
- value: item.value,
- label: item.value,
- })) || [];
-
- const hostnameSuggestions: SuggestionOption[] =
- hostnamesData?.data?.map(item => ({
- value: item.value,
- label: item.value,
- })) || [];
+ const pathSuggestions: SuggestionOption[] = useMemo(
+ () => pathsData?.data?.map(item => ({ value: item.value, label: item.value })) || [],
+ [pathsData]
+ );
+
+ const eventSuggestions: SuggestionOption[] = useMemo(
+ () => eventsData?.data?.map(item => ({ value: item.value, label: item.value })) || [],
+ [eventsData]
+ );
+
+ const hostnameSuggestions: SuggestionOption[] = useMemo(
+ () => hostnamesData?.data?.map(item => ({ value: item.value, label: item.value })) || [],
+ [hostnamesData]
+ );
+
+ // Suggestions for autocapture step values, fetched only for types in use
+ const enabledAutocaptureTypes = useMemo(
+ () => new Set(steps.map(step => step.type).filter(isAutocaptureTargetType)),
+ [steps]
+ );
+ const autocaptureValuesByType = useAutocaptureValuesByType(enabledAutocaptureTypes);
+
+ const stepSuggestions: Record<FunnelStepType, SuggestionOption[]> = useMemo(() => {
+ const toSuggestions = (values?: { value: string }[]): SuggestionOption[] =>
+ values?.map(item => ({ value: item.value, label: item.value })) || [];
+
+ return {
+ page: pathSuggestions,
+ event: eventSuggestions,
+ outbound: toSuggestions(autocaptureValuesByType.outbound),
+ button_click: toSuggestions(autocaptureValuesByType.button_click),
+ form_submit: toSuggestions(autocaptureValuesByType.form_submit),
+ copy: toSuggestions(autocaptureValuesByType.copy),
+ };
+ }, [pathSuggestions, eventSuggestions, autocaptureValuesByType]);
// Handle reordering steps via drag-and-drop
const handleReorder = (newOrder: string[]) => {
@@ -184,13 +223,27 @@ export function FunnelForm({
};
// Handle step type changes
- const updateStepType = (index: number, type: "page" | "event") => {
+ const updateStepType = (index: number, type: FunnelStepType) => {
+ // Property filters are interpreted differently per step type (URL params vs.
+ // event props), so clear them instead of silently reinterpreting them under
+ // the new type's semantics.
const newSteps = [...steps];
newSteps[index] = {
...newSteps[index],
type,
+ eventPropertyKey: undefined,
+ eventPropertyValue: undefined,
+ propertyFilters: undefined,
};
setSteps(newSteps);
+
+ const newUseProperties = [...useProperties];
+ newUseProperties[index] = false;
+ setUseProperties(newUseProperties);
+
+ const newStepPropertyFilters = [...stepPropertyFilters];
+ newStepPropertyFilters[index] = [{ key: "", value: "" }];
+ setStepPropertyFilters(newStepPropertyFilters);
};
// Handle property filtering toggle
@@ -217,7 +270,7 @@ export function FunnelForm({
funnelArea = <Funnel data={funnelData} isError={isError} error={error} isPending={isPending} steps={steps} />;
}
- if (steps.some(step => !step.value)) {
+ if (hasIncompleteSteps(steps)) {
funnelArea = (
<div className="flex items-center justify-center rounded-lg h-full">
<div className="text-center p-6">
@@ -269,22 +322,22 @@ export function FunnelForm({
<div className="shrink-0 w-6 h-6 rounded-full border border-neutral-300 dark:border-neutral-700 flex items-center justify-center text-xs">
{index + 1}
</div>
- <Select
- value={step.type}
- onValueChange={value => updateStepType(index, value as "page" | "event")}
- >
- <SelectTrigger className="min-w-[80px] max-w-[80px] border-neutral-300 dark:border-neutral-700">
+ <Select value={step.type} onValueChange={value => updateStepType(index, value as FunnelStepType)}>
+ <SelectTrigger className="min-w-[105px] max-w-[105px] border-neutral-300 dark:border-neutral-700">
<SelectValue placeholder={t("Type")} />
</SelectTrigger>
<SelectContent>
- <SelectItem value="page">{t("Path")}</SelectItem>
- <SelectItem value="event">{t("Event")}</SelectItem>
+ {(Object.keys(stepTypeLabels) as FunnelStepType[]).map(type => (
+ <SelectItem key={type} value={type}>
+ {stepTypeLabels[type]}
+ </SelectItem>
+ ))}
</SelectContent>
</Select>
<div className="flex flex-col">
<InputWithSuggestions
- suggestions={step.type === "page" ? pathSuggestions : eventSuggestions}
- placeholder={step.type === "page" ? t("Path (e.g. /pricing)") : t("Event name")}
+ suggestions={stepSuggestions[step.type]}
+ placeholder={stepValuePlaceholders[step.type]}
value={step.value}
className={cn(
"border-neutral-300 dark:border-neutral-700 w-[260px]",
diff --git a/client/src/app/[site]/funnels/components/FunnelRow.tsx b/client/src/app/[site]/funnels/components/FunnelRow.tsx
index dbec93ab2..4e61ba6d1 100644
--- a/client/src/app/[site]/funnels/components/FunnelRow.tsx
+++ b/client/src/app/[site]/funnels/components/FunnelRow.tsx
@@ -10,11 +10,12 @@ import { useState } from "react";
import { toast } from "@/components/ui/sonner";
import { useDeleteFunnel } from "../../../../api/analytics/hooks/funnels/useDeleteFunnel";
import { useGetFunnel } from "../../../../api/analytics/hooks/funnels/useGetFunnel";
-import { SavedFunnel } from "../../../../api/analytics/endpoints";
+import { FunnelStepType, SavedFunnel } from "../../../../api/analytics/endpoints";
import { ThreeDotLoader } from "../../../../components/Loaders";
import { EditFunnelDialog } from "./EditFunnel";
import { Funnel } from "./Funnel";
-import { EventIcon, PageviewIcon } from "../../../../components/EventIcons";
+import { EventTypeIcon } from "../../../../components/EventIcons";
+import { resolvePropertyFilters, targetTypeToEventType } from "../../../../lib/events";
interface FunnelRowProps {
funnel: SavedFunnel;
@@ -23,6 +24,15 @@ interface FunnelRowProps {
export function FunnelRow({ funnel, index }: FunnelRowProps) {
const t = useExtracted();
+
+ const stepTypeLabels: Record<FunnelStepType, string> = {
+ page: t("Page"),
+ event: t("Event"),
+ outbound: t("Outbound"),
+ button_click: t("Button"),
+ form_submit: t("Form"),
+ copy: t("Copy"),
+ };
const [expanded, setExpanded] = useState(index === 0);
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
const [isEditModalOpen, setIsEditModalOpen] = useState(false);
@@ -71,44 +81,42 @@ export function FunnelRow({ funnel, index }: FunnelRowProps) {
{/* Steps visualization */}
<div className="flex flex-wrap gap-1">
<h3 className="font-medium text-neutral-900 dark:text-neutral-100 text-base mr-2">{funnel.name}</h3>
- {funnel.steps.map((step, index) => (
- <div key={index} className="flex items-center">
- {index > 0 && <ArrowRight className="h-3 w-3 mx-1 text-neutral-400" />}
- <Tooltip>
- <TooltipTrigger asChild>
- <span className="rounded bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 whitespace-nowrap overflow-hidden text-ellipsis flex items-center cursor-default">
- {step.type === "page" ? (
- <PageviewIcon className="h-3 w-3 mr-1" />
- ) : (
- <EventIcon className="h-3 w-3 mr-1" />
- )}
- <span className="max-w-[120px] overflow-hidden text-ellipsis inline-block">
- {step.name || step.value}
- {step.type === "event" && step.eventPropertyKey && (
- <span className="text-xs text-yellow-400 ml-1">*</span>
- )}
+ {funnel.steps.map((step, index) => {
+ const propertyFilters = resolvePropertyFilters(step);
+ return (
+ <div key={index} className="flex items-center">
+ {index > 0 && <ArrowRight className="h-3 w-3 mx-1 text-neutral-400" />}
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <span className="rounded bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 whitespace-nowrap overflow-hidden text-ellipsis flex items-center cursor-default">
+ <EventTypeIcon type={targetTypeToEventType(step.type)} className="h-3 w-3 mr-1" />
+ <span className="max-w-[120px] overflow-hidden text-ellipsis inline-block">
+ {step.name || step.value || stepTypeLabels[step.type] || t("Event")}
+ {propertyFilters.length > 0 && <span className="text-xs text-yellow-400 ml-1">*</span>}
+ </span>
</span>
- </span>
- </TooltipTrigger>
- <TooltipContent side="bottom" className="text-xs">
- <div>
- <span className="font-semibold">{step.type === "page" ? t("Page") : t("Event")}:</span> {step.value}
- </div>
- {step.name && (
+ </TooltipTrigger>
+ <TooltipContent side="bottom" className="text-xs">
<div>
- <span className="font-semibold">{t("Label")}:</span> {step.name}
+ <span className="font-semibold">{stepTypeLabels[step.type] || t("Event")}:</span>{" "}
+ {step.value || t("Any")}
</div>
- )}
- {step.type === "event" && step.eventPropertyKey && step.eventPropertyValue !== undefined && (
- <div>
- <span className="font-semibold">{t("Property")}:</span> {step.eventPropertyKey} ={" "}
- {String(step.eventPropertyValue)}
- </div>
- )}
- </TooltipContent>
- </Tooltip>
- </div>
- ))}
+ {step.name && (
+ <div>
+ <span className="font-semibold">{t("Label")}:</span> {step.name}
+ </div>
+ )}
+ {propertyFilters.length > 0 && (
+ <div>
+ <span className="font-semibold">{t("Property")}:</span>{" "}
+ {propertyFilters.map(f => `${f.key} = ${f.value}`).join(", ")}
+ </div>
+ )}
+ </TooltipContent>
+ </Tooltip>
+ </div>
+ );
+ })}
</div>
</div>
</div>
diff --git a/client/src/app/[site]/goals/components/GoalCard.tsx b/client/src/app/[site]/goals/components/GoalCard.tsx
index a4051ee35..9373f88b5 100644
--- a/client/src/app/[site]/goals/components/GoalCard.tsx
+++ b/client/src/app/[site]/goals/components/GoalCard.tsx
@@ -7,7 +7,8 @@ import { useMemo, useState } from "react";
import { useDeleteGoal } from "../../../../api/analytics/hooks/goals/useDeleteGoal";
import { Goal, GoalTimeSeriesPoint } from "../../../../api/analytics/endpoints";
import { useGetGoalSessions } from "../../../../api/analytics/hooks/goals/useGetGoalSessions";
-import { EventIcon, PageviewIcon } from "../../../../components/EventIcons";
+import { EventTypeIcon } from "../../../../components/EventIcons";
+import { resolvePropertyFilters, targetTypeToEventType } from "../../../../lib/events";
import { SessionsList } from "../../../../components/Sessions/SessionsList";
import {
AlertDialog,
@@ -182,6 +183,8 @@ export default function GoalCard({ goal, siteId, timeSeries, isLoadingTimeSeries
}
};
+ const propertyFilters = resolvePropertyFilters(goal.config);
+
const allSessions = sessionsData?.data || [];
const hasNextPage = allSessions.length > LIMIT;
const sessions = allSessions.slice(0, LIMIT);
@@ -204,39 +207,25 @@ export default function GoalCard({ goal, siteId, timeSeries, isLoadingTimeSeries
{/* Left section - Title and type */}
<div className=" min-w-0 md:flex-1 md:pr-4">
<h3 className="font-medium text-base flex items-center gap-2 min-w-0">
- {goal.goalType === "path" ? (
- <Tooltip>
- <TooltipTrigger asChild>
- <PageviewIcon />
- </TooltipTrigger>
- <TooltipContent>
- <p>{t("Page Goal")}</p>
- </TooltipContent>
- </Tooltip>
- ) : (
- <Tooltip>
- <TooltipTrigger asChild>
- <EventIcon />
- </TooltipTrigger>
- <TooltipContent>
- <p>{t("Event Goal")}</p>
- </TooltipContent>
- </Tooltip>
- )}
+ <EventTypeIcon type={targetTypeToEventType(goal.goalType)} />
<span className="truncate">{goal.name || t("Goal #{goalId}", { goalId: String(goal.goalId) })}</span>
</h3>
<div className="mt-1 min-w-0">
<span className="text-xs text-neutral-500 dark:text-neutral-400 mr-2">{t("Pattern")}:</span>
<code className="inline-block max-w-full truncate align-bottom text-xs bg-neutral-100 dark:bg-neutral-800 px-1 py-0.5 rounded">
- {goal.goalType === "path" ? goal.config.pathPattern : goal.config.eventName}
+ {goal.goalType === "path"
+ ? goal.config.pathPattern
+ : goal.goalType === "event"
+ ? goal.config.eventName
+ : goal.config.valuePattern || t("Any")}
</code>
- {goal.goalType === "event" && goal.config.eventPropertyKey && (
+ {propertyFilters.length > 0 && (
<div className="mt-1 text-xs text-neutral-500 dark:text-neutral-400">
{t("Property")}:{" "}
<code className="text-xs bg-neutral-100 dark:bg-neutral-800 px-1 py-0.5 rounded text-neutral-900 dark:text-neutral-100">
- {goal.config.eventPropertyKey}: {String(goal.config.eventPropertyValue)}
+ {propertyFilters.map(f => `${f.key}: ${f.value}`).join(", ")}
</code>
</div>
)}
diff --git a/client/src/app/[site]/goals/components/GoalFormModal.tsx b/client/src/app/[site]/goals/components/GoalFormModal.tsx
index 26d03e26d..41dfe5ff2 100644
--- a/client/src/app/[site]/goals/components/GoalFormModal.tsx
+++ b/client/src/app/[site]/goals/components/GoalFormModal.tsx
@@ -6,10 +6,17 @@ import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { useCreateGoal } from "../../../../api/analytics/hooks/goals/useCreateGoal";
-import { Goal } from "../../../../api/analytics/endpoints";
+import { Goal, GoalType } from "../../../../api/analytics/endpoints";
import { useUpdateGoal } from "../../../../api/analytics/hooks/goals/useUpdateGoal";
+import { useAutocaptureValues } from "../../../../api/analytics/hooks/events/useAutocaptureValues";
import { useMetric } from "../../../../api/analytics/hooks/useGetMetric";
-import { EventIcon, PageviewIcon } from "../../../../components/EventIcons";
+import { EventTypeIcon } from "../../../../components/EventIcons";
+import {
+ AUTOCAPTURE_TARGET_TYPES,
+ AutocaptureTargetType,
+ isAutocaptureTargetType,
+ targetTypeToEventType,
+} from "../../../../lib/events";
import { Button } from "../../../../components/ui/button";
import {
Dialog,
@@ -23,6 +30,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { Input } from "../../../../components/ui/input";
import { InputWithSuggestions, SuggestionOption } from "../../../../components/ui/input-with-suggestions";
import { Label } from "../../../../components/ui/label";
+import { toast } from "../../../../components/ui/sonner";
import { Switch } from "../../../../components/ui/switch";
import { cn } from "../../../../lib/utils";
import { Plus, X } from "lucide-react";
@@ -31,10 +39,11 @@ import { Plus, X } from "lucide-react";
const formSchema = z
.object({
name: z.string().optional(),
- goalType: z.enum(["path", "event"]),
+ goalType: z.enum(["path", "event", ...AUTOCAPTURE_TARGET_TYPES]),
config: z.object({
pathPattern: z.string().optional(),
eventName: z.string().optional(),
+ valuePattern: z.string().max(512).optional(),
eventPropertyKey: z.string().optional(),
eventPropertyValue: z.string().optional(),
propertyFilters: z
@@ -54,7 +63,8 @@ const formSchema = z
} else if (data.goalType === "event") {
return !!data.config.eventName;
}
- return false;
+ // Autocapture goals match any event of their type when the pattern is empty
+ return true;
},
{
message: "Configuration is required based on goal type",
@@ -76,6 +86,90 @@ const formSchema = z
type FormValues = z.infer<typeof formSchema>;
+type PropertyFilterDraft = { key: string; value: string };
+
+interface PropertyFilterSectionProps {
+ id: string;
+ toggleLabel: string;
+ keyPlaceholder: string;
+ valuePlaceholder: string;
+ addButtonLabel: string;
+ useProperties: boolean;
+ setUseProperties: (enabled: boolean) => void;
+ propertyFilters: PropertyFilterDraft[];
+ setPropertyFilters: (filters: PropertyFilterDraft[]) => void;
+}
+
+function PropertyFilterSection({
+ id,
+ toggleLabel,
+ keyPlaceholder,
+ valuePlaceholder,
+ addButtonLabel,
+ useProperties,
+ setUseProperties,
+ propertyFilters,
+ setPropertyFilters,
+}: PropertyFilterSectionProps) {
+ return (
+ <div className="mt-4">
+ <div className="flex items-center space-x-2 mb-4">
+ <Switch id={id} checked={useProperties} onCheckedChange={setUseProperties} />
+ <Label htmlFor={id}>{toggleLabel}</Label>
+ </div>
+
+ {useProperties && (
+ <div className="space-y-3">
+ {propertyFilters.map((filter, index) => (
+ <div key={index} className="flex gap-2 items-start">
+ <div className="flex-1 grid grid-cols-2 gap-2">
+ <Input
+ placeholder={keyPlaceholder}
+ value={filter.key}
+ onChange={e => {
+ const newFilters = [...propertyFilters];
+ newFilters[index] = { ...newFilters[index], key: e.target.value };
+ setPropertyFilters(newFilters);
+ }}
+ />
+ <Input
+ placeholder={valuePlaceholder}
+ value={filter.value}
+ onChange={e => {
+ const newFilters = [...propertyFilters];
+ newFilters[index] = { ...newFilters[index], value: e.target.value };
+ setPropertyFilters(newFilters);
+ }}
+ />
+ </div>
+ {propertyFilters.length > 1 && (
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ onClick={() => setPropertyFilters(propertyFilters.filter((_, i) => i !== index))}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ )}
+ </div>
+ ))}
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ onClick={() => setPropertyFilters([...propertyFilters, { key: "", value: "" }])}
+ className="w-full"
+ >
+ <Plus className="h-4 w-4" />
+ {addButtonLabel}
+ </Button>
+ </div>
+ )}
+ </div>
+ );
+}
+
interface GoalFormModalProps {
siteId: number;
goal?: Goal; // Optional goal for editing mode
@@ -103,6 +197,70 @@ export default function GoalFormModal({
onOpenChange?.(nextOpen);
};
+ const goalTypeOptions: { value: GoalType; label: string }[] = [
+ { value: "path", label: t("Page") },
+ { value: "event", label: t("Event") },
+ { value: "outbound", label: t("Outbound Link") },
+ { value: "button_click", label: t("Button Click") },
+ { value: "form_submit", label: t("Form Submit") },
+ { value: "copy", label: t("Copy") },
+ ];
+
+ // Field copy for autocapture goal types; the pattern is optional and
+ // matches the type's primary property with * and ** wildcards
+ const autocaptureFieldMeta: Record<AutocaptureTargetType, { label: string; placeholder: string; help: string }> = {
+ outbound: {
+ label: t("URL Pattern (optional)"),
+ placeholder: "https://example.com/pricing or https://*.example.com/**",
+ help: t("Matches the destination URL of the outbound link. Leave empty to count any outbound click."),
+ },
+ button_click: {
+ label: t("Button Text (optional)"),
+ placeholder: t("e.g., Sign Up"),
+ help: t("Matches the button's visible text. Leave empty to count any button click."),
+ },
+ form_submit: {
+ label: t("Form Name or ID (optional)"),
+ placeholder: t("e.g., signup-form"),
+ help: t("Matches the form's name or id attribute. Leave empty to count any form submission."),
+ },
+ copy: {
+ label: t("Copied Text (optional)"),
+ placeholder: t("e.g., PROMO*"),
+ help: t("Matches the text that was copied. Leave empty to count any copied text."),
+ },
+ };
+
+ // Copy for the property-filter toggle/inputs, per goal type. The 4 autocapture
+ // types all filter on event props, so they share one entry.
+ const autocapturePropertyFilterMeta = {
+ id: "use-properties-autocapture",
+ toggleLabel: t("Match specific event properties"),
+ keyPlaceholder: "e.g., text",
+ valuePlaceholder: "e.g., Sign Up",
+ addButtonLabel: t("Add Another Property"),
+ };
+ const propertyFilterMeta: Record<GoalType, typeof autocapturePropertyFilterMeta> = {
+ path: {
+ id: "use-properties",
+ toggleLabel: t("Match specific URL parameters"),
+ keyPlaceholder: "e.g., utm_source",
+ valuePlaceholder: "e.g., adwords",
+ addButtonLabel: t("Add Another Parameter"),
+ },
+ event: {
+ id: "use-properties-event",
+ toggleLabel: t("Match specific event properties"),
+ keyPlaceholder: "e.g., plan_type",
+ valuePlaceholder: "e.g., premium",
+ addButtonLabel: t("Add Another Property"),
+ },
+ outbound: autocapturePropertyFilterMeta,
+ button_click: autocapturePropertyFilterMeta,
+ form_submit: autocapturePropertyFilterMeta,
+ copy: autocapturePropertyFilterMeta,
+ };
+
// Initialize useProperties based on either new propertyFilters or legacy properties
const hasProperties = !!(
goal?.config.propertyFilters?.length ||
@@ -111,7 +269,7 @@ export default function GoalFormModal({
const [useProperties, setUseProperties] = useState(hasProperties);
// State for managing multiple property filters (store as strings in UI)
- const [propertyFilters, setPropertyFilters] = useState<Array<{ key: string; value: string }>>(
+ const [propertyFilters, setPropertyFilters] = useState<PropertyFilterDraft[]>(
goal?.config.propertyFilters?.map(f => ({ key: f.key, value: String(f.value) })) ||
(goal?.config.eventPropertyKey && goal?.config.eventPropertyValue !== undefined
? [{ key: goal.config.eventPropertyKey, value: String(goal.config.eventPropertyValue) }]
@@ -183,6 +341,7 @@ export default function GoalFormModal({
config: {
pathPattern: goal.config.pathPattern || "",
eventName: goal.config.eventName || "",
+ valuePattern: goal.config.valuePattern || "",
eventPropertyKey: goal.config.eventPropertyKey || "",
eventPropertyValue:
goal.config.eventPropertyValue !== undefined ? String(goal.config.eventPropertyValue) : "",
@@ -194,6 +353,7 @@ export default function GoalFormModal({
config: {
pathPattern: "",
eventName: "",
+ valuePattern: "",
eventPropertyKey: "",
eventPropertyValue: "",
},
@@ -202,37 +362,41 @@ export default function GoalFormModal({
const goalType = form.watch("goalType");
+ // Suggestions for autocapture pattern values (urls, button texts, form names, copied texts)
+ const { data: autocaptureValuesData } = useAutocaptureValues(goalType, isOpen && isAutocaptureTargetType(goalType));
+
+ const autocaptureSuggestions: SuggestionOption[] =
+ autocaptureValuesData?.map(item => ({
+ value: item.value,
+ label: item.value,
+ })) || [];
+
// Handle form submission
const onSubmit = async (values: FormValues) => {
try {
// Clean up the config based on goal type
if (values.goalType === "path") {
values.config.eventName = undefined;
-
- // Set propertyFilters if using properties
- if (useProperties) {
- const validFilters = propertyFilters.filter(f => f.key && f.value);
- values.config.propertyFilters = validFilters.length > 0 ? validFilters : undefined;
- } else {
- values.config.propertyFilters = undefined;
- }
- // Clear legacy fields
- values.config.eventPropertyKey = undefined;
- values.config.eventPropertyValue = undefined;
+ values.config.valuePattern = undefined;
} else if (values.goalType === "event") {
values.config.pathPattern = undefined;
+ values.config.valuePattern = undefined;
+ } else {
+ values.config.pathPattern = undefined;
+ values.config.eventName = undefined;
+ values.config.valuePattern = values.config.valuePattern?.trim() || undefined;
+ }
- // Set propertyFilters if using properties
- if (useProperties) {
- const validFilters = propertyFilters.filter(f => f.key && f.value);
- values.config.propertyFilters = validFilters.length > 0 ? validFilters : undefined;
- } else {
- values.config.propertyFilters = undefined;
- }
- // Clear legacy fields
- values.config.eventPropertyKey = undefined;
- values.config.eventPropertyValue = undefined;
+ // Set propertyFilters if using properties
+ if (useProperties) {
+ const validFilters = propertyFilters.filter(f => f.key && f.value);
+ values.config.propertyFilters = validFilters.length > 0 ? validFilters : undefined;
+ } else {
+ values.config.propertyFilters = undefined;
}
+ // Clear legacy fields
+ values.config.eventPropertyKey = undefined;
+ values.config.eventPropertyValue = undefined;
if (isEditMode) {
await updateGoal.mutateAsync({
@@ -258,6 +422,7 @@ export default function GoalFormModal({
setIsOpen(false);
} catch (error) {
console.error("Error saving goal:", error);
+ toast.error(error instanceof Error ? error.message : t("Failed to save goal"));
}
};
@@ -312,220 +477,118 @@ export default function GoalFormModal({
render={({ field }) => (
<FormItem>
<FormLabel>{t("Goal Type")}</FormLabel>
- {isEditMode ? (
- <div className="flex items-center gap-2 mt-1">
- {field.value === "path" ? (
- <div className="flex items-center gap-1 bg-neutral-800/50 py-2 px-3 rounded">
- <PageviewIcon />
- <span>{t("Page Goal")}</span>
- </div>
- ) : (
- <div className="flex items-center gap-1 bg-neutral-800/50 py-2 px-3 rounded">
- <EventIcon />
- <span>{t("Event Goal")}</span>
- </div>
- )}
- </div>
- ) : (
- <FormControl>
- <div className="flex gap-3 mt-1">
- <Button
- type="button"
- variant={field.value === "path" ? "default" : "outline"}
- className={cn(
- "flex-1 flex items-center justify-center gap-2",
- field.value === "path" && "border-blue-500"
- )}
- onClick={() => field.onChange("path")}
- >
- <PageviewIcon />
- <span>{t("Page Goal")}</span>
- </Button>
+ <FormControl>
+ <div className="grid grid-cols-2 gap-2 mt-1">
+ {goalTypeOptions.map(option => (
<Button
+ key={option.value}
type="button"
- variant={field.value === "event" ? "default" : "outline"}
+ variant={field.value === option.value ? "default" : "outline"}
className={cn(
- "flex-1 flex items-center justify-center gap-2",
- field.value === "event" && "border-amber-500"
+ "flex items-center justify-start gap-2",
+ field.value === option.value && "border-blue-500"
)}
- onClick={() => field.onChange("event")}
+ onClick={() => {
+ // Property filters are interpreted differently per goal type
+ // (URL params vs. event props), so clear them on type change
+ // instead of silently reinterpreting them.
+ if (field.value !== option.value) {
+ setUseProperties(false);
+ setPropertyFilters([{ key: "", value: "" }]);
+ }
+ field.onChange(option.value);
+ }}
>
- <EventIcon />
- <span>{t("Event Goal")}</span>
+ <EventTypeIcon type={targetTypeToEventType(option.value)} />
+ <span>{option.label}</span>
</Button>
- </div>
- </FormControl>
- )}
+ ))}
+ </div>
+ </FormControl>
<FormMessage />
</FormItem>
)}
/>
{goalType === "path" && (
- <>
- <FormField
- control={form.control}
- name="config.pathPattern"
- render={({ field }) => (
- <FormItem>
- <FormLabel>{t("Path Pattern")}</FormLabel>
- <FormControl>
- <InputWithSuggestions
- suggestions={pathSuggestions}
- placeholder="/checkout/complete or /product/*/view"
- {...field}
- />
- </FormControl>
- <FormMessage />
- <div className="text-xs text-neutral-500 mt-1">
- {t("Use * to match a single path segment. Use ** to match across segments.")}
- </div>
- </FormItem>
- )}
- />
-
- <div className="mt-4">
- <div className="flex items-center space-x-2 mb-4">
- <Switch id="use-properties" checked={useProperties} onCheckedChange={setUseProperties} />
- <Label htmlFor="use-properties">{t("Match specific URL parameters")}</Label>
- </div>
-
- {useProperties && (
- <div className="space-y-3">
- {propertyFilters.map((filter, index) => (
- <div key={index} className="flex gap-2 items-start">
- <div className="flex-1 grid grid-cols-2 gap-2">
- <Input
- placeholder="e.g., utm_source"
- value={filter.key}
- onChange={e => {
- const newFilters = [...propertyFilters];
- newFilters[index].key = e.target.value;
- setPropertyFilters(newFilters);
- }}
- />
- <Input
- placeholder="e.g., adwords"
- value={filter.value}
- onChange={e => {
- const newFilters = [...propertyFilters];
- newFilters[index].value = e.target.value;
- setPropertyFilters(newFilters);
- }}
- />
- </div>
- {propertyFilters.length > 1 && (
- <Button
- type="button"
- variant="ghost"
- size="icon"
- onClick={() => {
- const newFilters = propertyFilters.filter((_, i) => i !== index);
- setPropertyFilters(newFilters);
- }}
- >
- <X className="h-4 w-4" />
- </Button>
- )}
- </div>
- ))}
- <Button
- type="button"
- variant="outline"
- size="sm"
- onClick={() => setPropertyFilters([...propertyFilters, { key: "", value: "" }])}
- className="w-full"
- >
- <Plus className="h-4 w-4" />
- {t("Add Another Parameter")}
- </Button>
+ <FormField
+ control={form.control}
+ name="config.pathPattern"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>{t("Path Pattern")}</FormLabel>
+ <FormControl>
+ <InputWithSuggestions
+ suggestions={pathSuggestions}
+ placeholder="/checkout/complete or /product/*/view"
+ {...field}
+ />
+ </FormControl>
+ <FormMessage />
+ <div className="text-xs text-neutral-500 mt-1">
+ {t("Use * to match a single path segment. Use ** to match across segments.")}
</div>
- )}
- </div>
- </>
+ </FormItem>
+ )}
+ />
)}
{goalType === "event" && (
- <>
- <FormField
- control={form.control}
- name="config.eventName"
- render={({ field }) => (
- <FormItem>
- <FormLabel>{t("Event Name")}</FormLabel>
- <FormControl>
- <InputWithSuggestions
- suggestions={eventSuggestions}
- placeholder="e.g., sign_up_completed"
- {...field}
- />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
+ <FormField
+ control={form.control}
+ name="config.eventName"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>{t("Event Name")}</FormLabel>
+ <FormControl>
+ <InputWithSuggestions
+ suggestions={eventSuggestions}
+ placeholder={t("e.g., sign_up_completed")}
+ {...field}
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ )}
- <div className="mt-4">
- <div className="flex items-center space-x-2 mb-4">
- <Switch id="use-properties-event" checked={useProperties} onCheckedChange={setUseProperties} />
- <Label htmlFor="use-properties-event">{t("Match specific event properties")}</Label>
- </div>
-
- {useProperties && (
- <div className="space-y-3">
- {propertyFilters.map((filter, index) => (
- <div key={index} className="flex gap-2 items-start">
- <div className="flex-1 grid grid-cols-2 gap-2">
- <Input
- placeholder="e.g., plan_type"
- value={filter.key}
- onChange={e => {
- const newFilters = [...propertyFilters];
- newFilters[index].key = e.target.value;
- setPropertyFilters(newFilters);
- }}
- />
- <Input
- placeholder="e.g., premium"
- value={filter.value}
- onChange={e => {
- const newFilters = [...propertyFilters];
- newFilters[index].value = e.target.value;
- setPropertyFilters(newFilters);
- }}
- />
- </div>
- {propertyFilters.length > 1 && (
- <Button
- type="button"
- variant="ghost"
- size="icon"
- onClick={() => {
- const newFilters = propertyFilters.filter((_, i) => i !== index);
- setPropertyFilters(newFilters);
- }}
- >
- <X className="h-4 w-4" />
- </Button>
- )}
- </div>
- ))}
- <Button
- type="button"
- variant="outline"
- size="sm"
- onClick={() => setPropertyFilters([...propertyFilters, { key: "", value: "" }])}
- className="w-full"
- >
- <Plus className="h-4 w-4" />
- {t("Add Another Property")}
- </Button>
+ {isAutocaptureTargetType(goalType) && (
+ <FormField
+ control={form.control}
+ name="config.valuePattern"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>{autocaptureFieldMeta[goalType].label}</FormLabel>
+ <FormControl>
+ <InputWithSuggestions
+ suggestions={autocaptureSuggestions}
+ placeholder={autocaptureFieldMeta[goalType].placeholder}
+ {...field}
+ />
+ </FormControl>
+ <FormMessage />
+ <div className="text-xs text-neutral-500 mt-1">
+ {autocaptureFieldMeta[goalType].help}{" "}
+ {t("Use * to match within a segment. Use ** to match anything.")}
</div>
- )}
- </div>
- </>
+ </FormItem>
+ )}
+ />
)}
+ <PropertyFilterSection
+ id={propertyFilterMeta[goalType].id}
+ toggleLabel={propertyFilterMeta[goalType].toggleLabel}
+ keyPlaceholder={propertyFilterMeta[goalType].keyPlaceholder}
+ valuePlaceholder={propertyFilterMeta[goalType].valuePlaceholder}
+ addButtonLabel={propertyFilterMeta[goalType].addButtonLabel}
+ useProperties={useProperties}
+ setUseProperties={setUseProperties}
+ propertyFilters={propertyFilters}
+ setPropertyFilters={setPropertyFilters}
+ />
+
<div className="flex justify-end space-x-2">
<Button variant="outline" type="button" onClick={onClose}>
{t("Cancel")}
diff --git a/client/src/app/[site]/goals/page.tsx b/client/src/app/[site]/goals/page.tsx
index d80c798ab..cb4feb78a 100644
--- a/client/src/app/[site]/goals/page.tsx
+++ b/client/src/app/[site]/goals/page.tsx
@@ -92,9 +92,10 @@ export default function GoalsPage() {
// Search in goal name
if (goal.name?.toLowerCase().includes(query)) return true;
- // Search in path pattern or event name
+ // Search in path pattern, event name, or autocapture value pattern
if (goal.goalType === "path" && goal.config.pathPattern?.toLowerCase().includes(query)) return true;
if (goal.goalType === "event" && goal.config.eventName?.toLowerCase().includes(query)) return true;
+ if (goal.config.valuePattern?.toLowerCase().includes(query)) return true;
// Search in event property key/value
if (
diff --git a/client/src/components/ui/input-with-suggestions.tsx b/client/src/components/ui/input-with-suggestions.tsx
index 836b0562e..25d9956f9 100644
--- a/client/src/components/ui/input-with-suggestions.tsx
+++ b/client/src/components/ui/input-with-suggestions.tsx
@@ -41,7 +41,7 @@ export const InputWithSuggestions = React.forwardRef<HTMLInputElement, InputWith
const value = controlledValue !== undefined ? controlledValue : internalValue;
const filteredSuggestions = suggestions.filter(suggestion =>
- suggestion.value.toLowerCase().includes(String(value).toLowerCase())
+ String(suggestion.value).toLowerCase().includes(String(value).toLowerCase())
);
const updateDropdownPosition = React.useCallback(() => {
@@ -146,7 +146,7 @@ export const InputWithSuggestions = React.forwardRef<HTMLInputElement, InputWith
key={suggestion.value}
className="relative cursor-pointer mx-1 p-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-md"
onMouseDown={e => e.preventDefault()}
- onClick={() => handleSuggestionClick(suggestion.value)}
+ onClick={() => handleSuggestionClick(String(suggestion.value))}
>
{suggestion.label || suggestion.value}
</div>
diff --git a/client/src/lib/events.ts b/client/src/lib/events.ts
index 9e8864f1e..e3a2cbaa2 100644
--- a/client/src/lib/events.ts
+++ b/client/src/lib/events.ts
@@ -34,6 +34,42 @@ export const EVENT_TYPE_CONFIG: EventTypeConfig[] = [
{ value: "error", label: "Error", colorClass: "text-red-400" },
];
+// Autocaptured event types that goals and funnel steps can target directly
+export const AUTOCAPTURE_TARGET_TYPES = ["outbound", "button_click", "form_submit", "copy"] as const;
+
+export type AutocaptureTargetType = (typeof AUTOCAPTURE_TARGET_TYPES)[number];
+
+export function isAutocaptureTargetType(type: string): type is AutocaptureTargetType {
+ return (AUTOCAPTURE_TARGET_TYPES as readonly string[]).includes(type);
+}
+
+// Maps goal types ("path"/"event") and funnel step types ("page"/"event")
+// onto event types for icon and color display
+export function targetTypeToEventType(type: string): EventType {
+ if (type === "path" || type === "page") return "pageview";
+ if (type === "event") return "custom_event";
+ return EVENT_TYPE_CONFIG.some(config => config.value === type) ? (type as EventType) : "custom_event";
+}
+
+export type PropertyFilter = { key: string; value: string | number | boolean };
+
+type LegacyPropertyConfig = {
+ propertyFilters?: PropertyFilter[];
+ eventPropertyKey?: string;
+ eventPropertyValue?: string | number | boolean;
+};
+
+// Support both the propertyFilters array and the legacy single-property fields,
+// for goals and funnel steps of any type.
+export function resolvePropertyFilters(config: LegacyPropertyConfig): PropertyFilter[] {
+ return (
+ config.propertyFilters ||
+ (config.eventPropertyKey && config.eventPropertyValue !== undefined
+ ? [{ key: config.eventPropertyKey, value: config.eventPropertyValue }]
+ : [])
+ );
+}
+
// ============================================================================
// Event Display Utilities
// ============================================================================
diff --git a/server/src/api/analytics/events/getAutocaptureValues.ts b/server/src/api/analytics/events/getAutocaptureValues.ts
new file mode 100644
index 000000000..03d515c71
--- /dev/null
+++ b/server/src/api/analytics/events/getAutocaptureValues.ts
@@ -0,0 +1,75 @@
+import { FastifyReply, FastifyRequest } from "fastify";
+import SqlString from "sqlstring";
+import { clickhouse } from "../../../db/clickhouse/clickhouse.js";
+import { getTimeStatement, processResults } from "../utils/utils.js";
+import { getFilterStatement } from "../utils/getFilterStatement.js";
+import { FilterParams } from "@rybbit/shared";
+import { AUTOCAPTURE_PATTERN_PROPS, isAutocaptureTargetType } from "../utils/eventConditions.js";
+
+export type GetAutocaptureValuesResponse = {
+ value: string;
+ count: number;
+}[];
+
+export interface GetAutocaptureValuesRequest {
+ Params: {
+ siteId: string;
+ };
+ Querystring: FilterParams<{
+ type: string;
+ }>;
+}
+
+// Returns the most common values of an autocapture type's primary props
+// (outbound urls, button texts, form names/ids, copied texts), used as
+// suggestions when configuring goals and funnel steps.
+export async function getAutocaptureValues(req: FastifyRequest<GetAutocaptureValuesRequest>, res: FastifyReply) {
+ const { type, filters } = req.query;
+ const site = req.params.siteId;
+
+ if (!type || !isAutocaptureTargetType(type)) {
+ return res.status(400).send({ error: "Invalid autocapture event type" });
+ }
+
+ const timeStatement = getTimeStatement(req.query);
+ const filterStatement = filters ? getFilterStatement(filters, Number(site), timeStatement) : "";
+
+ const propExtracts = AUTOCAPTURE_PATTERN_PROPS[type]
+ .map(prop => `JSONExtractString(toString(props), ${SqlString.escape(prop)})`)
+ .join(", ");
+
+ const query = `
+ SELECT value, COUNT(*) AS count
+ FROM (
+ SELECT arrayJoin([${propExtracts}]) AS value
+ FROM events
+ WHERE
+ site_id = {siteId:Int32}
+ AND type = ${SqlString.escape(type)}
+ ${timeStatement}
+ ${filterStatement}
+ )
+ WHERE value <> ''
+ GROUP BY value
+ ORDER BY count DESC
+ LIMIT 500
+ `;
+
+ try {
+ const result = await clickhouse.query({
+ query,
+ format: "JSONEachRow",
+ query_params: {
+ siteId: Number(site),
+ },
+ });
+
+ const data = await processResults<GetAutocaptureValuesResponse[number]>(result);
+ // processResults coerces any column that looks numeric into a number; `value`
+ // is free-form captured text (e.g. a button labeled "100") and must stay a string.
+ return res.send({ data: data.map(row => ({ ...row, value: String(row.value) })) });
+ } catch (error) {
+ console.error("Error fetching autocapture values:", error);
+ return res.status(500).send({ error: "Failed to fetch autocapture values" });
+ }
+}
diff --git a/server/src/api/analytics/funnels/createFunnel.ts b/server/src/api/analytics/funnels/createFunnel.ts
index ad05fb741..8b6a812a8 100644
--- a/server/src/api/analytics/funnels/createFunnel.ts
+++ b/server/src/api/analytics/funnels/createFunnel.ts
@@ -3,20 +3,8 @@ import { FastifyReply, FastifyRequest } from "fastify";
import { db } from "../../../db/postgres/postgres.js";
import { funnels as funnelsTable } from "../../../db/postgres/schema.js";
import { getUserHasAccessToSite } from "../../../lib/auth-utils.js";
-import { Filter } from "../types.js";
-
-type FunnelStep = {
- value: string;
- name?: string;
- type: "page" | "event";
- hostname?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
-};
+import { isAutocaptureTargetType } from "../utils/eventConditions.js";
+import { FunnelStep } from "./funnelSteps.js";
type Funnel = {
steps: FunnelStep[];
@@ -42,6 +30,16 @@ export async function createFunnel(
return reply.status(400).send({ error: "At least 2 steps are required for a funnel" });
}
+ // Reject unrecognized step types instead of silently matching them as custom events
+ if (steps.some(step => step.type !== "page" && step.type !== "event" && !isAutocaptureTargetType(step.type))) {
+ return reply.status(400).send({ error: "Invalid step type" });
+ }
+
+ // Page and event steps need a value; autocapture steps may match any event of their type
+ if (steps.some(step => (step.type === "page" || step.type === "event") && !step.value)) {
+ return reply.status(400).send({ error: "Page and event steps require a value" });
+ }
+
if (!name) {
return reply.status(400).send({ error: "Funnel name is required" });
}
diff --git a/server/src/api/analytics/funnels/funnelSteps.ts b/server/src/api/analytics/funnels/funnelSteps.ts
new file mode 100644
index 000000000..78df88881
--- /dev/null
+++ b/server/src/api/analytics/funnels/funnelSteps.ts
@@ -0,0 +1,44 @@
+import SqlString from "sqlstring";
+import {
+ AutocaptureTargetType,
+ buildAutocaptureCondition,
+ buildEventCondition,
+ buildPageCondition,
+ isAutocaptureTargetType,
+ PropertyFilter,
+ resolvePropertyFilters,
+} from "../utils/eventConditions.js";
+
+export type FunnelStepType = "page" | "event" | AutocaptureTargetType;
+
+export type FunnelStep = {
+ value: string;
+ name?: string;
+ type: FunnelStepType;
+ hostname?: string;
+ // Deprecated fields - kept for backwards compatibility
+ eventPropertyKey?: string;
+ eventPropertyValue?: string | number | boolean;
+ // New field for multiple property filters
+ propertyFilters?: PropertyFilter[];
+};
+
+export function buildFunnelStepCondition(step: FunnelStep): string {
+ const filters = resolvePropertyFilters(step);
+
+ let condition: string;
+ if (step.type === "page") {
+ condition = buildPageCondition(step.value, filters);
+ } else if (isAutocaptureTargetType(step.type)) {
+ condition = buildAutocaptureCondition(step.type, step.value, filters);
+ } else {
+ // "event" and unknown legacy types match custom events
+ condition = buildEventCondition(step.value, filters);
+ }
+
+ if (step.hostname) {
+ condition += ` AND hostname = ${SqlString.escape(step.hostname)}`;
+ }
+
+ return condition;
+}
diff --git a/server/src/api/analytics/funnels/getFunnel.ts b/server/src/api/analytics/funnels/getFunnel.ts
index b03281246..bf8f042d9 100644
--- a/server/src/api/analytics/funnels/getFunnel.ts
+++ b/server/src/api/analytics/funnels/getFunnel.ts
@@ -2,23 +2,9 @@ import { FilterParams } from "@rybbit/shared";
import { FastifyReply, FastifyRequest } from "fastify";
import SqlString from "sqlstring";
import { clickhouse } from "../../../db/clickhouse/clickhouse.js";
-import { getTimeStatement, patternToRegex, processResults } from "../utils/utils.js";
+import { getTimeStatement, processResults } from "../utils/utils.js";
import { getFilterStatement } from "../utils/getFilterStatement.js";
-
-type FunnelStep = {
- value: string;
- name?: string;
- type: "page" | "event";
- hostname?: string;
- // Deprecated fields - kept for backwards compatibility
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- // New field for multiple property filters
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
-};
+import { buildFunnelStepCondition, FunnelStep } from "./funnelSteps.js";
type Funnel = {
steps: FunnelStep[];
@@ -55,62 +41,7 @@ export async function getFunnel(
const filterStatement = getFilterStatement(request.query.filters, Number(siteId), timeStatement);
// Build conditional statements for each step
- const stepConditions = steps.map(step => {
- let condition = "";
-
- if (step.type === "page") {
- // Use pattern matching for page paths to support wildcards
- const regex = patternToRegex(step.value);
- // Manually escape single quotes in the regex and wrap in quotes
- // Don't use SqlString.escape() as it doesn't preserve the regex correctly
- const safeRegex = regex.replace(/'/g, "\\'");
- condition = `type = 'pageview' AND match(pathname, '${safeRegex}')`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = step.propertyFilters || (
- step.eventPropertyKey && step.eventPropertyValue !== undefined
- ? [{ key: step.eventPropertyKey, value: step.eventPropertyValue }]
- : []
- );
-
- // Add property matching for page steps (URL parameters)
- for (const filter of filters) {
- // Access URL parameters from the url_parameters map
- const propValueAccessor = `url_parameters[${SqlString.escape(filter.key)}]`;
-
- // URL parameters are stored as strings in the Map
- condition += ` AND ${propValueAccessor} = ${SqlString.escape(String(filter.value))}`;
- }
- } else {
- // Start with the base event match condition
- condition = `type = 'custom_event' AND event_name = ${SqlString.escape(step.value)}`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = step.propertyFilters || (
- step.eventPropertyKey && step.eventPropertyValue !== undefined
- ? [{ key: step.eventPropertyKey, value: step.eventPropertyValue }]
- : []
- );
-
- // Add property matching if both key and value are provided
- for (const filter of filters) {
- if (typeof filter.value === "string") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "number") {
- condition += ` AND toFloat64(JSONExtractString(toString(props), ${SqlString.escape(filter.key)})) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "boolean") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value ? 'true' : 'false')}`;
- }
- }
- }
-
- // Add hostname filtering if specified
- if (step.hostname) {
- condition += ` AND hostname = ${SqlString.escape(step.hostname)}`;
- }
-
- return condition;
- });
+ const stepConditions = steps.map(step => buildFunnelStepCondition(step));
// Build the funnel query - session-based tracking
const query = `
diff --git a/server/src/api/analytics/funnels/getFunnelStepSessions.ts b/server/src/api/analytics/funnels/getFunnelStepSessions.ts
index 647a9582c..c51800f78 100644
--- a/server/src/api/analytics/funnels/getFunnelStepSessions.ts
+++ b/server/src/api/analytics/funnels/getFunnelStepSessions.ts
@@ -1,23 +1,10 @@
import { FilterParams } from "@rybbit/shared";
import { FastifyReply, FastifyRequest } from "fastify";
-import SqlString from "sqlstring";
import { clickhouse } from "../../../db/clickhouse/clickhouse.js";
-import { enrichWithTraits, getTimeStatement, patternToRegex, processResults } from "../utils/utils.js";
+import { enrichWithTraits, getTimeStatement, processResults } from "../utils/utils.js";
import { GetSessionsResponse } from "../sessions/getSessions.js";
import { getFilterStatement } from "../utils/getFilterStatement.js";
-
-type FunnelStep = {
- value: string;
- name?: string;
- type: "page" | "event";
- hostname?: string;
- eventPropertyKey?: string;
- eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
-};
+import { buildFunnelStepCondition, FunnelStep } from "./funnelSteps.js";
type Funnel = {
steps: FunnelStep[];
@@ -72,53 +59,7 @@ export async function getFunnelStepSessions(req: FastifyRequest<GetFunnelStepSes
// Build conditional statements for each step we need
const stepsToCheck = mode === "reached" ? stepNumber : stepNumber + 1;
- const stepConditions = steps.slice(0, stepsToCheck).map((step) => {
- let condition = "";
-
- if (step.type === "page") {
- const regex = patternToRegex(step.value);
- condition = `type = 'pageview' AND match(pathname, ${SqlString.escape(regex)})`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = step.propertyFilters || (
- step.eventPropertyKey && step.eventPropertyValue !== undefined
- ? [{ key: step.eventPropertyKey, value: step.eventPropertyValue }]
- : []
- );
-
- // Add property matching for page steps (URL parameters)
- for (const filter of filters) {
- const propValueAccessor = `url_parameters[${SqlString.escape(filter.key)}]`;
- condition += ` AND ${propValueAccessor} = ${SqlString.escape(String(filter.value))}`;
- }
- } else {
- condition = `type = 'custom_event' AND event_name = ${SqlString.escape(step.value)}`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = step.propertyFilters || (
- step.eventPropertyKey && step.eventPropertyValue !== undefined
- ? [{ key: step.eventPropertyKey, value: step.eventPropertyValue }]
- : []
- );
-
- // Add property matching for event steps
- for (const filter of filters) {
- if (typeof filter.value === "string") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "number") {
- condition += ` AND toFloat64(JSONExtractString(toString(props), ${SqlString.escape(filter.key)})) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "boolean") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value ? 'true' : 'false')}`;
- }
- }
- }
-
- if (step.hostname) {
- condition += ` AND hostname = ${SqlString.escape(step.hostname)}`;
- }
-
- return condition;
- });
+ const stepConditions = steps.slice(0, stepsToCheck).map(step => buildFunnelStepCondition(step));
// Build CTEs for each funnel step to identify qualifying sessions
const stepCTEs = [
diff --git a/server/src/api/analytics/goals/createGoal.ts b/server/src/api/analytics/goals/createGoal.ts
index aac36e664..2cf35c561 100644
--- a/server/src/api/analytics/goals/createGoal.ts
+++ b/server/src/api/analytics/goals/createGoal.ts
@@ -3,70 +3,12 @@ import { db } from "../../../db/postgres/postgres.js";
import { goals } from "../../../db/postgres/schema.js";
import { getUserHasAccessToSite } from "../../../lib/auth-utils.js";
import { z } from "zod";
-
-// Define validation schema for path pattern
-const pathPatternSchema = z.string().min(1, "Path pattern cannot be empty");
-
-// Define validation schema for event config
-const eventConfigSchema = z
- .object({
- eventName: z.string().min(1, "Event name cannot be empty"),
- eventPropertyKey: z.string().optional(),
- eventPropertyValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
- })
- .refine(
- data => {
- // If one property matching field is provided, both must be provided
- if (data.eventPropertyKey && data.eventPropertyValue === undefined) {
- return false;
- }
- if (data.eventPropertyValue !== undefined && !data.eventPropertyKey) {
- return false;
- }
- return true;
- },
- {
- message: "Both eventPropertyKey and eventPropertyValue must be provided together or omitted together",
- }
- );
-
-// Define validation schema for the goal request body
-const goalBodySchema = z
- .object({
- name: z.string().optional(),
- goalType: z.enum(["path", "event"]),
- config: z.object({
- pathPattern: z.string().optional(),
- eventName: z.string().optional(),
- eventPropertyKey: z.string().optional(),
- eventPropertyValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
- propertyFilters: z.array(z.object({
- key: z.string(),
- value: z.union([z.string(), z.number(), z.boolean()]),
- })).optional(),
- }),
- })
- .refine(
- data => {
- if (data.goalType === "path") {
- return !!data.config.pathPattern;
- } else if (data.goalType === "event") {
- return !!data.config.eventName;
- }
- return false;
- },
- {
- message: "Configuration must match goal type",
- path: ["config"],
- }
- );
-
-type CreateGoalBody = z.infer<typeof goalBodySchema>;
+import { GoalBody, goalBodySchema } from "./goalSchema.js";
export async function createGoal(
request: FastifyRequest<{
Params: { siteId: string };
- Body: CreateGoalBody;
+ Body: GoalBody;
}>,
reply: FastifyReply
) {
@@ -87,19 +29,6 @@ export async function createGoal(
return reply.status(403).send({ error: "Forbidden" });
}
- // Additional validation based on goal type
- if (goalType === "path") {
- // Validate path pattern
- pathPatternSchema.parse(config.pathPattern);
- } else if (goalType === "event") {
- // Validate event configuration
- eventConfigSchema.parse({
- eventName: config.eventName,
- eventPropertyKey: config.eventPropertyKey,
- eventPropertyValue: config.eventPropertyValue,
- });
- }
-
// Insert the goal into the database
const result = await db
.insert(goals)
diff --git a/server/src/api/analytics/goals/getGoalSessions.ts b/server/src/api/analytics/goals/getGoalSessions.ts
index 116eff09c..b7e62312c 100644
--- a/server/src/api/analytics/goals/getGoalSessions.ts
+++ b/server/src/api/analytics/goals/getGoalSessions.ts
@@ -3,10 +3,10 @@ import { clickhouse } from "../../../db/clickhouse/clickhouse.js";
import { db } from "../../../db/postgres/postgres.js";
import { goals } from "../../../db/postgres/schema.js";
import { eq } from "drizzle-orm";
-import { getTimeStatement, processResults, patternToRegex } from "../utils/utils.js";
+import { getTimeStatement, processResults } from "../utils/utils.js";
import { FilterParams } from "@rybbit/shared";
import { GetSessionsResponse } from "../sessions/getSessions.js";
-import SqlString from "sqlstring";
+import { buildGoalCondition } from "./goalConditions.js";
export interface GetGoalSessionsRequest {
Params: {
@@ -45,56 +45,9 @@ export async function getGoalSessions(req: FastifyRequest<GetGoalSessionsRequest
const timeStatement = getTimeStatement(req.query);
// Build the goal matching condition
- let goalCondition = "";
-
- if (goalData.goalType === "path") {
- const pathPattern = goalData.config.pathPattern;
- if (!pathPattern) {
- return res.status(400).send({ error: "Invalid path goal configuration" });
- }
-
- const regex = patternToRegex(pathPattern);
- goalCondition = `type = 'pageview' AND match(pathname, ${SqlString.escape(regex)})`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = goalData.config.propertyFilters || (
- goalData.config.eventPropertyKey && goalData.config.eventPropertyValue !== undefined
- ? [{ key: goalData.config.eventPropertyKey, value: goalData.config.eventPropertyValue }]
- : []
- );
-
- // Add property matching for page goals (URL parameters)
- for (const filter of filters) {
- const propValueAccessor = `url_parameters[${SqlString.escape(filter.key)}]`;
- goalCondition += ` AND ${propValueAccessor} = ${SqlString.escape(String(filter.value))}`;
- }
- } else if (goalData.goalType === "event") {
- const eventName = goalData.config.eventName;
- if (!eventName) {
- return res.status(400).send({ error: "Invalid event goal configuration" });
- }
-
- goalCondition = `type = 'custom_event' AND event_name = ${SqlString.escape(eventName)}`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = goalData.config.propertyFilters || (
- goalData.config.eventPropertyKey && goalData.config.eventPropertyValue !== undefined
- ? [{ key: goalData.config.eventPropertyKey, value: goalData.config.eventPropertyValue }]
- : []
- );
-
- // Add property matching for event goals
- for (const filter of filters) {
- if (typeof filter.value === "string") {
- goalCondition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "number") {
- goalCondition += ` AND toFloat64(JSONExtractString(toString(props), ${SqlString.escape(filter.key)})) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "boolean") {
- goalCondition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value ? 'true' : 'false')}`;
- }
- }
- } else {
- return res.status(400).send({ error: "Invalid goal type" });
+ const goalCondition = buildGoalCondition(goalData);
+ if (!goalCondition) {
+ return res.status(400).send({ error: "Invalid goal configuration" });
}
// Build query to find sessions that match the goal
diff --git a/server/src/api/analytics/goals/getGoals.ts b/server/src/api/analytics/goals/getGoals.ts
index 2aa7e7c00..fc6624b49 100644
--- a/server/src/api/analytics/goals/getGoals.ts
+++ b/server/src/api/analytics/goals/getGoals.ts
@@ -3,10 +3,11 @@ import { db } from "../../../db/postgres/postgres.js";
import { goals } from "../../../db/postgres/schema.js";
import { clickhouse } from "../../../db/clickhouse/clickhouse.js";
import { eq, desc, asc, sql } from "drizzle-orm";
-import { getTimeStatement, processResults, patternToRegex } from "../utils/utils.js";
+import { getTimeStatement, processResults } from "../utils/utils.js";
import SqlString from "sqlstring";
import { FilterParams } from "@rybbit/shared";
import { getFilterStatement } from "../utils/getFilterStatement.js";
+import { buildGoalCondition } from "./goalConditions.js";
// Types for the response
interface GoalWithConversions {
@@ -148,69 +149,16 @@ export async function getGoals(
let conditionalClauses: string[] = [];
for (const goal of siteGoals) {
- if (goal.goalType === "path") {
- const pathPattern = goal.config.pathPattern;
- if (!pathPattern) continue;
-
- const regex = patternToRegex(pathPattern);
- let pathClause = `type = 'pageview' AND match(pathname, ${SqlString.escape(regex)})`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = goal.config.propertyFilters || (
- goal.config.eventPropertyKey && goal.config.eventPropertyValue !== undefined
- ? [{ key: goal.config.eventPropertyKey, value: goal.config.eventPropertyValue }]
- : []
- );
-
- // Add property matching for page goals (URL parameters)
- for (const filter of filters) {
- // Access URL parameters from the url_parameters map
- const propValueAccessor = `url_parameters[${SqlString.escape(filter.key)}]`;
-
- // URL parameters are stored as strings in the Map
- pathClause += ` AND ${propValueAccessor} = ${SqlString.escape(String(filter.value))}`;
- }
-
- conditionalClauses.push(`
- COUNT(DISTINCT IF(
- ${pathClause},
- session_id,
- NULL
- )) AS goal_${goal.goalId}_conversions
- `);
- } else if (goal.goalType === "event") {
- const eventName = goal.config.eventName;
-
- if (!eventName) continue;
-
- let eventClause = `type = 'custom_event' AND event_name = ${SqlString.escape(eventName)}`;
-
- // Support both new propertyFilters array and legacy single property
- const filters = goal.config.propertyFilters || (
- goal.config.eventPropertyKey && goal.config.eventPropertyValue !== undefined
- ? [{ key: goal.config.eventPropertyKey, value: goal.config.eventPropertyValue }]
- : []
- );
-
- // Add property matching if needed
- for (const filter of filters) {
- if (typeof filter.value === "string") {
- eventClause += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "number") {
- eventClause += ` AND toFloat64(JSONExtractString(toString(props), ${SqlString.escape(filter.key)})) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "boolean") {
- eventClause += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(filter.value ? 'true' : 'false')}`;
- }
- }
-
- conditionalClauses.push(`
- COUNT(DISTINCT IF(
- ${eventClause},
- session_id,
- NULL
- )) AS goal_${goal.goalId}_conversions
- `);
- }
+ const goalCondition = buildGoalCondition(goal);
+ if (!goalCondition) continue;
+
+ conditionalClauses.push(`
+ COUNT(DISTINCT IF(
+ ${goalCondition},
+ session_id,
+ NULL
+ )) AS goal_${goal.goalId}_conversions
+ `);
}
if (conditionalClauses.length === 0) {
diff --git a/server/src/api/analytics/goals/goalConditions.ts b/server/src/api/analytics/goals/goalConditions.ts
index 6c3f0c8e8..9d30d538a 100644
--- a/server/src/api/analytics/goals/goalConditions.ts
+++ b/server/src/api/analytics/goals/goalConditions.ts
@@ -1,15 +1,19 @@
-import SqlString from "sqlstring";
-import { patternToRegex } from "../utils/utils.js";
+import {
+ buildAutocaptureCondition,
+ buildEventCondition,
+ buildPageCondition,
+ isAutocaptureTargetType,
+ PropertyFilter,
+ resolvePropertyFilters,
+} from "../utils/eventConditions.js";
type GoalConfig = {
pathPattern?: string;
eventName?: string;
+ valuePattern?: string;
eventPropertyKey?: string;
eventPropertyValue?: string | number | boolean;
- propertyFilters?: Array<{
- key: string;
- value: string | number | boolean;
- }>;
+ propertyFilters?: PropertyFilter[];
};
type GoalConditionInput = {
@@ -17,51 +21,21 @@ type GoalConditionInput = {
config: GoalConfig;
};
-const getPropertyFilters = (config: GoalConfig) =>
- config.propertyFilters ||
- (config.eventPropertyKey && config.eventPropertyValue !== undefined
- ? [{ key: config.eventPropertyKey, value: config.eventPropertyValue }]
- : []);
-
export function buildGoalCondition(goal: GoalConditionInput) {
- if (goal.goalType === "path") {
- const pathPattern = goal.config.pathPattern;
- if (!pathPattern) return null;
-
- const regex = patternToRegex(pathPattern);
- let condition = `type = 'pageview' AND match(pathname, ${SqlString.escape(regex)})`;
-
- for (const filter of getPropertyFilters(goal.config)) {
- const propValueAccessor = `url_parameters[${SqlString.escape(filter.key)}]`;
- condition += ` AND ${propValueAccessor} = ${SqlString.escape(String(filter.value))}`;
- }
+ const filters = resolvePropertyFilters(goal.config);
- return condition;
+ if (goal.goalType === "path") {
+ if (!goal.config.pathPattern) return null;
+ return buildPageCondition(goal.config.pathPattern, filters);
}
if (goal.goalType === "event") {
- const eventName = goal.config.eventName;
- if (!eventName) return null;
-
- let condition = `type = 'custom_event' AND event_name = ${SqlString.escape(eventName)}`;
-
- for (const filter of getPropertyFilters(goal.config)) {
- if (typeof filter.value === "string") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(
- filter.value
- )}`;
- } else if (typeof filter.value === "number") {
- condition += ` AND toFloat64(JSONExtractString(toString(props), ${SqlString.escape(
- filter.key
- )})) = ${SqlString.escape(filter.value)}`;
- } else if (typeof filter.value === "boolean") {
- condition += ` AND JSONExtractString(toString(props), ${SqlString.escape(filter.key)}) = ${SqlString.escape(
- filter.value ? "true" : "false"
- )}`;
- }
- }
+ if (!goal.config.eventName) return null;
+ return buildEventCondition(goal.config.eventName, filters);
+ }
- return condition;
+ if (isAutocaptureTargetType(goal.goalType)) {
+ return buildAutocaptureCondition(goal.goalType, goal.config.valuePattern, filters);
}
return null;
diff --git a/server/src/api/analytics/goals/goalSchema.ts b/server/src/api/analytics/goals/goalSchema.ts
new file mode 100644
index 000000000..6ff8838ef
--- /dev/null
+++ b/server/src/api/analytics/goals/goalSchema.ts
@@ -0,0 +1,60 @@
+import { z } from "zod";
+import { AUTOCAPTURE_TARGET_TYPES } from "../utils/eventConditions.js";
+
+export const GOAL_TYPES = ["path", "event", ...AUTOCAPTURE_TARGET_TYPES] as const;
+
+export const goalBodySchema = z
+ .object({
+ name: z.string().optional(),
+ goalType: z.enum(GOAL_TYPES),
+ config: z.object({
+ pathPattern: z.string().optional(),
+ eventName: z.string().optional(),
+ valuePattern: z.string().max(512).optional(),
+ eventPropertyKey: z.string().optional(),
+ eventPropertyValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
+ propertyFilters: z
+ .array(
+ z.object({
+ key: z.string(),
+ value: z.union([z.string(), z.number(), z.boolean()]),
+ })
+ )
+ .optional(),
+ }),
+ })
+ .refine(
+ data => {
+ if (data.goalType === "path") {
+ return !!data.config.pathPattern;
+ }
+ if (data.goalType === "event") {
+ return !!data.config.eventName;
+ }
+ // Autocapture goals: an empty valuePattern matches any event of the type
+ return true;
+ },
+ {
+ message: "Configuration must match goal type",
+ path: ["config"],
+ }
+ )
+ .refine(
+ data => {
+ if (data.goalType !== "event") return true;
+ // If one legacy property matching field is provided, both must be provided
+ if (data.config.eventPropertyKey && data.config.eventPropertyValue === undefined) {
+ return false;
+ }
+ if (data.config.eventPropertyValue !== undefined && !data.config.eventPropertyKey) {
+ return false;
+ }
+ return true;
+ },
+ {
+ message: "Both eventPropertyKey and eventPropertyValue must be provided together or omitted together",
+ path: ["config"],
+ }
+ );
+
+export type GoalBody = z.infer<typeof goalBodySchema>;
diff --git a/server/src/api/analytics/goals/updateGoal.ts b/server/src/api/analytics/goals/updateGoal.ts
index ad0bb84ce..9137b4ee1 100644
--- a/server/src/api/analytics/goals/updateGoal.ts
+++ b/server/src/api/analytics/goals/updateGoal.ts
@@ -4,74 +4,12 @@ import { goals } from "../../../db/postgres/schema.js";
import { getUserHasAccessToSite } from "../../../lib/auth-utils.js";
import { z } from "zod";
import { eq } from "drizzle-orm";
-
-// Define validation schema for path pattern
-const pathPatternSchema = z.string().min(1, "Path pattern cannot be empty");
-
-// Define validation schema for event config
-const eventConfigSchema = z
- .object({
- eventName: z.string().min(1, "Event name cannot be empty"),
- eventPropertyKey: z.string().optional(),
- eventPropertyValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
- })
- .refine(
- data => {
- // If one property matching field is provided, both must be provided
- if (data.eventPropertyKey && data.eventPropertyValue === undefined) {
- return false;
- }
- if (data.eventPropertyValue !== undefined && !data.eventPropertyKey) {
- return false;
- }
- return true;
- },
- {
- message: "Both eventPropertyKey and eventPropertyValue must be provided together or omitted together",
- }
- );
-
-// Define validation schema for the goal request body
-const updateGoalSchema = z
- .object({
- name: z.string().optional(),
- goalType: z.enum(["path", "event"]),
- config: z.object({
- pathPattern: z.string().optional(),
- eventName: z.string().optional(),
- eventPropertyKey: z.string().optional(),
- eventPropertyValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
- propertyFilters: z
- .array(
- z.object({
- key: z.string(),
- value: z.union([z.string(), z.number(), z.boolean()]),
- })
- )
- .optional(),
- }),
- })
- .refine(
- data => {
- if (data.goalType === "path") {
- return !!data.config.pathPattern;
- } else if (data.goalType === "event") {
- return !!data.config.eventName;
- }
- return false;
- },
- {
- message: "Configuration must match goal type",
- path: ["config"],
- }
- );
-
-type UpdateGoalRequest = z.infer<typeof updateGoalSchema>;
+import { GoalBody, goalBodySchema } from "./goalSchema.js";
export async function updateGoal(
request: FastifyRequest<{
Params: { siteId: string; goalId: string };
- Body: UpdateGoalRequest;
+ Body: GoalBody;
}>,
reply: FastifyReply
) {
@@ -88,7 +26,7 @@ export async function updateGoal(
}
// Validate the request body
- const validatedData = updateGoalSchema.parse(request.body);
+ const validatedData = goalBodySchema.parse(request.body);
const { name, goalType, config } = validatedData;
// Check if the goal exists
@@ -111,19 +49,6 @@ export async function updateGoal(
return reply.status(403).send({ error: "Forbidden" });
}
- // Additional validation based on goal type
- if (goalType === "path") {
- // Validate path pattern
- pathPatternSchema.parse(config.pathPattern);
- } else if (goalType === "event") {
- // Validate event configuration
- eventConfigSchema.parse({
- eventName: config.eventName,
- eventPropertyKey: config.eventPropertyKey,
- eventPropertyValue: config.eventPropertyValue,
- });
- }
-
// Update the goal
const result = await db
.update(goals)
diff --git a/server/src/api/analytics/index.ts b/server/src/api/analytics/index.ts
index 4167a63e9..845c82360 100644
--- a/server/src/api/analytics/index.ts
+++ b/server/src/api/analytics/index.ts
@@ -1,4 +1,5 @@
// Events
+export { getAutocaptureValues } from "./events/getAutocaptureValues.js";
export { getEventBucketed } from "./events/getEventBucketed.js";
export { getEventNames } from "./events/getEventNames.js";
export { getEventProperties } from "./events/getEventProperties.js";
diff --git a/server/src/api/analytics/utils/eventConditions.ts b/server/src/api/analytics/utils/eventConditions.ts
new file mode 100644
index 000000000..80b1d54a8
--- /dev/null
+++ b/server/src/api/analytics/utils/eventConditions.ts
@@ -0,0 +1,109 @@
+import SqlString from "sqlstring";
+import { patternToRegex } from "./utils.js";
+
+export type PropertyFilter = {
+ key: string;
+ value: string | number | boolean;
+};
+
+// Autocaptured event types that goals and funnel steps can target directly
+export const AUTOCAPTURE_TARGET_TYPES = ["outbound", "button_click", "form_submit", "copy"] as const;
+
+export type AutocaptureTargetType = (typeof AUTOCAPTURE_TARGET_TYPES)[number];
+
+export function isAutocaptureTargetType(type: string): type is AutocaptureTargetType {
+ return (AUTOCAPTURE_TARGET_TYPES as readonly string[]).includes(type);
+}
+
+// Maps each autocapture type to the props keys its value pattern is matched against.
+export const AUTOCAPTURE_PATTERN_PROPS: Record<AutocaptureTargetType, readonly string[]> = {
+ outbound: ["url"],
+ button_click: ["text"],
+ form_submit: ["formName", "formId", "formAction"],
+ copy: ["text"],
+};
+
+type LegacyPropertyConfig = {
+ eventPropertyKey?: string;
+ eventPropertyValue?: string | number | boolean;
+ propertyFilters?: PropertyFilter[];
+};
+
+// Support both the propertyFilters array and the legacy single-property fields
+export function resolvePropertyFilters(config: LegacyPropertyConfig): PropertyFilter[] {
+ return (
+ config.propertyFilters ||
+ (config.eventPropertyKey && config.eventPropertyValue !== undefined
+ ? [{ key: config.eventPropertyKey, value: config.eventPropertyValue }]
+ : [])
+ );
+}
+
+function propsFilterCondition(filter: PropertyFilter): string {
+ const key = SqlString.escape(filter.key);
+ if (typeof filter.value === "number") {
+ return `toFloat64(JSONExtractString(toString(props), ${key})) = ${SqlString.escape(filter.value)}`;
+ }
+ const value = typeof filter.value === "boolean" ? (filter.value ? "true" : "false") : filter.value;
+ return `JSONExtractString(toString(props), ${key}) = ${SqlString.escape(value)}`;
+}
+
+export function buildPageCondition(pathPattern: string, filters: PropertyFilter[]): string {
+ const regex = patternToRegex(pathPattern);
+ let condition = `type = 'pageview' AND match(pathname, ${SqlString.escape(regex)})`;
+
+ // Page targets match property filters against URL parameters
+ for (const filter of filters) {
+ condition += ` AND url_parameters[${SqlString.escape(filter.key)}] = ${SqlString.escape(String(filter.value))}`;
+ }
+
+ return condition;
+}
+
+export function buildEventCondition(eventName: string, filters: PropertyFilter[]): string {
+ let condition = `type = 'custom_event' AND event_name = ${SqlString.escape(eventName)}`;
+
+ for (const filter of filters) {
+ condition += ` AND ${propsFilterCondition(filter)}`;
+ }
+
+ return condition;
+}
+
+// Converts a free-text wildcard pattern into a regex for autocapture value
+// matching. Unlike patternToRegex (used for path patterns, where a single '*'
+// must not cross a '/' segment boundary), autocapture values (button text,
+// copied text, form name/id) have no such boundary, so '*' may match '/' too.
+function textPatternToRegex(pattern: string): string {
+ const escapedPattern = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
+ const withDoubleStar = escapedPattern.replace(/\*\*/g, "{{DOUBLE_STAR}}");
+ const withSingleStar = withDoubleStar.replace(/\*/g, ".+");
+ const finalRegex = withSingleStar.replace(/{{DOUBLE_STAR}}/g, ".*");
+ return `^${finalRegex}$`;
+}
+
+// Matches an autocaptured event type, optionally narrowed by a wildcard
+// pattern against the type's primary props (e.g. the destination url for
+// outbound clicks) and by exact-match property filters.
+export function buildAutocaptureCondition(
+ type: AutocaptureTargetType,
+ pattern: string | undefined,
+ filters: PropertyFilter[]
+): string {
+ let condition = `type = ${SqlString.escape(type)}`;
+
+ const trimmedPattern = pattern?.trim();
+ if (trimmedPattern) {
+ const regex = SqlString.escape(textPatternToRegex(trimmedPattern));
+ const patternMatches = AUTOCAPTURE_PATTERN_PROPS[type].map(
+ prop => `match(JSONExtractString(toString(props), ${SqlString.escape(prop)}), ${regex})`
+ );
+ condition += ` AND (${patternMatches.join(" OR ")})`;
+ }
+
+ for (const filter of filters) {
+ condition += ` AND ${propsFilterCondition(filter)}`;
+ }
+
+ return condition;
+}
diff --git a/server/src/db/postgres/schema.ts b/server/src/db/postgres/schema.ts
index 20d1e8751..d78ef5e4d 100644
--- a/server/src/db/postgres/schema.ts
+++ b/server/src/db/postgres/schema.ts
@@ -321,14 +321,16 @@ export const goals = pgTable(
goalId: serial("goal_id").primaryKey().notNull(),
siteId: integer("site_id").notNull(),
name: text("name"), // Optional, user-defined name for the goal
- goalType: text("goal_type").notNull(), // 'path' or 'event'
+ goalType: text("goal_type").notNull(), // 'path', 'event', 'outbound', 'button_click', 'form_submit', or 'copy'
// Configuration specific to the goal type
config: jsonb("config").notNull().$type<{
// For 'path' type
pathPattern?: string; // e.g., "/pricing", "/product/*/view", "/docs/**"
// For 'event' type
eventName?: string; // e.g., "signup_completed", "file_downloaded"
- // Property filters (for both path and event types)
+ // For autocapture types ('outbound', 'button_click', 'form_submit', 'copy')
+ valuePattern?: string; // e.g., "https://example.com/**", "Sign Up*"
+ // Property filters (for all goal types)
eventPropertyKey?: string; // Deprecated - use propertyFilters instead
eventPropertyValue?: string | number | boolean; // Deprecated - use propertyFilters instead
propertyFilters?: Array<{
diff --git a/server/src/index.ts b/server/src/index.ts
index 346ab857f..80149d3ea 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -33,6 +33,7 @@ import {
generateCustomQuery,
getEventBucketed,
getEventNames,
+ getAutocaptureValues,
getEventProperties,
getEvents,
getFunnel,
@@ -340,6 +341,7 @@ async function analyticsRoutes(fastify: FastifyInstance) {
fastify.get("/sites/:siteId/experiments/:experimentId/results", authSite, getExperimentResults);
fastify.get("/sites/:siteId/events/names", publicSite, getEventNames);
fastify.get("/sites/:siteId/events/properties", publicSite, getEventProperties);
+ fastify.get("/sites/:siteId/events/autocapture-values", publicSite, getAutocaptureValues);
fastify.get("/sites/:siteId/events/outbound", publicSite, getOutboundLinks);
fastify.get("/org-event-count/:organizationId", orgMember, getOrgEventCount);
fastify.post("/organizations/:organizationId/analytics/query", orgMember, runCustomQuery);