diff --git a/apps/docs/app/app-surveys/advanced-targeting/page.mdx b/apps/docs/app/app-surveys/advanced-targeting/page.mdx
index 51e245706d..890adf9b16 100644
--- a/apps/docs/app/app-surveys/advanced-targeting/page.mdx
+++ b/apps/docs/app/app-surveys/advanced-targeting/page.mdx
@@ -8,9 +8,9 @@ import RideHailing from "./ride-hailing.webp";
import UpsellMiro from "./upsell-miro.webp";
export const metadata = {
- title: "Advanced Targeting in Surveys | Formbricks",
+ title: "Advanced Targeting for In-app Surveys | Formbricks",
description:
- "Advanced Targeting allows you to show surveys to just the right group of people. You can target surveys based on user attributes, user events, metadata , literally anything! This helps you get more relevant feedback and make data-driven decisions. All of this without writing a single line of code.",
+ "Advanced Targeting allows you to show surveys to just the right group of people. You can target surveys based on user attributes, user events, and metadata. This helps you get more relevant feedback and make data-driven decisions.",
};
#### App Surveys
@@ -32,8 +32,7 @@ Advanced Targeting allows you to show surveys to the right group of people. You
## How to setup Advanced Targeting
- Advanced Targeting is available on the Pro plan! Don't worry, you just need to enter your credit card
- details to start the freemium plan.
+ Advanced Targeting is available on the Pro plan!
1. On the Formbricks dashboard, click on **People** tab from the top navigation bar.
@@ -72,25 +71,7 @@ Advanced Targeting allows you to show surveys to the right group of people. You
className="max-w-full rounded-lg sm:max-w-3xl"
/>
-3. Target High Value users who have $100k+ in their bank account, own 20+ stocks, and have are an active user.
-
-
-
-4. Target Germans on mobile phones who have regenerated chatGPT answers frequently in the last quarter and did so today.
-
-
-
-5. Sneak Peak: How we at Formbricks automate inviting power users to chat with us
+3. Sneak Peak: How we at Formbricks automate inviting power users to chat with us
{
+ try {
+ const parsedUrl = new URL(url);
+ return parsedUrl.protocol === "https:" && UNSPLASH_ALLOWED_DOMAINS.includes(parsedUrl.hostname);
+ } catch {
+ return false;
+ }
+};
+
const ZTriggerDownloadUnsplashImageAction = z.object({
- downloadUrl: z.string(),
+ downloadUrl: z.string().url(),
});
export const triggerDownloadUnsplashImageAction = actionClient
.schema(ZTriggerDownloadUnsplashImageAction)
.action(async ({ parsedInput }) => {
+ if (!isValidUnsplashUrl(parsedInput.downloadUrl)) {
+ throw new Error("Invalid Unsplash URL");
+ }
+
const response = await fetch(`${parsedInput.downloadUrl}/?client_id=${UNSPLASH_ACCESS_KEY}`, {
method: "GET",
headers: { "Content-Type": "application/json" },
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseDataView.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseDataView.tsx
index 322a7b3769..544bb35848 100644
--- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseDataView.tsx
+++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseDataView.tsx
@@ -66,6 +66,8 @@ const mapResponsesToTableData = (responses: TResponse[], survey: TSurvey): TResp
notes: response.notes,
verifiedEmail: typeof response.data["verifiedEmail"] === "string" ? response.data["verifiedEmail"] : "",
language: response.language,
+ person: response.person,
+ personAttributes: response.personAttributes,
}));
};
diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseTableColumns.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseTableColumns.tsx
index dcb1c7bc4d..d40be4c10d 100644
--- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseTableColumns.tsx
+++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/components/ResponseTableColumns.tsx
@@ -2,8 +2,10 @@
import { QUESTIONS_ICON_MAP } from "@/app/lib/questions";
import { ColumnDef } from "@tanstack/react-table";
-import { EyeOffIcon, MailIcon, TagIcon } from "lucide-react";
+import { CircleHelpIcon, EyeOffIcon, MailIcon, TagIcon } from "lucide-react";
+import Link from "next/link";
import { getLocalizedValue } from "@formbricks/lib/i18n/utils";
+import { getPersonIdentifier } from "@formbricks/lib/person/utils";
import { processResponseData } from "@formbricks/lib/responses";
import { recallToHeadline } from "@formbricks/lib/utils/recall";
import { TResponseTableData } from "@formbricks/types/responses";
@@ -11,6 +13,7 @@ import { TSurvey, TSurveyQuestion } from "@formbricks/types/surveys/types";
import { Checkbox } from "@formbricks/ui/Checkbox";
import { ResponseBadges } from "@formbricks/ui/ResponseBadges";
import { RenderResponse } from "@formbricks/ui/SingleResponseCard/components/RenderResponse";
+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@formbricks/ui/Tooltip";
const getAddressFieldLabel = (field: string) => {
switch (field) {
@@ -182,6 +185,45 @@ export const generateColumns = (
},
};
+ const personColumn: ColumnDef = {
+ accessorKey: "personId",
+ header: () => (
+
+ Person
+
+
+
+
+
+
+ How to identify users for{" "}
+
+ link surveys
+ {" "}
+ or{" "}
+
+ in-app surveys.
+
+
+
+
+