feat(surveys): replace Formbricks with self-rendered PostHog API surveys
Formbricks CE turned out to gate person-based targeting (setUserId/attributes → 403 enterprise) — the exact flexibility surveys need. PostHog already holds the person properties, so surveys move back there in API mode: posthog-js evaluates eligibility (event triggers, targeting flags like subscription_status=active, wait periods, per-distinct_id dedup) via getActiveMatchingSurveys, and we render the popover ourselves — zero PostHog branding, sase.tr dark-theme styling. - lib/surveys.ts: display manager + capture payload builders that mirror posthog-js's own "survey shown/dismissed/sent" shapes exactly ($survey_response_<qid>, $set $survey_dismissed/<id>[/iter], seenSurvey_*, lastSeenSurveyDate) so the PostHog Surveys results UI works unchanged - components/survey-popover.tsx: single_choice (+Diğer), open text, rating/NPS - posthog.ts: capture/pageview/identify now schedule survey checks; register deploy_env (dev.sase.tr ships the key now → staging traffic is filterable) - remove @formbricks/js, its CSP entries and build args Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,8 +30,6 @@ ARG VITE_POSTHOG_KEY=
|
||||
ARG VITE_META_PIXEL_ID=
|
||||
ARG VITE_CHATWOOT_BASE_URL=
|
||||
ARG VITE_CHATWOOT_WEBSITE_TOKEN=
|
||||
ARG VITE_FORMBRICKS_APP_URL=
|
||||
ARG VITE_FORMBRICKS_ENV_ID=
|
||||
|
||||
RUN pnpm build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user