mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-21 13:40:31 -06:00
Compare commits
3 Commits
add-cursor
...
fix-icon-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df1e0f838c | ||
|
|
ca9e8c739b | ||
|
|
2e0f679f4d |
@@ -15,11 +15,13 @@ import { useTranslate } from "@tolgee/react";
|
||||
import clsx from "clsx";
|
||||
import {
|
||||
AirplayIcon,
|
||||
ArrowUpFromDotIcon,
|
||||
CheckIcon,
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
ContactIcon,
|
||||
EyeOff,
|
||||
FlagIcon,
|
||||
GlobeIcon,
|
||||
GridIcon,
|
||||
HashIcon,
|
||||
@@ -89,7 +91,8 @@ const questionIcons = {
|
||||
device: SmartphoneIcon,
|
||||
os: AirplayIcon,
|
||||
browser: GlobeIcon,
|
||||
source: GlobeIcon,
|
||||
source: ArrowUpFromDotIcon,
|
||||
country: FlagIcon,
|
||||
action: MousePointerClickIcon,
|
||||
|
||||
// others
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "Beschreibung hinzufügen",
|
||||
"add_ending": "Abschluss hinzufügen",
|
||||
"add_ending_below": "Abschluss unten hinzufügen",
|
||||
"add_fallback": "Hinzufügen",
|
||||
"add_fallback_placeholder": "Hinzufügen eines Platzhalters, der angezeigt wird, wenn die Frage übersprungen wird:",
|
||||
"add_hidden_field_id": "Verstecktes Feld ID hinzufügen",
|
||||
"add_highlight_border": "Rahmen hinzufügen",
|
||||
"add_highlight_border_description": "Füge deiner Umfragekarte einen äußeren Rahmen hinzu.",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "Fehler beim Speichern der Änderungen",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "Sogar nachdem sie eine Antwort eingereicht haben (z.B. Feedback-Box)",
|
||||
"everyone": "Jeder",
|
||||
"fallback_for": "Ersatz für",
|
||||
"fallback_missing": "Fehlender Fallback",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "{fieldId} wird in der Logik der Frage {questionIndex} verwendet. Bitte entferne es zuerst aus der Logik.",
|
||||
"field_name_eg_score_price": "Feldname z.B. Punktzahl, Preis",
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "Add description",
|
||||
"add_ending": "Add ending",
|
||||
"add_ending_below": "Add ending below",
|
||||
"add_fallback": "Add",
|
||||
"add_fallback_placeholder": "Add a placeholder to show if the question gets skipped:",
|
||||
"add_hidden_field_id": "Add hidden field ID",
|
||||
"add_highlight_border": "Add highlight border",
|
||||
"add_highlight_border_description": "Add an outer border to your survey card.",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "Error saving changes",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "Even after they submitted a response (e.g. Feedback Box)",
|
||||
"everyone": "Everyone",
|
||||
"fallback_for": "Fallback for ",
|
||||
"fallback_missing": "Fallback missing",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "{fieldId} is used in logic of question {questionIndex}. Please remove it from logic first.",
|
||||
"field_name_eg_score_price": "Field name e.g, score, price",
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "Ajouter une description",
|
||||
"add_ending": "Ajouter une fin",
|
||||
"add_ending_below": "Ajouter une fin ci-dessous",
|
||||
"add_fallback": "Ajouter",
|
||||
"add_fallback_placeholder": "Ajouter un espace réservé pour montrer si la question est ignorée :",
|
||||
"add_hidden_field_id": "Ajouter un champ caché ID",
|
||||
"add_highlight_border": "Ajouter une bordure de surlignage",
|
||||
"add_highlight_border_description": "Ajoutez une bordure extérieure à votre carte d'enquête.",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "Erreur lors de l'enregistrement des modifications",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "Même après avoir soumis une réponse (par exemple, la boîte de feedback)",
|
||||
"everyone": "Tout le monde",
|
||||
"fallback_for": "Solution de repli pour ",
|
||||
"fallback_missing": "Fallback manquant",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "{fieldId} est utilisé dans la logique de la question {questionIndex}. Veuillez d'abord le supprimer de la logique.",
|
||||
"field_name_eg_score_price": "Nom du champ par exemple, score, prix",
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "Adicionar Descrição",
|
||||
"add_ending": "Adicionar final",
|
||||
"add_ending_below": "Adicione o final abaixo",
|
||||
"add_fallback": "Adicionar",
|
||||
"add_fallback_placeholder": "Adicionar um texto padrão para mostrar se a pergunta for ignorada:",
|
||||
"add_hidden_field_id": "Adicionar campo oculto ID",
|
||||
"add_highlight_border": "Adicionar borda de destaque",
|
||||
"add_highlight_border_description": "Adicione uma borda externa ao seu cartão de pesquisa.",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "Erro ao salvar alterações",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "Mesmo depois de eles enviarem uma resposta (por exemplo, Caixa de Feedback)",
|
||||
"everyone": "Todo mundo",
|
||||
"fallback_for": "Alternativa para",
|
||||
"fallback_missing": "Faltando alternativa",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "{fieldId} é usado na lógica da pergunta {questionIndex}. Por favor, remova-o da lógica primeiro.",
|
||||
"field_name_eg_score_price": "Nome do campo, por exemplo, pontuação, preço",
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "Adicionar descrição",
|
||||
"add_ending": "Adicionar encerramento",
|
||||
"add_ending_below": "Adicionar encerramento abaixo",
|
||||
"add_fallback": "Adicionar",
|
||||
"add_fallback_placeholder": "Adicionar um espaço reservado para mostrar se a pergunta for ignorada:",
|
||||
"add_hidden_field_id": "Adicionar ID do campo oculto",
|
||||
"add_highlight_border": "Adicionar borda de destaque",
|
||||
"add_highlight_border_description": "Adicione uma borda externa ao seu cartão de inquérito.",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "Erro ao guardar alterações",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "Mesmo depois de terem enviado uma resposta (por exemplo, Caixa de Feedback)",
|
||||
"everyone": "Todos",
|
||||
"fallback_for": "Alternativa para ",
|
||||
"fallback_missing": "Substituição em falta",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "{fieldId} é usado na lógica da pergunta {questionIndex}. Por favor, remova-o da lógica primeiro.",
|
||||
"field_name_eg_score_price": "Nome do campo, por exemplo, pontuação, preço",
|
||||
|
||||
@@ -1248,8 +1248,6 @@
|
||||
"add_description": "新增描述",
|
||||
"add_ending": "新增結尾",
|
||||
"add_ending_below": "在下方新增結尾",
|
||||
"add_fallback": "新增",
|
||||
"add_fallback_placeholder": "新增用于顯示問題被跳過時的佔位符",
|
||||
"add_hidden_field_id": "新增隱藏欄位 ID",
|
||||
"add_highlight_border": "新增醒目提示邊框",
|
||||
"add_highlight_border_description": "在您的問卷卡片新增外邊框。",
|
||||
@@ -1388,7 +1386,6 @@
|
||||
"error_saving_changes": "儲存變更時發生錯誤",
|
||||
"even_after_they_submitted_a_response_e_g_feedback_box": "即使他們提交回應之後(例如,意見反應方塊)",
|
||||
"everyone": "所有人",
|
||||
"fallback_for": "備用 用於 ",
|
||||
"fallback_missing": "遺失的回退",
|
||||
"fieldId_is_used_in_logic_of_question_please_remove_it_from_logic_first": "'{'fieldId'}' 用於問題 '{'questionIndex'}' 的邏輯中。請先從邏輯中移除。",
|
||||
"field_name_eg_score_price": "欄位名稱,例如:分數、價格",
|
||||
|
||||
@@ -20,7 +20,7 @@ Source tracking for link surveys is essential when you:
|
||||
## Code Example
|
||||
|
||||
```sh Example Source as Google
|
||||
https://formbricks.com/clin3dxja02k8l80hpwmx4bjy?source=Google
|
||||
https://formbricks.com/s/clin3dxja02k8l80hpwmx4bjy?source=Google
|
||||
```
|
||||
|
||||
## How it Works
|
||||
@@ -30,7 +30,7 @@ To track the source of users in your link surveys effectively, follow these step
|
||||
1. **Generate Survey URL**: Create a Link Survey and get the sharable link. Append `?source=YourSouce` to the link to reference it with your campaigns and sources.
|
||||
|
||||
```sh Example Source as Google
|
||||
https://formbricks.com/clin3dxja02k8l80hpwmx4bjy?source=Google
|
||||
https://formbricks.com/s/clin3dxja02k8l80hpwmx4bjy?source=Google
|
||||
```
|
||||
|
||||
2. **Collect Data**: When users access the survey through these links, the URL parameters will capture the source information from which they were shared.
|
||||
|
||||
@@ -416,6 +416,18 @@ export function Survey({
|
||||
return { nextQuestionId, calculatedVariables: calculationResults };
|
||||
};
|
||||
|
||||
const getWebSurveyMeta = useCallback(() => {
|
||||
if (!isWebEnvironment) return {};
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
const source = url.searchParams.get("source");
|
||||
|
||||
return {
|
||||
url: url.href,
|
||||
...(source ? { source } : {}),
|
||||
};
|
||||
}, [isWebEnvironment]);
|
||||
|
||||
const onResponseCreateOrUpdate = useCallback(
|
||||
async (responseUpdate: TResponseUpdate) => {
|
||||
// Always trigger the onResponse callback even in preview mode
|
||||
@@ -459,7 +471,7 @@ export function Survey({
|
||||
language:
|
||||
responseUpdate.language === "default" ? getDefaultLanguageCode(survey) : responseUpdate.language,
|
||||
meta: {
|
||||
...(isWebEnvironment && { url: window.location.href }),
|
||||
...getWebSurveyMeta(),
|
||||
action,
|
||||
},
|
||||
variables: responseUpdate.variables,
|
||||
@@ -482,9 +494,9 @@ export function Survey({
|
||||
contactId,
|
||||
userId,
|
||||
survey,
|
||||
isWebEnvironment,
|
||||
action,
|
||||
hiddenFieldsRecord,
|
||||
getWebSurveyMeta,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user