Compare commits

...

529 Commits

Author SHA1 Message Date
Matthias Nannt 7725d3d8a2 update nextjs 2024-04-24 20:00:05 +02:00
Matthias Nannt d722e9de9e add test endpoint 2024-04-24 19:42:42 +02:00
Matthias Nannt 560b8904f7 update web packages 2024-04-24 19:01:20 +02:00
Matthias Nannt b68dcdf2dc fix: temporarily remove custom cache handler to solve next.js issues 2024-04-24 17:06:48 +02:00
Vidhi Kapadia 2da2758255 feat: Added Unsplash API for image backgrounds (#2341)
Co-authored-by: ShubhamPalriwala <spalriwalau@gmail.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-24 14:38:35 +00:00
Johannes b322f014ab chore: add logo and upgrade footer (#2519) 2024-04-24 14:17:48 +00:00
Matthias Nannt d408d42f00 chore: reduce Vercel memory limit 2024-04-24 16:28:31 +02:00
Matti Nannt 27875deb44 fix: display count in summary only updating with new response (#2524) 2024-04-24 16:17:24 +02:00
Dhruwang Jariwala dcc98b671e chore: Link survey mobile view (#2493)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-24 14:03:54 +00:00
Piyush Gupta 4f5acbcddc fix: skip onboarding on invite and signup refactoring (#2507)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-24 13:50:04 +00:00
Piyush Gupta a9bf8fcdaa fix: adds loader in the thankyou card while response submission (#2520)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-24 13:28:38 +00:00
Shubham Palriwala 87f2f8d870 docs: revamp API docs with Postman (#2518)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-24 12:59:28 +00:00
Matti Nannt 4ae38546f0 chore: limit remote action storing to userTargeting plan (#2521) 2024-04-24 14:56:05 +02:00
Dhruwang Jariwala 68c6dad26b chore: Adds save button to question Id input and refactored survey saving/publishing logic (#2488)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-24 05:37:32 +00:00
Dhruwang Jariwala 3f9ff9c59b fix: picture select grow icon opacity issue (#2504)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-23 14:59:53 +00:00
Anshuman Pandey 86c8da3494 fix: Backwards compatibility for js/sync endpoint (#2516) 2024-04-23 14:05:50 +00:00
Shubham Palriwala 4ac60db896 docs: (Client Action API) mention user should pre-exist when creating action (#2500) 2024-04-23 14:02:36 +00:00
Shubham Palriwala 7ca4aee9a7 fix: remove unused description in createAttribute, updateSurvey to use params surveyId (#2515) 2024-04-23 13:55:08 +00:00
Anshuman Pandey 0e6cfbfaa5 feat: website surveys (#2423)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-23 13:21:28 +00:00
Matti Nannt 4f0edcd473 chore: update kamal instance hosts (#2509) 2024-04-23 09:56:34 +02:00
Matti Nannt 855342c1d1 chore: scale kamal instance (#2508) 2024-04-23 09:30:36 +02:00
Prashnta Pandey dbcc030480 docs: Missing new line in management API docs (#2506) 2024-04-23 04:46:45 +00:00
Piyush Gupta dc2ce17aa0 fix: remove or reupload avatar bug (#2502)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-22 15:51:07 +00:00
Matti Nannt e2d5727cfc fix: display create leads to survey rerender (#2505) 2024-04-22 17:53:31 +02:00
Matti Nannt f86e7c6738 fix: rate-limiting when using a load balancer (#2501) 2024-04-22 17:13:07 +02:00
Matti Nannt d1aec18776 chore: add forth instance to kamal (#2503) 2024-04-22 16:02:01 +02:00
Dhruwang Jariwala 2ff17c2b22 docs: Event listener doc (#2432)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: S P <spalriwalau@gmail.com>
2024-04-22 12:22:13 +00:00
Olasunkanmi Balogun c9a8d022b4 feat: update best hotjar alternative article (#2459)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-22 08:52:19 +00:00
Matti Nannt 1307e42078 chore: add third kamal instance (#2499) 2024-04-22 10:17:07 +02:00
Johannes 5f40f8913b fix: remove double team switch, update route (#2479)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-22 07:30:52 +00:00
Piyush Gupta 4ee27f9618 fix: adds try...catch in all services (#2494)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-22 07:15:37 +00:00
Matti Nannt ed509d3a9a chore: deactivate github action crons (#2498) 2024-04-22 08:56:51 +02:00
Anshuman Pandey 34ebfe4fd8 fix: fixes js package proxy (#2490) 2024-04-19 13:32:27 +00:00
Anshuman Pandey e48ddbad5d fix: userId migration (#2453) 2024-04-19 12:53:41 +00:00
Matti Nannt c6f9a6cdfc fix: legacy survey redirect links from formbricks.com (#2491) 2024-04-19 12:49:47 +00:00
Matti Nannt e6ee81a683 chore: run kamal setup behind load balancer with multiple instances (#2480) 2024-04-19 14:48:22 +02:00
Anshuman Pandey 82853c8a07 fix: fixes form submission (#2492) 2024-04-19 09:43:07 +00:00
Anshuman Pandey 06f2d85f8e fix: handles errors while loading surveys pkg (#2489) 2024-04-19 07:08:13 +00:00
Johannes 687e12ad9b fix: fix-logo (#2485) 2024-04-18 20:11:39 +00:00
Matti Nannt bb2d7b7a00 fix: legal footer overlaying buttons on smaller screens (#2484) 2024-04-18 18:37:56 +02:00
Anshuman Pandey 83b9400479 fix: structured clone (#2483) 2024-04-18 16:06:22 +00:00
Anshuman Pandey 0b26475934 fix: polyfills structuredClone (#2478) 2024-04-18 14:20:12 +00:00
Shubham Palriwala 505c1d0223 fix: secure send embed preview email action & show env id in email body (#2475) 2024-04-18 13:26:13 +02:00
Johannes 8e31710604 fix: remove the --save flag because deprecated (#2474)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-18 10:22:21 +00:00
Shubham Palriwala b3883e8c9a fix: email previews to only be sent to the session user (#2473) 2024-04-18 12:11:08 +02:00
Johannes d3f566237f chore: add yarn command (#2472) 2024-04-18 12:02:42 +02:00
Matti Nannt 49fe0dab67 chore: improve validation error logging (#2471) 2024-04-18 11:42:48 +02:00
Shubham Palriwala 0c86df1ce1 fix: rename airbase to airtable (#2470) 2024-04-18 09:26:30 +00:00
Piyush Gupta e475179884 feat: added logic to show tags for viewer role (#2454) 2024-04-18 09:23:20 +00:00
Matti Nannt b7299a6d31 fix: formbricks-com build errors (#2469) 2024-04-18 11:19:37 +02:00
Anshuman Pandey 9508db92f3 fix: fixes shortUrl not defined in metadata (#2468) 2024-04-18 08:03:07 +00:00
Dhruwang Jariwala 7f438afc30 fix: survey jumping to 3rd question with prefilling (#2421)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-04-18 08:00:48 +00:00
Anik Dhabal Babu 1ddd1cfc3d feat: Ability to invite team members in bulk (#2424)
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-18 03:49:42 +00:00
Johannes d22eab1548 chore: add Google disclosure to privacy policy (#2466)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-17 16:29:46 +00:00
Shubham Palriwala 2fca750931 fix: overlay & close on click outside to work in survey preview (#2436) 2024-04-17 15:31:31 +00:00
Matti Nannt 294b67a6cc chore: update npm dependencies (#2464) 2024-04-17 13:34:38 +02:00
Dhruwang Jariwala e8e701c567 fix: The play() request was interrupted by a call to pause() (#2465) 2024-04-17 10:41:33 +00:00
Gideon Mohr 4fc8ee8181 fix: Pass only supported properties of account to CreateAccount (#2445)
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
2024-04-17 08:26:14 +00:00
Piyush Gupta 74b4be99a4 fix: single survey card rerenders on tag add or delete (#2461)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-17 08:19:18 +00:00
Dhruwang Jariwala 1bd9b8a485 fix: single select logic issue (#2458)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-17 04:14:37 +00:00
Matti Nannt 4b1652655b chore: move cacheHandler to a conditional import (#2463) 2024-04-16 18:14:40 +02:00
Matti Nannt b114e4797e chore: use CUSTOM_CACHE_DISABLED env instead of vercel specific env (#2462) 2024-04-16 17:01:10 +02:00
Anshuman Pandey 5add263e6f fix: data migration and cleanup for userId attribute (#2400)
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-15 12:52:12 +00:00
Jonas Höbenreich 529144fe36 chore: Improve Debug messages (#2451) 2024-04-15 12:47:51 +00:00
Piyush Gupta c2ea2716d3 feat: Add load more button to MultipleChoiceSummary component (#2449) 2024-04-15 10:34:59 +00:00
Shubham Palriwala 933ea87456 docs: fix S3_BUCKET_NAME env var in docs (#2448) 2024-04-15 10:05:29 +00:00
Matti Nannt 31e595972d chore: increase service revalidation interval to 24 hours (#2446) 2024-04-14 09:57:24 +02:00
Matti Nannt 27ba9114df chore: simplify action indexes (#2442) 2024-04-13 11:32:48 +02:00
Matti Nannt a068a2176b chore: remove ecs workflow from repo (#2438) 2024-04-12 17:38:41 +02:00
Matti Nannt 008fafabf7 chore: increase kamal pgbouncer pool size to 100 (#2437) 2024-04-12 17:35:51 +02:00
Piyush Gupta f07dffab07 fix: OpenTextSummary no longer has "Show more" button (#2427)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-12 15:28:05 +00:00
Johannes fa0cadb166 fix: ui tweaks slack integration (#2428) 2024-04-12 11:09:35 +00:00
Shubham Palriwala 8ef74fdaff fix: constants timeframe in seconds (#2434) 2024-04-12 13:10:20 +02:00
Shubham Palriwala 1b5d3c216f feat: allow manual trigger of kamal deploy (#2430) 2024-04-12 09:55:11 +02:00
Shubham Palriwala ee15c2676c feat: shared cache for next caching (#2426) 2024-04-11 19:05:49 +00:00
Naitik Kapadia 04e43725d1 feat: New Question Type Address (#2162)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-11 13:30:11 +00:00
Piyush Gupta 4100949bf6 feat: Add Server-side Filtering to the Surveys Page (#2277)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
2024-04-11 03:54:15 +00:00
nikunj bfb6012048 fix: Implement validation to remove cyclic logic (#2417)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-10 15:42:32 +00:00
Dhruwang Jariwala 425d970e38 fix: nps and rating validation issue with mls (#2419)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-10 13:31:18 +00:00
Shubham Palriwala 24bde119cb feat: web builds across GitHub Action are cross branch now (#2410) 2024-04-10 12:06:37 +00:00
Johannes 668c74f3d6 chore: move multi-lang up on lp (#2422) 2024-04-10 11:46:34 +00:00
Shubham Palriwala b153acaede fix: allow survey embeddings on other webpages (#2420) 2024-04-09 14:59:39 +00:00
Shubham Palriwala 18d3985e06 feat: docsearch integration (#2392)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-09 14:50:10 +00:00
Shubham Palriwala 95fe94fb7f fix: hide logo in branded link surveys (#2412)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-09 12:14:15 +00:00
M. Palanikannan 74829183ea feat: Slack Integration (#2125)
Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-09 12:12:25 +00:00
Piyush Gupta ff60ff9e0b feat: Add response filtering for meta data (#2363)
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-04-09 10:37:58 +00:00
Parth Gupta 27ce171dc3 fix: Remove unnecessary loader in actions tab (#2371)
Co-authored-by: ShubhamPalriwala <spalriwalau@gmail.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-09 09:48:52 +00:00
Piyush Gupta 496d1b3c2e fix: Unsaved Changes Confirm even though changes were saved (#2372)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-09 09:24:59 +00:00
Piyush Gupta 015d4c7663 chore: Simpler Sharing Page [Concept] (#2361)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-04-09 08:57:28 +00:00
Naitik Kapadia 214917cdb8 fix: Preview for short urls (#2174)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-09 08:21:21 +00:00
Olasunkanmi Balogun bfa0130672 feat: download-able feedback icons (#2276)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-08 15:00:50 +00:00
Dhruwang Jariwala 25b41b4d3a feat: profile image remove (#2411)
Co-authored-by: Sebastian Goscinski <sebiweise20@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-08 11:58:25 +00:00
Shubham Palriwala f93c5b3c55 fix: e2e tests, make welcomeCard.headline optional, remove console logs (#2374) 2024-04-08 09:37:09 +00:00
Matti Nannt 08ce026c7a feat: add survey schedule option (#2386)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-04-08 09:36:06 +00:00
Shubham Palriwala c44c0b83e3 fix: add MIGRATE_DATABASE_URL in kamal configs (#2407) 2024-04-08 09:32:05 +02:00
Stuart Malt 425d3819d7 fix: curl example message for update survey by id (#2405)
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
2024-04-08 07:12:59 +00:00
Shubham Palriwala de82762aeb fix: product logo is received null from prisma if not set (#2404) 2024-04-08 06:04:32 +00:00
Shubham Palriwala 4cd23e62bb feat: load surveys package on-the-fly in web-app (#2375)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-08 06:03:24 +00:00
Matti Nannt 62da30246a chore: update npm dependencies (#2403) 2024-04-05 18:47:36 +02:00
Anshuman Pandey 1e81b1df8e fix: vercel build (#2394)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-05 16:07:47 +00:00
Matti Nannt 35d0d65022 chore: increase kamal pgbouncer connection pool (#2402) 2024-04-05 17:34:43 +02:00
Matti Nannt 37568f333e feat: add sentry sourcemap support to Dockerfile (#2401) 2024-04-05 17:16:39 +02:00
Manish Singh Bisht 160b3f6353 feat: Branded Link Surveys (#2262)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
2024-04-05 11:20:39 +00:00
Dhruwang Jariwala 171469e26a fix: replace survey link display div with input field (#2389)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-05 09:48:00 +00:00
Johannes bd5f5032f8 chore: remove auto capping surveys (#2395) 2024-04-05 09:45:01 +00:00
Johannes 9b27d6f84b fix: responsiveness of loading skeleton on link survey (#2396) 2024-04-05 09:35:19 +00:00
Dhruwang Jariwala 91822c6ced fix: issues in multi select, rating and nps questions (#2397)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-05 09:33:04 +00:00
Matti Nannt d36e5615a7 chore: increase healthcheck max_attempts in kamal (#2398) 2024-04-05 10:17:24 +02:00
Dhruwang Jariwala 7e6fe63f6a feat: Video upload (#2351)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-05 04:40:52 +00:00
Dhruwang Jariwala 9f7cb7c1b9 fix: onboarding issues (#2373)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-04 21:26:09 +00:00
Shubham Palriwala 9e06dde2fc fix: use MIGRATE_DB_URL if present else fallback to DB_URL in migrate:deploy (#2390) 2024-04-04 12:24:55 +00:00
Shubham Palriwala 3a8aced70d feat: same origin header & password max length to prevent clickjackingg & DoS (#2370)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-04-04 11:47:53 +00:00
Matti Nannt 8d675bb91c chore: remove REDIS_CLIENT_URL from kamal (#2388) 2024-04-04 11:43:24 +02:00
Dhruwang Jariwala f2c6bfd80f fix: Survey editor tweaks (#2378)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-04 09:10:19 +00:00
Dhruwang Jariwala bc86249047 fix: recall not working with prefilled answer (#2379)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-04 08:45:13 +00:00
dependabot[bot] 2a35feb127 chore(deps-dev): bump the npm_and_yarn group across 1 directory with 1 update (#2387)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 08:18:47 +00:00
Matti Nannt 1e0c90ca6f feat: add pgbouncer to kamal setup (#2382)
Co-authored-by: ShubhamPalriwala <spalriwalau@gmail.com>
2024-04-04 07:18:16 +00:00
Anshuman Pandey d94e003244 fix: adds action to response meta (#2381) 2024-04-03 13:35:08 +00:00
Shubham Palriwala 2463ed8500 feat: add kamal setup workflow (#2380) 2024-04-03 09:12:20 +02:00
Shubham Palriwala 20eb679842 feat: use redis for rate limiting & next caching to resolve memory issues (#2078)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-04-02 14:46:43 +00:00
Shubham Palriwala c8ab6644bf chore: cleanup css console log (#2376) 2024-04-02 12:48:54 +00:00
Shubham Palriwala 98e0006f88 docs: in-app & link multi language surveys (#2350)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-04-02 12:35:31 +00:00
Anshuman Pandey ec5f6301d3 fix: relative image urls (#2369)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-04-01 14:02:38 +00:00
Dhruwang Jariwala 5dc9a4da2f feat: Matrix question (#2271)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-04-01 12:39:47 +00:00
Johannes c33892b41b fix: change title (#2367) 2024-04-01 11:40:49 +00:00
Matti Nannt cebc386de3 fix: error due to unused import (#2368) 2024-03-30 19:14:12 +00:00
Matti Nannt 4c118784be fix: date format transformation causing sync error (#2366) 2024-03-30 16:11:55 +01:00
Anshuman Pandey 85e5828cc8 fix: hotfix for sync validation errors (#2364) 2024-03-29 16:06:51 +00:00
Dhruwang Jariwala dfb1f86ddb fix: show responses in summary that doesn't fit the current schema (#2318)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-28 16:27:00 +00:00
Laurens Nienhaus 6004505502 docs: 1.6 upgrade docs & mitigation steps (#2295)
Co-authored-by: laurens <>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-28 17:13:26 +01:00
Matti Nannt 6122d88469 fix: packages api endpoint on vercel (#2359) 2024-03-28 15:59:28 +00:00
Anshuman Pandey f15a4b237d fix: s3-cache (#2362) 2024-03-28 15:38:25 +00:00
Johannes a1e9425a3e chore: Author page for blog (SEO) (#2356) 2024-03-28 13:07:24 +00:00
Shubham Palriwala 7219402aad docs: wsl2 postgres side note on local setup (#2347) 2024-03-28 10:34:32 +00:00
Shubham Palriwala 0f95f1c98c feat: Revamp @formbricks/js package (#2299)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-28 10:32:08 +00:00
Anshuman Pandey a9e45c0086 fix: background tabs fixed (#2348) 2024-03-28 09:41:00 +00:00
Matti Nannt dddc730ef4 fix: migration image name in migration docs (#2346) 2024-03-27 17:56:07 +01:00
Piyush Gupta b99b499cde feat: No responses due to filter state (#2283)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-27 14:22:24 +00:00
Piyush Gupta 784930d9fc fix: first question preview in share embed modal (#2284) 2024-03-27 14:18:57 +00:00
Matti Nannt 54fe0081ae fix: remove survey autofocus in iframe, improve accessibility of question components (#2345) 2024-03-27 14:17:29 +00:00
Johannes 52a41dc458 docs: add ecs blog article (#2344) 2024-03-27 11:02:58 +00:00
Matti Nannt f2dc157d54 chore: optimize sync endpoint performance (#2342) 2024-03-26 20:16:43 +00:00
nikunj a70810cb91 feat: display URL in metadata (#2329)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-26 16:14:36 +00:00
Matti Nannt a1e5060518 fix: displayPercentage not working for inline-triggers (#2340) 2024-03-26 16:00:24 +00:00
nikunj 46f062e81d fix: Profile image showing incorrectly (#2307)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-25 14:34:59 +00:00
Dhruwang Jariwala b7ba2e09ef fix: Allow all URL-safe characters in hidden field Id/ questionId (#2250) 2024-03-25 14:12:05 +00:00
Johannes 855685fedd chore: add link (#2333) 2024-03-25 13:57:06 +00:00
Matti Nannt 1a15d3f6f9 fix: question header in csv export (#2331) 2024-03-25 12:35:29 +00:00
Dhruwang Jariwala 7a93af3f25 fix: discard formatting on paste in Lexical Editor (#2315) 2024-03-25 12:34:55 +00:00
Shubham Palriwala 6451bc5833 docs: startAt for Link Surveys (#2317) 2024-03-25 12:33:46 +00:00
Dhruwang Jariwala 308e889c85 fix: sort team and product names alphabetically (#2316) 2024-03-25 12:32:13 +00:00
Shubham Palriwala 69227bd91e docs: advanced targeting (#2325)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-25 10:14:13 +00:00
Piyush Gupta 1a21f40e5d fix: Summary view proportions don't add up to 100% (#2314) 2024-03-25 09:08:16 +00:00
Matti Nannt 18f1bc5490 fix: remove pino to fix Vercel deployment (#2328) 2024-03-25 08:50:33 +00:00
Shubham Palriwala dadc337955 feat: pino logger for formbricks (#2296)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-22 13:21:44 +00:00
Johannes b72cda05c1 chore: add advanced targeting blog and remove /learn (#2324) 2024-03-22 11:16:35 +00:00
Matti Nannt 520d6bee78 chore: increase service caching period to 3 hours (#2323) 2024-03-22 11:11:14 +01:00
Matti Nannt 4dcf4612b3 fix: webhooks page breaking with too many surveys in the env (#2322) 2024-03-22 10:02:59 +00:00
Anshuman Pandey fa370c6900 feat: Advanced Custom Styling (#2182)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-22 09:50:16 +00:00
cosark f5ef6b9c02 docs: Add RepoCloud Deployment Option to Readme (#2266)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-21 15:56:51 +01:00
Matti Nannt cf8e22779a fix: Formbricks client route check errors if not enabled (#2311) 2024-03-21 14:23:27 +00:00
Jonas Höbenreich 10ac00940a fix: Docs footer link points to blog (#2306)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-21 13:15:30 +00:00
Dhruwang Jariwala 00beeb0501 fix: recall parsing in emails and improvements in response pipeline (#2187)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
2024-03-21 13:03:13 +00:00
Matti Nannt db63d98b00 fix: add route change listener to formbricks integration (#2309) 2024-03-21 12:23:51 +00:00
Dhruwang Jariwala 3c80eb35d2 fix: Skip onboarding for invite (#2246) 2024-03-21 11:40:02 +00:00
Shubham Palriwala 96b6b53301 fix: blog post - formbricks is actively developed (#2304) 2024-03-21 10:56:01 +00:00
Shubham Palriwala 4dc5ace3f8 feat: redirect user to email verification page if not done (#2241) 2024-03-21 10:43:01 +00:00
Dhruwang Jariwala 26b8c4c7d5 fix: subheader validation (#2303) 2024-03-21 10:02:14 +00:00
Johannes 90f978bcd6 fix: increase pricing clarity (#2302) 2024-03-21 10:17:53 +01:00
Johannes 917847b5da chore: Blog post on remove branding (#2300) 2024-03-21 07:48:01 +00:00
Dhruwang Jariwala f22e3fd549 fix: added migration script to fix range in rating question (#2298)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-20 20:20:10 +00:00
Dhruwang Jariwala 7b2cf9f3d8 fix: translate survey and migration script (#2290)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-20 17:37:01 +00:00
Matti Nannt 33f5da8c94 fix: unable to create actionClass due to caching issue (#2297) 2024-03-20 15:35:08 +00:00
Piyush Gupta 4a9f77f56a fix: integration and prefiling bug fix (#2293) 2024-03-20 14:33:07 +00:00
Matti Nannt a99b53ae32 fix: pull surveys package from formbricks cloud as a hotfix (#2292) 2024-03-20 13:34:14 +01:00
Dhruwang Jariwala 1925382980 fix: archived attribute issue (#2275) 2024-03-20 11:13:49 +00:00
Piyush Gupta d982ebca9d fix: make delete button more visible (#2291) 2024-03-20 11:12:30 +00:00
Dhruwang Jariwala 5810f9517e fix: verify email issues (#2281) 2024-03-19 19:46:07 +00:00
Matti Nannt 8f18e05075 fix: caching issue with translate surveys (#2288) 2024-03-19 19:36:28 +00:00
Matti Nannt c611ed5cfe chore: change caching revalidation interval to 30minutes (#2286) 2024-03-19 20:18:42 +01:00
Matti Nannt 65dedfe500 chore: npm version upgrade 1.7.1 (#2285) 2024-03-19 13:35:11 +01:00
Matti Nannt f494661235 fix: complex surveys not accepted in surveys management endpoint (#2282) 2024-03-19 12:10:18 +00:00
Shubham Palriwala 4abe080db2 fix: /api/js endpoint to work on vercel (#2242) 2024-03-19 09:46:09 +00:00
Matti Nannt 6c84850a7e fix: unable to save legacy surveys (#2280) 2024-03-19 09:06:18 +00:00
Matti Nannt 63708ec92b fix: Increase multilanguage data migration timeout (#2278) 2024-03-18 19:32:01 +00:00
Dhruwang Jariwala 8b5328aa74 feat: Multi language Surveys (#1630)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-03-18 19:02:18 +00:00
Shubham Palriwala 5c9e59b136 feat: expiresAt should only update on sync in js package (#2253)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-18 12:17:00 +00:00
Shubham Palriwala 7123a620c2 fix: add option to disable rate limitng in kamal (#2274)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-18 10:43:28 +01:00
Shubham Palriwala 6609b57084 fix: add nextauth url to kamal (#2272) 2024-03-18 09:53:55 +01:00
Matti Nannt 9123e3c866 chore: prepare kamal for production (#2263) 2024-03-16 08:02:06 +00:00
Jonas Höbenreich 92d0c6bce6 chore: small improvements (#2254)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-15 16:40:12 +00:00
Shubham Palriwala ae3f1885c2 feat: add onboarding responses to user profiling in posthog (#2261) 2024-03-15 16:16:47 +00:00
Shubham Palriwala 3ca6ec8b56 chore: remove passing of build time env vars (#2236) 2024-03-15 16:15:18 +00:00
Jonas Höbenreich 83a46d7313 fix: fix on-the-fly url trigger always triggering IMPORTANT (#2256)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-15 15:24:23 +00:00
Piyush Gupta b55b37b874 fix: fixes e2e tests (#2259) 2024-03-15 14:44:52 +00:00
Johannes c76bcecca0 fix: remove duplicate text (#2257) 2024-03-15 12:53:40 +00:00
Johannes 3776397468 fix: lp cases (#2252) 2024-03-15 10:08:51 +00:00
Piyush Gupta 4704c4a077 fix: command dropdown breaking (#2249) 2024-03-15 10:07:38 +00:00
Shubham Palriwala 034ca1d639 fix: animated backgrounds in ios to not have video controls (#2251) 2024-03-15 09:50:24 +00:00
Johannes e5862a2064 chore: new sub LPs, updated LP (#2207)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-15 09:16:48 +00:00
Matti Nannt 0332a2efe3 chore: add cache headers to og endpoint (#2240) 2024-03-14 14:24:23 +00:00
Kanishk Rawat be8e461f55 chore: update Requestly url in OSS Friends (#2239) 2024-03-14 14:06:56 +00:00
Piyush Gupta 722ee68b4c feat: Paginated Surveys Management API (#2198) 2024-03-14 13:59:58 +00:00
Shubham Palriwala e4078a3307 feat: opentelemetry integration (#2235)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-14 13:59:49 +00:00
Matti Nannt 907a9dc563 chore: rename github actions for simplification (#2238) 2024-03-14 13:46:41 +00:00
Piyush Gupta f6df94081d feat: Add Server-side pagination to Surveys List (#2197)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-14 13:45:31 +00:00
talboren 2436192995 chore: add Keep to OSS friends (#2229)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-14 13:32:15 +00:00
Matti Nannt f54e2e032a chore: update formbricks-com dependencies (#2237) 2024-03-14 13:17:13 +00:00
Piyush Gupta 1a28660dfd feat: added image link (#2228)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-14 09:38:29 +00:00
Matti Nannt f98a57582a chore: prepare 1.6.1 release (#2232) 2024-03-13 15:35:51 +00:00
David Septimus 0cc365261e feat: improve configurability for upload storage (#2144)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 14:57:13 +00:00
Anshuman Pandey 6f78049c1f fix: fixes authorization checks for update product server action (#2231) 2024-03-13 13:31:22 +00:00
Piyush Gupta 2f11aa6c14 feat: adds response count indicator (#2213)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-13 10:18:37 +00:00
Dhruwang Jariwala 09cb61ae1e fix: display email instead of id (#2202)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 09:16:57 +00:00
Dhruwang Jariwala 65a152e518 fix: survey background image upload issue (#2222)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-03-13 09:13:05 +00:00
Dhruwang Jariwala 92d88271d7 fix: scroll to bottom when other option is selected (#2204) 2024-03-13 09:11:40 +00:00
Dhruwang Jariwala a56c354e84 fix: Incorrect created_at value while duplicating a survey (#2217)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 09:10:09 +00:00
Dhruwang Jariwala 29a9b7e23e fix: Autoclose issue (#2216) 2024-03-13 09:06:57 +00:00
Shubham Palriwala 94a419249b fix: font usage in surveys package (#2220) 2024-03-13 09:04:54 +00:00
Shubham Palriwala 12907c9061 feat: support for supercronic in arm images (#2224) 2024-03-13 09:02:11 +00:00
Shubham Palriwala 0aa468f8f3 fix: (e2e) API surveys after icons changed (#2225) 2024-03-13 09:01:37 +00:00
Shubham Palriwala 91447e1502 docs: remove old debug functionality in params (#2226) 2024-03-13 09:01:11 +00:00
Shubham Palriwala 84ea14820a docs: azure sso integration (#2227) 2024-03-13 08:04:20 +00:00
Piyush Gupta 8fb472c37c fix: rating quese style hotfix (#2223) 2024-03-13 07:57:56 +00:00
Naitik Kapadia 6efb6d4e7b feat: Ability to startAt specific question (#2175)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-03-12 12:34:40 +00:00
Dhruwang Jariwala 99da20f831 chore: replaced Heroicons with corresponding lucide-react icons (#2221) 2024-03-12 12:29:21 +00:00
Shubham Palriwala 52d1dc9ed9 fix: e2e tests breaking in main (#2219)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-12 11:55:10 +00:00
JianJroh 5633bb18ef fix: use fileURLToPath to get correct file path on windows (#2147)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-12 11:53:39 +00:00
Piyush Gupta b2cb0ecff3 fix: rating question options size (#2206)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-11 19:12:26 +00:00
Piyush Gupta 2089b339b4 fix: added checks on unauthorized server actions (#2218)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-11 14:16:47 +00:00
Piyush Gupta 2e83adc846 feat: adds skeleton loader (#2214) 2024-03-11 11:21:25 +00:00
Matti Nannt 189cbcecd7 chore: dockerfile needs no internet access to run (#2215) 2024-03-11 11:01:12 +00:00
Shubham Palriwala 5aebde79e7 docs: remove old debug functionality (#2212) 2024-03-11 10:21:55 +00:00
Piyush Gupta 5cce4a1db4 fix: display count change on date filter (#2208) 2024-03-11 08:33:49 +00:00
Piyush Gupta c6ff74f166 fix: added sanitizeString util helper (#2209) 2024-03-09 06:47:37 +00:00
Shubham Palriwala e8aad9f469 fix: remove unset env vars from kamal & gh action (#2210) 2024-03-08 13:30:18 +00:00
Shubham Palriwala 455a061f35 feat: kamal deployment integration (#2178) 2024-03-08 12:04:58 +00:00
Piyush Gupta a9f35df278 fix: download responses not working (#2205) 2024-03-08 10:32:36 +00:00
Dhruwang Jariwala 82124a8b1c fix: lint warnings (#2201) 2024-03-07 14:41:33 +00:00
Dhruwang Jariwala f3f93faf1d fix: Add button to link editor (#2200)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-07 14:41:02 +00:00
Piyush Gupta 57d117eb98 fix: Smiley Rating Question on iPhone / WebKit (#2195) 2024-03-07 11:18:47 +00:00
Piyush Gupta d01b293a27 feat: Move Response Summary Server-side (#2160)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-06 11:53:21 +00:00
Shubham Palriwala a9f5289672 feat: tests for survey API endpoints & fix survey create API input params (#2013)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-06 11:10:35 +00:00
Matti Nannt 1df1419827 chore: remove s3 check from health check for now (#2194) 2024-03-06 08:49:28 +00:00
Dhruwang Jariwala f20a0d2ff7 fix: confirm modal on back button (#2189) 2024-03-06 07:42:32 +00:00
Johannes b9e5a6f9b9 fix: onboarding skips + track sdk setup success (#2191) 2024-03-06 07:37:32 +00:00
Matti Nannt b2eaf1f6a3 chore: remove posthog tracking from auth and share (#2190) 2024-03-05 14:41:50 +00:00
Matti Nannt a873974f0d chore: improve db indexes with segmentId index (#2192) 2024-03-05 14:23:08 +00:00
Matti Nannt 09974e1a10 fix: action cacheClass cache not getting revalidation after deleting (#2188) 2024-03-05 12:04:36 +00:00
Piyush Gupta 45d5980527 fix: rating icon bug in safari (#2183)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-05 10:30:59 +00:00
Piyush Gupta 73a25a412c fix: Call to Action question bug (#2184) 2024-03-05 09:44:41 +00:00
Matti Nannt f0647ce240 fix: only get first page of surveys for survey list (#2186) 2024-03-05 08:45:08 +00:00
Anshuman Pandey 7c09dd9d10 fix: refetch server data when share embed modal is closed (#2185) 2024-03-05 08:10:49 +00:00
Matti Nannt c5bdbc89ca fix: multiple surveys might be showing at the same time (#2179) 2024-03-04 11:15:06 +00:00
Dhruwang Jariwala 673832a7e1 fix: CORS error while using iframes (#2176) 2024-03-04 10:54:36 +00:00
Dhruwang Jariwala 6c1989b527 fix: break lines at new line character in single response card (#2177) 2024-03-04 07:20:23 +00:00
Dhruwang Jariwala 96bc0e669c fix: Recall in verify email question preview and integrations (#2145)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-02 11:30:07 +00:00
Matti Nannt 9791490449 chore: update npm deps & survey/js package version (#2171) 2024-03-02 11:17:53 +00:00
Shubham Palriwala ee053e6642 feat: webapp URL based redirects in middleware for external LB integrations (#2151)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-02 11:00:20 +00:00
Anshuman Pandey 56f6dbe9a6 feat: sync endpoint error handling (#2132)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-02 10:53:39 +00:00
Johannes 49c18023bd chore: add css ids to onboarding (#2170) 2024-03-02 09:02:53 +00:00
Johannes 3f5f29122b fix: add onboarding tracking (#2169) 2024-03-01 15:54:37 +00:00
Anshuman Pandey 2ed03bc8da fix: fixes duplicate survey segment (#2168) 2024-03-01 13:30:06 +00:00
Shubham Palriwala 5aa72a4c76 feat: show error on browser console for easier debugging for webhook test endpoint (#2163) 2024-03-01 12:03:12 +00:00
Anshuman Pandey 4a8fdcbbbc fix: saved actions (#2167) 2024-03-01 11:42:34 +00:00
Johannes 5855804291 fix: remove naviate from save (#2166) 2024-03-01 11:05:03 +00:00
Anshuman Pandey 9fdb7452a2 hotfix: e2e tests (#2164) 2024-03-01 10:57:12 +00:00
Johannes 7573b2d0ba fix: height issue (#2165) 2024-03-01 10:39:39 +00:00
Dhruwang Jariwala cdd93ee86b fix: Cta button issue on thank you card (#2148)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-03-01 09:37:42 +00:00
Matti Nannt dbbd450b62 chore: improve person & attribute query performance (#2161) 2024-03-01 07:36:49 +00:00
Matti Nannt 255f1cee61 fix: vercel-config failing on Vercel (#2159) 2024-02-29 12:40:36 +01:00
Johannes 36ac4ecdb9 fix: isCloud condition (#2156) 2024-02-29 09:32:46 +01:00
Thomas Kaul 4edb92365a fix: Typo in OSS Friends API (#2155)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-29 08:47:28 +01:00
Dhruwang Jariwala 89eee21978 fix: allow decimal in number input field (#2149) 2024-02-29 08:46:51 +01:00
Dhruwang Jariwala a8563ad905 feat: Onboarding revamp (#2073)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-28 21:35:10 +01:00
Matti Nannt 06eebe36ee fix: update action indexes for faster query processing (#2154) 2024-02-28 18:17:40 +00:00
Shubham Palriwala 5fc18fc445 fix: increase max height of open text question input to 8 lines (#2153) 2024-02-28 16:15:50 +00:00
Shubham Palriwala 53d3be3b27 feat: identify teams & their billing in Posthog (#2112) 2024-02-28 09:59:27 +00:00
Dhruwang Jariwala 078c5db2b0 fix: preview bugs (#2134) 2024-02-28 05:51:53 +00:00
Shubham Palriwala 356d237e60 fix: hidden fields object was incorrectly required in survey creation api (#2140) 2024-02-27 16:44:00 +00:00
Shubham Palriwala e799aa9b37 fix: authorization checks across all billing pages (#2143) 2024-02-27 16:31:53 +00:00
Matti Nannt b36a263ef6 fix: invite token of null when callbackUrl present (#2142) 2024-02-27 15:41:41 +00:00
Shubham Palriwala 6e2fa40155 feat: 99 unlimited plan (#2137) 2024-02-27 13:10:39 +00:00
Piyush Gupta df2cb9e26c feat: add picture selection support to response filters (#2105) 2024-02-27 13:06:31 +00:00
Nathan Clevenger e33d640620 fix: landing page typo (#2135) 2024-02-27 12:58:25 +00:00
Matti Nannt 32dcb75ef8 fix: health endpoint s3 connection (#2136) 2024-02-27 13:20:49 +01:00
Midka b1c2f90feb fix(S3): add support for custom endpoint (#2049)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-27 11:39:43 +00:00
Dhruwang Jariwala 8064e1ecf6 fix: Check for complete submission before displaying CTA on Thank You… (#1979)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-27 11:35:52 +00:00
Shubham Palriwala 21787f2af5 fix: react console errors & warnings in dashboard & survey editor (#2113)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-27 11:06:01 +00:00
Sebastian Goscinski 5acdf018d3 feat: custom S3 endpoint to use third party storage services (#2133)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-27 10:53:00 +00:00
Matti Nannt 47ec19b46d chore: update version for 1.6 release (#2123) 2024-02-26 22:31:52 +01:00
Dhruwang Jariwala 60b474a4f9 fix: unformatted recall question in logic editor (#2126) 2024-02-26 20:17:59 +00:00
Dhruwang Jariwala a027d1ef3d fix: gs readability issue for multiple file uploads (#2127) 2024-02-26 20:07:42 +00:00
Dhruwang Jariwala 7f68b4f800 fix: welcome card fixes (#2128) 2024-02-26 20:06:22 +00:00
Matti Nannt 71717c6b02 fix: github action (#2131) 2024-02-26 19:29:28 +00:00
Michele 8ad1ecfcb9 feat: added Tiledesk to OSS friends (#2124) 2024-02-26 07:37:19 +00:00
Matti Nannt 338b21620b chore: Add database migration dockerfile (#2122) 2024-02-24 16:08:57 +00:00
Matti Nannt 78ed91b7c3 chore: update dockerfile to use turbo prune (#2121) 2024-02-24 15:39:46 +00:00
Matti Nannt dbe249e6ce chore: run github actions with node 20 (#2120) 2024-02-24 11:07:46 +00:00
Shubham Palriwala 241716b4f3 docs: add migration guide for v1.6 (#2010)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 16:41:38 +00:00
Anshuman Pandey f19e1960b7 fix: adds relative image url path for self hosters without s3 (#2096) 2024-02-23 14:50:08 +00:00
Anshuman Pandey 70b7f6614e feat: on the fly triggers (#2110)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 14:37:35 +00:00
Johannes a680a62220 fix: adjust name size in survey card (#2118) 2024-02-23 13:37:41 +00:00
Piyush Gupta cb17e185f1 fix: hide attributes from sync endpoint (#2117)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 12:14:10 +00:00
Johannes 8b2990a16f fix: remove delete functionality from handle Go Back in survey editor (#2107)
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-23 10:26:32 +00:00
Anshuman Pandey 6111e02b1b fix: edit segment card changes (#2081) 2024-02-23 10:16:22 +00:00
Matti Nannt 186feefdb5 chore: caching optimisations in sync endpoints (#2111)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-22 18:18:06 +00:00
Shubham Palriwala 312858e278 fix: dont interrupt response on display updation failure (#2102)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-22 14:45:30 +00:00
Jonas Höbenreich 61ca42eb83 feat: add Cache-Control header to public file serving (#2099) 2024-02-22 14:36:19 +00:00
Shubham Palriwala 7f21e65625 feat: custom OIDC providers (#2109) 2024-02-22 14:31:48 +00:00
Dhruwang Jariwala cdf8e91dad fix: Rating issue fix (#2100)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-22 10:45:49 +00:00
Johannes aa55ced425 feat: allow remove branding of in app surveys (#2085)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-02-22 10:13:34 +00:00
Shubham Palriwala 1d2c8719c3 fix: google oauth check only on google envs (#2106) 2024-02-22 09:09:23 +00:00
Piyush Gupta 09ede38509 feat: move download functionality server side (#2103)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-22 08:44:57 +00:00
Johannes be14678cd0 fix: show real date and remember survey list orientation (#2108) 2024-02-21 15:25:19 +00:00
Piyush Gupta d2e6238ad7 feat: move response filtering server-side (#1844)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-20 15:34:34 +00:00
Shubham Palriwala f69e8e82e3 fix: rewrite stripe + bug in unsubscribing (#2084) 2024-02-20 07:49:53 +00:00
Johannes 96808b3464 chore: add themeisle and optimole logos to lp (#2086)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-19 12:39:37 +00:00
Johannes 3ce4e7f7a2 chore: added enterprise license page for self-hosters incl. status indicator (#2077)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 12:29:43 +00:00
Shubham Palriwala 606ca4ea98 docs: link-surveys: hidden fields page (#2082)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-19 11:20:29 +00:00
Shubham Palriwala acf279d3ba feat: add RATE_LIMITING_DISABLED env var to bypass rate limiting (#2091)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 10:58:35 +00:00
Shubham Palriwala 2425dc5459 feat: rate limit per user per env sync user identification endpoint (#2090)
Co-authored-by: review-agent-prime[bot] <147289438+review-agent-prime[bot]@users.noreply.github.com>
2024-02-19 10:58:30 +00:00
Shubham Palriwala 6ae782b984 feat: downgrade team functionality when payment subscription has expired (#2092) 2024-02-19 10:50:24 +00:00
Sudhanshu Pandey eadf63b47e chore: revert ECS Github Action (#2094) 2024-02-19 10:32:53 +00:00
Shubham Palriwala 12e5f097a5 docs: move env vars to config page (#2095)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 10:29:37 +00:00
Jonas Höbenreich 4c1e688f12 feat: add caching to survey sync (#2011) 2024-02-16 08:38:01 +00:00
Shubham Palriwala 3b2cf7c0da fix: (landing page) setup code font visibility (#2079)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-15 17:50:50 +00:00
Shubham Palriwala 4cc3ee278d feat: add go to dashboard button in error modal (#2063) 2024-02-15 17:45:10 +00:00
Malte Hecht 95493608ed fix: Add missing space to .env.example (#2075) 2024-02-15 17:44:40 +00:00
Johannes 101a029344 chore: Add new logos to readme (#2087) 2024-02-15 15:39:06 +00:00
Shubham Palriwala 92fe0adf1e fix: (docs) dark mode hover states (#2080) 2024-02-15 13:47:37 +00:00
Matti Nannt 0e41ebf849 chore: reduce vercel memory usage (#2083) 2024-02-15 11:55:47 +00:00
Matti Nannt 969fb0241a fix: formbricks-com build error (#2072) 2024-02-14 13:25:27 +00:00
McPizza d588a61be5 docs: add UnInbox to OSS Friends (#2076) 2024-02-14 12:54:10 +00:00
Dhruwang Jariwala 82207d8f52 fix: redirect for nested windows (#2074) 2024-02-14 12:41:42 +00:00
Anshuman Pandey c85ae57697 fix: image cache revalidation (#2071)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-14 10:32:44 +00:00
Anshuman Pandey e6fe027e57 fix: segments modals (#2070) 2024-02-14 09:41:57 +00:00
Nick van Leeuwen 3090151c50 feat: Added the ability to remove the login via email button (#1993)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-14 09:02:08 +00:00
Sudhanshu Pandey f899cb0478 fix: ECS Github Action (#2069) 2024-02-14 07:51:39 +00:00
Sudhanshu Pandey f5c5ce23b0 fix: ecs Github Action (#2066) 2024-02-13 15:56:45 +00:00
Johannes 084b17e950 fix: lp fixes and updates (#2067) 2024-02-13 15:13:30 +00:00
Johannes a643d90a2b chore: Add StackedCardsContainer component (#2064) 2024-02-13 15:06:19 +00:00
Anshuman Pandey 10b61be19a fix: load segment modal UI fix (#2065) 2024-02-13 11:04:29 +00:00
Sudhanshu Pandey f0833786d9 fix: ECS deployment GitHub Action (#2061)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-13 07:56:01 +00:00
Anshuman Pandey ad9296a00c fix: getSyncSurveys (#2062) 2024-02-13 06:44:46 +00:00
Anshuman Pandey bf51e578b2 feat: Advanced Targeting (#758)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 19:08:47 +00:00
meletj 000a11c8bc docs: add Prisma to OSS Friends (#2059) 2024-02-12 16:12:31 +00:00
Jonas Höbenreich 531facd74c feat: add debug mode via url parameter (#2039)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-12 13:00:20 +00:00
Johannes 7843e2da99 fix: update Upgrade Notifier in branding removal (#2058) 2024-02-12 11:51:52 +00:00
Dhruwang Jariwala 77e2472175 chore: redirect for deletion survey (#2054)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:56:16 +00:00
Dhruwang Jariwala 336480a338 fix: cache revalidation on createResponse and docs (#2057) 2024-02-12 10:53:59 +00:00
Dhruwang Jariwala f102901b90 fix: open text question validation issue (#2051)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:48:46 +00:00
Shubham Palriwala 14b162aabc feat: group events by environmentId in posthog (#2036)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:11:05 +00:00
Dhruwang Jariwala 07f28d0971 fix: team issues (#2050)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 09:53:38 +00:00
Dhruwang Jariwala 40d3ac19d1 chore: "include one of" option for single select (#2052) 2024-02-12 08:31:58 +00:00
Dhruwang Jariwala 7c0a9bed46 fix: multi select scroll issue (#2053) 2024-02-12 08:25:32 +00:00
Dhruwang Jariwala c372108b91 fix: weekly template (#2041) 2024-02-09 05:42:40 +00:00
Dhruwang Jariwala 0bccee23e9 fix: File upload issues and tweaks (#2040)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-08 15:41:00 +00:00
Dhruwang Jariwala 831bf148d8 fix: bg animation and publish survey issue (#2037)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-08 14:18:17 +00:00
Shubham Palriwala 4b1bbf0ba4 feat: double client side api rate limits (#2043) 2024-02-08 14:16:51 +00:00
Matti Nannt 5ef9b574ab docs: fix env variable table (#2035) 2024-02-07 18:01:13 +00:00
Matti Nannt d55611ce02 chore: fix formbricks-com build issues (#2033) 2024-02-07 13:44:14 +00:00
Thomas Kaul 07228c4575 docs: Update README.md (#2032)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-07 13:42:28 +00:00
Shubham Palriwala 7bd15053e5 docs: mention reverse proxy & fix font shade in dark mode (#2031)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-07 12:10:48 +00:00
Matti Nannt 548251a2ba chore: remove *_auth_enabled env variables (#1997) 2024-02-07 11:35:13 +00:00
Matti Nannt fd6322652b docs: add more license information (#2030) 2024-02-07 11:24:15 +00:00
Johannes 8b1718c9b3 chore: tweak billing page for clarity (#2028) 2024-02-07 09:10:34 +00:00
Shubham Palriwala 82aba726db docs: readme for @formbricks/api (#2027) 2024-02-07 08:15:36 +00:00
Dhruwang Jariwala b264b2473b fix: gs spreadsheet scroll issue (#2020) 2024-02-07 07:45:47 +00:00
Matti Nannt e80d71e654 fix: posthog free limit reporting (#2026) 2024-02-06 20:40:00 +00:00
Jonas Höbenreich 3472033c7e feat: Introduce Dynamic Pixel Server for Seamless Self-Hosting (#2015)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-06 16:10:49 +00:00
Matti Nannt 3db4f59b0a chore: update formbricks pricing page with new features (#2025) 2024-02-06 11:26:38 +00:00
Johannes 5c023d58d9 chore: tidy up blog and article typos (#2023) 2024-02-06 10:21:17 +00:00
Shubham Palriwala 6a9968bd97 feat: send free limit reached to PostHog (#2014)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-06 09:55:09 +00:00
Matti Nannt 9c90c9faf1 fix: deleted responses still show in API (#2022) 2024-02-06 09:37:05 +00:00
Shubham Palriwala b51e9ccdb9 fix: remove default env vars in docker compose (#2018) 2024-02-05 16:09:05 +00:00
Shubham Palriwala 967680263b feat: cache web builds & playwright binaries in CI (#2009) 2024-02-05 11:19:11 +00:00
Matti Nannt 8a4bbfbd1c chore: prepare 1.5.1 release (#2012) 2024-02-05 09:56:21 +00:00
Rotimi Best 9f63822038 docs: add ClassroomIO to OSS Friends (#2008) 2024-02-05 07:53:54 +00:00
Jonas Höbenreich 9756aed94f feat: Add support for Cloudfront country header (#2003) 2024-02-04 11:31:34 +00:00
Matti Nannt 97562118a1 fix: create survey API expects creator (#2007) 2024-02-04 09:03:38 +00:00
Sudhanshu Pandey fd217308e1 fix: ECS deployment GitHub Action (#2005) 2024-02-02 19:26:00 +00:00
Matti Nannt 6d4098b8b8 chore: remove old CLA form from docs & github templates (#1995) 2024-02-02 09:09:58 +00:00
Sudhanshu Pandey 2f7b70516c fix: ecs github action (#1992) 2024-02-02 08:58:14 +00:00
Shubham Palriwala 9761483530 feat: auto subscribing to teams survey responses email (#1990)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-01 17:20:54 +00:00
Matti Nannt 6cea8a2246 fix: formbricks-com build errors (#1991) 2024-02-01 10:08:25 +00:00
Dhruwang Jariwala b7250a284a fix: default autocomplete value (#1986)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-01 09:30:17 +00:00
Dhruwang Jariwala 1402f4a48b chore: Tweaked survey list (#1978)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-01 07:51:21 +00:00
Shubham Palriwala 70fe0fb7a7 feat: enable weekly summary & support for callbacks on login (#1885)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-01 06:16:21 +00:00
Sudhanshu Pandey 5471324cfe fix: ecs-deployment.yml (#1989) 2024-01-31 20:45:40 +00:00
Sudhanshu Pandey 0a78848612 fix: ECS deployment Github Action (#1988) 2024-01-31 19:39:40 +00:00
Dhruwang Jariwala f553bce7f1 fix: links and survey overlapping (#1985)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-31 15:53:51 +00:00
Dhruwang Jariwala 43566a54b6 fix: Phone validation (#1987) 2024-01-31 14:21:16 +00:00
Matti Nannt 51a811ac8e fix: app page redirect throws error (#1984) 2024-01-31 10:59:17 +00:00
Sudhanshu Pandey 74fba30d5f feat(github action): Add's a new GitHub Action to deploy webapp to ECS cluster (#1982)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-31 10:57:25 +00:00
Shubham Palriwala 22ea797b15 feat: (docs) quickstart for link surveys (#1981)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-01-30 20:52:31 +00:00
Johannes 0ce10e8824 docs: Add newsletter survey to best practices (#1980)
Co-authored-by: Olasunkanmi Balogun <olasunkanmiibalogun@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-30 15:41:27 +00:00
Matti Nannt ca0d63a0fc chore: remove getting started email (#1977) 2024-01-30 11:52:14 +00:00
Matti Nannt 2a9b34104d feat: add support for customer-io formbricks users sync (#1976) 2024-01-30 11:08:40 +00:00
Shubham Palriwala 16cbc3365b feat: custom placeholder label for other option in single & multi select (#1971)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-30 09:21:01 +00:00
Olasunkanmi Balogun 0122ccb797 chore: Newsletter article and best practices docs bug fix (#1952)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-01-30 09:12:41 +00:00
Dhruwang Jariwala fc2beb3d19 chore: Tags and notes to csv exports (#1968)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-29 14:35:40 +00:00
Dhruwang Jariwala 698da4c3a1 feat: Randomizer for in-app surveys (#1972)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-29 12:54:32 +00:00
Dhruwang Jariwala 07f6f1d04b fix: stars issue in rating question (#1973) 2024-01-29 07:49:29 +00:00
Dhruwang Jariwala 6dcd06534b fix: single use survey not working with email verification (#1935)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-26 16:31:18 +00:00
Guilherme Oenning 1fb165e5ad docs: add Aptabase to OSS friends (#1969)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-26 15:02:49 +00:00
Dhruwang Jariwala 3775b3e142 fix: thank you card tweaks (#1956)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-26 14:19:03 +00:00
Dhruwang Jariwala 92417d4d97 chore: Added average to rating summary (#1966)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-26 14:18:10 +00:00
Matti Nannt 6340d499b9 chore: prepare 1.5.0 release, update deps (#1962) 2024-01-26 10:28:36 +00:00
Johannes 4dfe1d9af0 chore: tweak sharing results UX (#1964) 2024-01-26 10:02:15 +00:00
Anshuman Pandey ee5a519120 feat: lazy loading for @formbricks/surveys (#1940)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: ShubhamPalriwala <spalriwalau@gmail.com>
2024-01-25 15:05:46 +00:00
Dhruwang Jariwala c29c580fbe fix: Response card issues (#1957)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-25 11:55:52 +00:00
Anshuman Pandey 48cf9de000 fix: e2e flakyness (#1961) 2024-01-25 09:36:03 +00:00
Shubham Palriwala 1945b6ddf5 feat: (docs) introducing in-app surveys section (#1942)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-24 13:16:27 +00:00
Shubham Palriwala f8d4c45631 fix: only consider subscriptions if they are in active state (#1955) 2024-01-24 12:42:07 +00:00
Anshuman Pandey d8bd42297f fix: management storage api (#1958) 2024-01-24 12:24:09 +00:00
Dhruwang Jariwala f386de1bd7 fix: template breaking issue (#1954) 2024-01-24 07:17:47 +00:00
Johannes cc8669c886 fix: typo in email (#1953) 2024-01-24 00:02:33 +00:00
Johannes 3d6e9740aa chore: update and tweak community page (#1950) 2024-01-23 21:11:50 +00:00
Johannes 6ea7486bb1 fix: members table UI, tweak upsell UI (#1949) 2024-01-23 20:09:30 +00:00
Johannes 2f17c87a80 chore: add c.io to privacy policy (#1948) 2024-01-23 18:11:46 +00:00
Olasunkanmi Balogun 6ac60a9858 chore: add waitlist survey to the blog (#1944)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-23 17:50:52 +00:00
Sushant 78c2cf451b feat: Create new team (#1925)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-23 17:38:19 +00:00
Dhruwang Jariwala 64db29417d chore: added DOMPurify to prevent xss (#1894)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-23 17:05:47 +00:00
Dhruwang Jariwala aa63c89a6a fix: Tweaked thank you card (#1923)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-23 15:26:16 +00:00
Dhruwang Jariwala 1fd339e5a0 chore: Adds verified email to response data for email verification surveys (#1943) 2024-01-23 09:26:14 +00:00
Shubham Palriwala 8ebbad4314 feat: (docs) blog article on self hosting session (#1941) 2024-01-23 09:03:54 +00:00
Anshuman Pandey f1535d3993 feat: e2e test for actions (#1831)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-23 06:47:44 +00:00
Olasunkanmi Balogun cad32d19e9 chore: Add best website feedback tools 2024 article to the blog (#1912)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-22 20:24:00 +00:00
Shubham Palriwala 64ddcb64b7 feat: send getting started email on signup (#1877)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-22 20:20:01 +00:00
Johannes 5ab55bb2b3 fix: remove ossgg folder (#1939) 2024-01-22 19:45:38 +00:00
tyjkerr 2c008d544c feat: survey error modal/page (#1140)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-01-22 15:38:23 +00:00
Anshuman Pandey 59bb977b3b fix: error wrapper (#1937) 2024-01-22 12:52:25 +00:00
Anshuman Pandey 64ff49acf3 fix: error handling for file upload (#1936) 2024-01-22 12:48:45 +00:00
Shubham Palriwala 69293e2d1a chore: upgrade formbricks-com to latest deps (#1866)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-22 10:49:33 +00:00
Ryan Martin 7111480820 docs: typos & broken markdown formatting (#1924)
Co-authored-by: Ryan Martin <rmrt1n@users.noreply.github.com>
2024-01-22 10:10:25 +00:00
dependabot[bot] 55f4ff6fee chore(deps-dev): bump vite from 5.0.11 to 5.0.12 (#1929)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 09:43:48 +00:00
Dhruwang Jariwala e3056ed403 fix: Improved UX for survey background selection (#1931) 2024-01-22 09:40:16 +00:00
Shubham Palriwala 7059d3843d feat: logs command in prod script (#1934) 2024-01-22 09:17:06 +00:00
Dhruwang Jariwala c89d030222 feat: report survey link (#1932) 2024-01-22 09:11:06 +00:00
Dhruwang Jariwala 6a76330c84 fix: response card tweaks (#1933) 2024-01-22 09:02:18 +00:00
Shubham Palriwala bd256b9426 feat: /health endpoint (#1898)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-22 07:48:42 +00:00
Johannes c4ace07765 fix: tweak sharing results UX (#1928) 2024-01-19 19:09:55 +00:00
Dhruwang Jariwala 8745fd8b92 fix: empty logic editor issue (#1915) 2024-01-18 10:24:02 +00:00
Dhruwang Jariwala 2baa9a0108 fix: zindex issue and fallback input issue in recall (#1919) 2024-01-18 10:22:52 +00:00
Dhruwang Jariwala f91a7b2c7a fix: duplicate image issue (#1920) 2024-01-18 10:21:38 +00:00
Dhruwang Jariwala 542e4da878 fix: full width image issue on welcome card (#1921) 2024-01-18 10:20:29 +00:00
Dhruwang Jariwala 41aa82814d fix: logic jump for other option (#1922) 2024-01-18 10:19:48 +00:00
Johannes 998773be6b fix: Add response api link to docs navbar (#1918) 2024-01-17 21:40:58 +00:00
Johannes f35b007e98 fix: Tweak survey settings tab and share modal to shorten viral loop (#1882)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: ShubhamPalriwala <spalriwalau@gmail.com>
2024-01-17 14:29:16 +00:00
Dhruwang Jariwala f2800632e3 feat: Recall functionality (#1789)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-17 13:35:02 +00:00
Dhruwang Jariwala e30f16cec2 fix: Embed in an Email preview (#1913)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-17 11:09:44 +00:00
Matti Nannt 3586818fda fix: update stripe usage report times to fix conflicts (#1914) 2024-01-17 10:59:04 +00:00
Khanh Ho 602238f6a5 feat: Add "How to add people" to People View (#1910) 2024-01-17 10:23:46 +00:00
Johannes 1901313873 docs: add self-hosting license form (#1911) 2024-01-17 10:07:49 +00:00
Shubham Palriwala 8652eb69de feat: integrate depot.dev for faster docker arm builds (#1907) 2024-01-17 07:14:51 +00:00
Shubham Palriwala e896a737f4 feat: increase rate limit for client api endpoints (#1904) 2024-01-17 07:11:47 +00:00
Shubham Palriwala 4f61b4320f fix: email handling & e2e CI bug (#1896) 2024-01-17 06:40:49 +00:00
Shubham Palriwala 9d1cb8f595 fix: (docs) mention google drive api for sheets integration in self host (#1905) 2024-01-16 12:50:24 +00:00
Dhruwang Jariwala 81e9ac0e12 fix: next button tweak (#1903) 2024-01-16 09:34:44 +00:00
Shubham Palriwala be4534da2d fix: formbricks docs survey endpoint (#1901) 2024-01-16 07:14:58 +00:00
Shubham Palriwala f4a31ad563 feat: unit tests for survey service (#1813)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-16 05:41:16 +00:00
Dhruwang Jariwala 82302360fa test: unit test for display services (#1832)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-15 16:21:33 +00:00
Shubham Palriwala f6f45d74d5 feat: (codespaces) run formbricks app on load (#1871) 2024-01-15 16:13:54 +00:00
Anshuman Pandey 04a47b3d0a fix: adds vite dev mode (#1893) 2024-01-15 14:06:06 +00:00
Matti Nannt cc64d7dfe9 chore: prepare 1.4.2 release (#1899) 2024-01-13 09:17:21 +00:00
Shubham Palriwala 0c30dfbcf3 feat: docs for source tracking (#1887)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-12 18:57:52 +00:00
Anshuman Pandey 3e9f61792f fix: fixes duplicate named file uploads (#1888) 2024-01-12 16:50:16 +00:00
Shubham Palriwala ad63be3005 feat: add country location to response metadata (#1892) 2024-01-12 16:43:53 +00:00
Dhruwang Jariwala 1635297226 fix: warning for duplicate action name (#1897) 2024-01-12 15:16:03 +00:00
Dhruwang Jariwala 0ff7bb56ec fix: download response (#1890) 2024-01-11 19:41:22 +00:00
Dhruwang Jariwala f3666b8745 fix: added missing functionality for image upload in file upload and cal question (#1886) 2024-01-11 17:37:14 +00:00
Dhruwang Jariwala ff864e3c82 feat: hide progress bar toggle (#1883) 2024-01-11 09:47:36 +00:00
Dhruwang Jariwala cc56584db6 fix: animated background issue (#1884)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-11 08:44:15 +00:00
Matti Nannt 440c12699c chore: add tax settings to stripe checkout (#1880) 2024-01-10 16:52:48 +00:00
Anshuman Pandey 8002d3e71f fix: global error handler for js package (#1863)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-10 16:33:18 +00:00
Matti Nannt 0534421538 chore: move wordpress in the docs navigation (#1879) 2024-01-10 16:27:58 +00:00
Matti Nannt fa33460a16 chore: update npm dependencies (#1870) 2024-01-10 11:41:09 +00:00
Anshuman Pandey f12dec7b8b fix: date picker overflow UI (#1872)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-10 10:53:07 +00:00
Shubham Palriwala f2ad7c4fbf docs: overwriting css styles (#1874)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-10 10:52:44 +00:00
Matti Nannt e6ce5373a2 chore: migrate to new Vercel speed insights package (#1876) 2024-01-10 10:43:03 +00:00
Johannes 90f0614aac docs: wordpress setup guide (#1873) 2024-01-10 10:35:42 +00:00
Matti Nannt a0d7921c01 fix: get response count in analysis layout more efficiently (#1875) 2024-01-10 09:45:49 +00:00
Dhruwang Jariwala a1fa3d6dbb chore: server side pagination for responses (#1869)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-10 08:42:40 +00:00
Dhruwang Jariwala 1d7d07b3c6 fix: avoid scaling on mobile preview (#1868) 2024-01-09 14:59:43 +00:00
Dhruwang Jariwala c376b12461 fix: unrespoonsive welcome card editor (#1867) 2024-01-09 14:16:57 +00:00
Dima Ivashchuk c5d9f63267 docs: Add Lost Pixel to open source friends (#1860) 2024-01-09 13:59:45 +00:00
Shubham Palriwala 9ec5d668df fix: replace hardcoded js versions with dynamic fetching (#1856) 2024-01-09 10:13:28 +00:00
Johannes 659ef3f92c fix: linked to http instead of https (#1865) 2024-01-08 21:04:58 +00:00
Johannes 3e2452b10f fix: seo issues to improve site health (#1864) 2024-01-08 20:30:15 +00:00
Dhruwang Jariwala 1f79416367 fix: github linting warnings (#1852)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-08 12:36:20 +00:00
Anshuman Pandey d3e0e67bd9 feat: api key auth for private files (#1861)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-01-08 12:33:58 +00:00
Anshuman Pandey abe98be561 feat: adds e2e test for invite functionality (#1846) 2024-01-08 12:04:25 +00:00
Dhruwang Jariwala f23b4f63fa chore: lint warnings in web (#1854) 2024-01-08 12:00:00 +00:00
Marc Klingen 5679c38029 docs: add Langfuse to OSS friends (#1859) 2024-01-06 22:30:09 +00:00
Johannes a815270784 fix: make env id more easily discoverable (#1858) 2024-01-05 20:53:23 +00:00
Olasunkanmi Balogun 2d97e9c797 docs: Add best hotjar alt 2024 (#1843)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-05 20:26:40 +00:00
Dhruwang Jariwala 5c90862137 fix: unblock completed response (#1857) 2024-01-05 18:09:23 +00:00
Nya Candy 206926a0a9 fix: docker compose upload volume mapping (#1822)
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
2024-01-05 08:38:59 +00:00
Johannes 4e0fe7e6fb fix: update logic jump error message for clarity (#1855) 2024-01-04 23:10:31 +00:00
Greg Bergé 9230ce558f docs: add Argos to OSS friends (#1847)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-01-04 17:04:12 +00:00
Matti Nannt 78d8a0604f chore: update npm dependencies, update version numbers (#1853) 2024-01-04 14:08:10 +00:00
Anjy Gupta e05cfaba5f feat: added survey response sharing feature (#1469)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-01-03 15:33:52 +00:00
Dhruwang Jariwala 0d74921233 fix: reload Verify email page (#1851)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-03 14:23:57 +00:00
Dhruwang Jariwala 60c7713aa0 feat: automatic next button label updation (#1848)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-03 14:11:06 +00:00
Zayd Krunz c62f041819 style: Basic refactoring, a little tooltip fix, and some small language changes (#1850)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-01-03 10:30:14 +00:00
Zayd Krunz 7782196822 fix: Update webhook test endpoint to conform to standard webhooks (#1849) 2024-01-03 10:24:29 +00:00
Zayd Krunz f964319ddb style: Fix typo in docs (#1842) 2024-01-02 11:57:56 +00:00
Anshuman Pandey e0c17407e3 fix: ignore NEXT_NOT_FOUND error on sentry (#1837) 2024-01-02 11:42:47 +00:00
Dhruwang Jariwala 7f25bbc008 feat: adds confirm password field to password reset (#1845) 2024-01-02 11:40:55 +00:00
Johannes ae530d710b fix: tweak above the fold wording (#1839) 2023-12-29 00:46:10 +00:00
Dhruwang Jariwala 08bdc7208e fix: updated cleanHtml script (#1836) 2023-12-29 00:26:27 +00:00
Dhruwang Jariwala 224ba2ea22 fix: delayed survey saving (#1838) 2023-12-29 00:10:19 +00:00
Johannes 8a4ceae38c fix: object fit for logo on welcome card (#1835)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2023-12-28 06:43:28 +00:00
Dhruwang Jariwala d91e1cc7ea fix: background image issue (#1829)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2023-12-28 01:27:24 +00:00
Johannes 8896cbcd87 fix: tweak rating UI after fix (#1834) 2023-12-27 18:57:17 +00:00
Dhruwang Jariwala 5e1822c9e6 fix: rating question alignment (#1833) 2023-12-27 18:06:37 +00:00
Elie Steinbock 1b69560e50 docs: Add Inbox Zero as an OSS friend (#1615)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2023-12-27 02:41:14 +00:00
Dhruwang Jariwala b28a4e72d8 fix: logic jump issues (#1830) 2023-12-27 02:29:29 +00:00
Sushant 8694c371af fix: make template page keyboard accessible (#1828) 2023-12-26 01:57:42 +00:00
Dhruwang Jariwala 359da760f7 fix: scaling issues (#1825)
Co-authored-by: review-agent-prime[bot] <147289438+review-agent-prime[bot]@users.noreply.github.com>
2023-12-24 12:43:49 +00:00
Matti Nannt 044080fee9 chore: increase batch size of weekly summary team calls (#1827) 2023-12-23 18:49:14 +00:00
Olasunkanmi Balogun 8a7d498a26 chore: add feeback app contest article (#1818)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2023-12-22 22:20:27 +00:00
Johannes 82f916d86b fix: PIN survey caused faulty layout due to background (#1826) 2023-12-22 21:39:16 +00:00
Shubham Palriwala 6ac48a26bb fix: revalidate invite cache even if email delivery fails (#1823) 2023-12-22 12:30:40 +00:00
Shubham Palriwala ab22c0297e feat: role management is only allowed on paid inAppSurveys plan (#1824) 2023-12-22 12:30:03 +00:00
Dhruwang Jariwala 1ce02edc1b fix: other option (#1821) 2023-12-22 11:59:34 +00:00
Matti Nannt d36de1e54f fix: remove comments in env files (#1817) 2023-12-21 15:39:30 +00:00
Matti Nannt 15c91b798d chore: add user properties to posthog integration (#1814) 2023-12-21 13:58:55 +00:00
1293 changed files with 66016 additions and 30709 deletions
-8
View File
@@ -1,8 +0,0 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
+1
View File
@@ -22,6 +22,7 @@
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cp .env.example .env && sed -i '/^ENCRYPTION_KEY=/c\\ENCRYPTION_KEY='$(openssl rand -hex 32) .env && sed -i '/^NEXTAUTH_SECRET=/c\\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env && pnpm install && pnpm db:migrate:dev", "postCreateCommand": "cp .env.example .env && sed -i '/^ENCRYPTION_KEY=/c\\ENCRYPTION_KEY='$(openssl rand -hex 32) .env && sed -i '/^NEXTAUTH_SECRET=/c\\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env && pnpm install && pnpm db:migrate:dev",
"postAttachCommand": "pnpm dev --filter=web... --filter=demo...",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node" "remoteUser": "node"
+1 -1
View File
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies # dependencies
**/node_modules # **/node_modules
.pnp .pnp
.pnp.js .pnp.js
.pnpm-store/ .pnpm-store/
+51 -10
View File
@@ -1,9 +1,7 @@
/*
######################################################################## ########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------# # ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------ #
######################################################################## ########################################################################
############ ############
# BASICS # # BASICS #
############ ############
@@ -52,13 +50,28 @@ SMTP_SECURE_ENABLED=0
SMTP_USER=smtpUser SMTP_USER=smtpUser
SMTP_PASSWORD=smtpPassword SMTP_PASSWORD=smtpPassword
######################################################################## ########################################################################
# ------------------------------ OPTIONAL -----------------------------# # ------------------------------ OPTIONAL -----------------------------#
######################################################################## ########################################################################
# Uncomment the variables you would like to use and customize the values. # Uncomment the variables you would like to use and customize the values.
# Custom local storage path for file uploads
#UPLOADS_DIR=
##############
# S3 STORAGE #
##############
# S3 Storage is required for the file upload in serverless environments like Vercel
S3_ACCESS_KEY=
S3_SECRET_KEY=
S3_REGION=
S3_BUCKET_NAME=
# Configure a third party S3 compatible storage service endpoint like StorJ leave empty if you use Amazon S3
# e.g., https://gateway.storjshare.io
S3_ENDPOINT_URL=
##################### #####################
# Disable Features # # Disable Features #
##################### #####################
@@ -72,6 +85,9 @@ PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account. # Signup. Disable the ability for new users to create an account.
# SIGNUP_DISABLED=1 # SIGNUP_DISABLED=1
# Email login. Disable the ability for users to login with email.
# EMAIL_AUTH_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account. # Team Invite. Disable the ability for invited users to create an account.
# INVITE_DISABLED=1 # INVITE_DISABLED=1
@@ -85,21 +101,25 @@ TERMS_URL=
IMPRINT_URL= IMPRINT_URL=
# Configure Github Login # Configure Github Login
GITHUB_AUTH_ENABLED=0
GITHUB_ID= GITHUB_ID=
GITHUB_SECRET= GITHUB_SECRET=
# Configure Google Login # Configure Google Login
GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID= GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET= GOOGLE_CLIENT_SECRET=
# Configure Azure Active Directory Login # Configure Azure Active Directory Login
AZUREAD_AUTH_ENABLED=0
AZUREAD_CLIENT_ID= AZUREAD_CLIENT_ID=
AZUREAD_CLIENT_SECRET= AZUREAD_CLIENT_SECRET=
AZUREAD_TENANT_ID= AZUREAD_TENANT_ID=
# OpenID Connect (OIDC) configuration
# OIDC_CLIENT_ID=
# OIDC_CLIENT_SECRET=
# OIDC_ISSUER=
# OIDC_DISPLAY_NAME=
# OIDC_SIGNING_ALGORITHM=
# Cron Secret # Cron Secret
CRON_SECRET= CRON_SECRET=
@@ -119,14 +139,18 @@ NEXT_PUBLIC_FORMBRICKS_API_HOST=
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID= NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID= NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
# Oauth credentials for Google sheet integration # Oauth credentials for Google sheet integration
GOOGLE_SHEETS_CLIENT_ID= GOOGLE_SHEETS_CLIENT_ID=
GOOGLE_SHEETS_CLIENT_SECRET= GOOGLE_SHEETS_CLIENT_SECRET=
GOOGLE_SHEETS_REDIRECT_URL= GOOGLE_SHEETS_REDIRECT_URL=
# Oauth credentials for Airtable integration # Oauth credentials for Airtable integration
AIRTABLE_CLIENT_ID= AIRTABLE_CLIENT_ID=
# Oauth credentials for Slack integration
SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
# Enterprise License Key # Enterprise License Key
ENTERPRISE_LICENSE_KEY= ENTERPRISE_LICENSE_KEY=
@@ -139,4 +163,21 @@ ENTERPRISE_LICENSE_KEY=
# set to 1 to skip onboarding for new users # set to 1 to skip onboarding for new users
# ONBOARDING_DISABLED=1 # ONBOARDING_DISABLED=1
*/ # Send new users to customer.io
# CUSTOMER_IO_API_KEY=
# CUSTOMER_IO_SITE_ID=
# Ignore Rate Limiting across the Formbricks app
# RATE_LIMITING_DISABLED=1
# OpenTelemetry URL for tracing
# OPENTELEMETRY_LISTENER_URL=http://localhost:4318/v1/traces
# Unsplash API Key
UNSPLASH_ACCESS_KEY=
# The below is used for Next Caching (uses In-Memory from Next Cache if not provided)
# REDIS_URL:
# The below is used for Rate Limiting (uses In-Memory LRU Cache if not provided) (You can use a service like Webdis for this)
# REDIS_HTTP_URL:
+2 -3
View File
@@ -42,7 +42,6 @@ body:
- First time: Please read our [introductory blog post](https://formbricks.com/blog/join-the-formtribe) - First time: Please read our [introductory blog post](https://formbricks.com/blog/join-the-formtribe)
- All UI components are in the package `formbricks/ui` - All UI components are in the package `formbricks/ui`
- Run `pnpm go` to find a demo app to test in-app surveys at `localhost:3002` - Run `pnpm go` to find a demo app to test in-app surveys at `localhost:3002`
- Everything is type-safe - Everything is type-safe.
- We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right - We use **chatGPT** to help refactor code.
context before you write your prompt.
- Anything unclear? [Ask in Discord](https://formbricks.com/discord) - Anything unclear? [Ask in Discord](https://formbricks.com/discord)
+3 -13
View File
@@ -1,3 +1,5 @@
<!-- We require pull request titles to follow the Conventional Commits specification ( https://www.conventionalcommits.org/en/v1.0.0/#summary ). Please make sure your title follow these conventions -->
## What does this PR do? ## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
@@ -8,18 +10,6 @@ Fixes # (issue)
Loom Video: https://www.loom.com/ Loom Video: https://www.loom.com/
--> -->
## Type of change
<!-- Please mark the relevant points by using [x] -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] Enhancement (small improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change adds a new database migration
- [ ] This change requires a documentation update
## How should this be tested? ## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
@@ -42,7 +32,7 @@ Fixes # (issue)
- [ ] Removed all `console.logs` - [ ] Removed all `console.logs`
- [ ] Merged the latest changes from main onto my branch with `git pull origin main` - [ ] Merged the latest changes from main onto my branch with `git pull origin main`
- [ ] My changes don't cause any responsiveness issues - [ ] My changes don't cause any responsiveness issues
- [ ] First PR at Formbricks? [Please sign the CLA!](https://formbricks.com/clmyhzfrymr4ko00hycsg1tvx) Without it we wont be able to merge it 🙏 - [ ] First PR at Formbricks? [Please sign the CLA!](https://cla-assistant.io/formbricks/formbricks) Without it we wont be able to merge it 🙏
### Appreciated ### Appreciated
@@ -0,0 +1,55 @@
name: Build & Cache Web App
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Cache Build
uses: actions/cache@v3
id: cache-build
env:
cache-name: prod-build
key-1: ${{ hashFiles('pnpm-lock.yaml') }}
key-2: ${{ hashFiles('apps/**/**.[jt]s', 'apps/**/**.[jt]sx', 'packages/**/**.[jt]s', 'packages/**/**.[jt]sx', '!**/node_modules') }}
with:
path: |
${{ github.workspace }}/apps/web/.next
**/.turbo/**
**/dist/**
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Install pnpm
uses: pnpm/action-setup@v2
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
if: steps.cache-build.outputs.cache-hit != 'true'
shell: bash
- name: create .env
run: cp .env.example .env
shell: bash
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
echo "ENTERPRISE_LICENSE_KEY=$SECRET" >> $GITHUB_ENV
shell: bash
- run: |
pnpm build --filter=web...
if: steps.cache-build.outputs.cache-hit != 'true'
shell: bash
@@ -0,0 +1,10 @@
name: Dangerous git Checkout
description: "Git Checkout from PR code so we can run checks from forks"
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
+3 -3
View File
@@ -1,4 +1,4 @@
name: Build name: Build formbricks-com
on: on:
workflow_call: workflow_call:
jobs: jobs:
@@ -11,10 +11,10 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup Node.js 18.x - name: Setup Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18.x node-version: 20.x
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
+6 -6
View File
@@ -1,4 +1,4 @@
name: Build name: Build web
on: on:
workflow_call: workflow_call:
jobs: jobs:
@@ -8,13 +8,13 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Checkout repo - uses: actions/checkout@v3
uses: actions/checkout@v3 - uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x - name: Setup Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18.x node-version: 20.x
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
@@ -25,7 +25,7 @@ jobs:
- name: create .env - name: create .env
run: cp .env.example .env run: cp .env.example .env
- name: Generate Random NEXTAUTH_SECRET - name: Generate Random ENCRYPTION_KEY
run: | run: |
SECRET=$(openssl rand -hex 32) SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
@@ -1,11 +1,12 @@
name: Cron - reportUsageToStripe name: Cron - Report usage to Stripe
on: on:
workflow_dispatch:
# "Scheduled workflows run on the latest commit on the default or base branch." # "Scheduled workflows run on the latest commit on the default or base branch."
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule # — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
schedule: # schedule:
# This will run the job at 22:00 UTC every day of every month. # This will run the job at 20:00 UTC every day of every month.
- cron: "0 22 * * *" # - cron: "0 20 * * *"
jobs: jobs:
cron-reportUsageToStripe: cron-reportUsageToStripe:
env: env:
@@ -1,11 +1,12 @@
name: Cron - closeOnDate name: Cron - Survey status update
on: on:
workflow_dispatch:
# "Scheduled workflows run on the latest commit on the default or base branch." # "Scheduled workflows run on the latest commit on the default or base branch."
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule # — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
schedule: # schedule:
# Runs “At 00:00.” (see https://crontab.guru) # Runs “At 00:00.” (see https://crontab.guru)
- cron: "0 0 * * *" # - cron: "0 0 * * *"
jobs: jobs:
cron-weeklySummary: cron-weeklySummary:
env: env:
@@ -16,7 +17,7 @@ jobs:
- name: cURL request - name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }} if: ${{ env.APP_URL && env.CRON_SECRET }}
run: | run: |
curl ${{ env.APP_URL }}/api/cron/close_surveys \ curl ${{ env.APP_URL }}/api/cron/survey-status \
-X POST \ -X POST \
-H 'content-type: application/json' \ -H 'content-type: application/json' \
-H 'x-api-key: ${{ env.CRON_SECRET }}' \ -H 'x-api-key: ${{ env.CRON_SECRET }}' \
+6 -5
View File
@@ -1,11 +1,12 @@
name: Cron - weeklySummary name: Cron - Weekly summary
on: on:
workflow_dispatch:
# "Scheduled workflows run on the latest commit on the default or base branch." # "Scheduled workflows run on the latest commit on the default or base branch."
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule # — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
schedule: # schedule:
# Runs “At 08:00 on Monday.” (see https://crontab.guru) # Runs “At 08:00 on Monday.” (see https://crontab.guru)
- cron: "0 8 * * 1" # - cron: "0 8 * * 1"
jobs: jobs:
cron-weeklySummary: cron-weeklySummary:
env: env:
@@ -16,7 +17,7 @@ jobs:
- name: cURL request - name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }} if: ${{ env.APP_URL && env.CRON_SECRET }}
run: | run: |
curl ${{ env.APP_URL }}/api/cron/weekly_summary \ curl ${{ env.APP_URL }}/api/cron/weekly-summary \
-X POST \ -X POST \
-H 'content-type: application/json' \ -H 'content-type: application/json' \
-H 'x-api-key: ${{ env.CRON_SECRET }}' \ -H 'x-api-key: ${{ env.CRON_SECRET }}' \
+75
View File
@@ -0,0 +1,75 @@
name: E2E Tests
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: Run E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Build & Cache Web Binaries
uses: ./.github/actions/cache-build-web
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Install dependencies
run: pnpm install
- name: Start PostgreSQL
run: |
cd packages/database && pnpm db:up &
for attempt in {1..20}; do
if nc -zv localhost 5432; then
echo "Ready"
break
fi
echo "Waiting..."
sleep 5
done
pnpm db:migrate:dev
- name: Serve packages for lazy loading
run: |
cd packages/surveys && pnpm serve &
- name: Run App
run: |
NODE_ENV=test pnpm start --filter=web &
for attempt in {1..20}; do
if [ $(curl -o /dev/null -s -w "%{http_code}" http://localhost:3000/health) -eq 200 ]; then
echo "Ready"
break
fi
echo "Waiting..."
sleep 10
done
- name: Test Serve endpoints
run: |
curl -s http://localhost:3003
- name: Cache Playwright
uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps
- name: Run E2E Tests
run: |
pnpm test:e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
+131
View File
@@ -0,0 +1,131 @@
name: Kamal Deploy
concurrency:
group: deploy-to-kamal
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches:
- main
jobs:
Deploy:
runs-on: ubuntu-latest
environment: production
env:
DOCKER_BUILDKIT: 1
IS_FORMBRICKS_CLOUD: ${{ vars.IS_FORMBRICKS_CLOUD }}
WEBAPP_URL: ${{ vars.WEBAPP_URL }}
MIGRATE_DATABASE_URL: ${{ secrets.MIGRATE_DATABASE_URL }}
NEXTAUTH_URL: ${{ vars.NEXTAUTH_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
SHORT_URL_BASE: ${{ vars.SHORT_URL_BASE }}
MAIL_FROM: ${{ secrets.MAIL_FROM }}
SMTP_HOST: ${{ secrets.SMTP_HOST }}
SMTP_PORT: ${{ secrets.SMTP_PORT }}
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
PRIVACY_URL: ${{ vars.PRIVACY_URL }}
TERMS_URL: ${{ vars.TERMS_URL }}
IMPRINT_URL: ${{ vars.IMPRINT_URL }}
GITHUB_ID: ${{ secrets.FB_GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.FB_GITHUB_SECRET }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
AZUREAD_CLIENT_ID: ${{ secrets.AZUREAD_CLIENT_ID }}
AZUREAD_CLIENT_SECRET: ${{ secrets.AZUREAD_CLIENT_SECRET }}
AZUREAD_TENANT_ID: ${{ secrets.AZUREAD_TENANT_ID }}
OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
OIDC_ISSUER: ${{ secrets.OIDC_ISSUER }}
OIDC_DISPLAY_NAME: ${{ secrets.OIDC_DISPLAY_NAME }}
OIDC_SIGNING_ALGORITHM: ${{ secrets.OIDC_SIGNING_ALGORITHM }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
ASSET_PREFIX_URL: ${{ vars.ASSET_PREFIX_URL }}
NOTION_OAUTH_CLIENT_ID: ${{ secrets.NOTION_OAUTH_CLIENT_ID }}
NOTION_OAUTH_CLIENT_SECRET: ${{ secrets.NOTION_OAUTH_CLIENT_SECRET }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
GOOGLE_SHEETS_CLIENT_ID: ${{ secrets.GOOGLE_SHEETS_CLIENT_ID }}
GOOGLE_SHEETS_CLIENT_SECRET: ${{ secrets.GOOGLE_SHEETS_CLIENT_SECRET }}
GOOGLE_SHEETS_REDIRECT_URL: ${{ secrets.GOOGLE_SHEETS_REDIRECT_URL }}
AIRTABLE_CLIENT_ID: ${{ secrets.AIRTABLE_CLIENT_ID }}
ENTERPRISE_LICENSE_KEY: ${{ secrets.ENTERPRISE_LICENSE_KEY }}
DEFAULT_TEAM_ID: ${{ vars.DEFAULT_TEAM_ID }}
ONBOARDING_DISABLED: ${{ vars.ONBOARDING_DISABLED }}
CUSTOMER_IO_API_KEY: ${{ secrets.CUSTOMER_IO_API_KEY }}
CUSTOMER_IO_SITE_ID: ${{ secrets.CUSTOMER_IO_SITE_ID }}
NEXT_PUBLIC_POSTHOG_API_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_API_KEY }}
NEXT_PUBLIC_POSTHOG_API_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_API_HOST: ${{ vars.NEXT_PUBLIC_FORMBRICKS_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID }}
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID }}
NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NODE_ENV: production
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_DNS_API_TOKEN: ${{ secrets.CLOUDFLARE_DNS_API_TOKEN }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_REGION: ${{ vars.S3_REGION }}
S3_BUCKET_NAME: ${{ vars.S3_BUCKET_NAME }}
OPENTELEMETRY_LISTENER_URL: ${{ vars.OPENTELEMETRY_LISTENER_URL }}
RATE_LIMITING_DISABLED: ${{ vars.RATE_LIMITING_DISABLED }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_NAME: ${{ secrets.DB_NAME }}
REDIS_URL: ${{ secrets.REDIS_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- name: Install dependencies
run: |
gem install kamal
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Create builder
run: docker buildx create --use --name formbricks-gh-actions-builder
if: steps.buildx.outputs.should_create_builder == 'true'
- name: Push env variables to Kamal
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
kamal env push
- name: Run deploy command
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
set +e
DEPLOY_OUTPUT=$(kamal deploy 2>&1)
DEPLOY_EXIT_CODE=$?
echo "$DEPLOY_OUTPUT"
if [[ "$DEPLOY_OUTPUT" == *"container not unhealthy (healthy)"* ]]; then
echo "Deployment reported healthy container. Considering as success."
kamal lock release
exit 0
else
exit $DEPLOY_EXIT_CODE
fi
shell: bash
+128
View File
@@ -0,0 +1,128 @@
name: Kamal Setup
concurrency:
group: setup-kamal
cancel-in-progress: false
on:
workflow_dispatch: # Only to be triggered when accessories are updated
jobs:
Setup:
runs-on: ubuntu-latest
environment: production
env:
DOCKER_BUILDKIT: 1
IS_FORMBRICKS_CLOUD: ${{ vars.IS_FORMBRICKS_CLOUD }}
WEBAPP_URL: ${{ vars.WEBAPP_URL }}
NEXTAUTH_URL: ${{ vars.NEXTAUTH_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
MIGRATE_DATABASE_URL: ${{ secrets.MIGRATE_DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
SHORT_URL_BASE: ${{ vars.SHORT_URL_BASE }}
MAIL_FROM: ${{ secrets.MAIL_FROM }}
SMTP_HOST: ${{ secrets.SMTP_HOST }}
SMTP_PORT: ${{ secrets.SMTP_PORT }}
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
PRIVACY_URL: ${{ vars.PRIVACY_URL }}
TERMS_URL: ${{ vars.TERMS_URL }}
IMPRINT_URL: ${{ vars.IMPRINT_URL }}
GITHUB_ID: ${{ secrets.FB_GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.FB_GITHUB_SECRET }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
AZUREAD_CLIENT_ID: ${{ secrets.AZUREAD_CLIENT_ID }}
AZUREAD_CLIENT_SECRET: ${{ secrets.AZUREAD_CLIENT_SECRET }}
AZUREAD_TENANT_ID: ${{ secrets.AZUREAD_TENANT_ID }}
OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
OIDC_ISSUER: ${{ secrets.OIDC_ISSUER }}
OIDC_DISPLAY_NAME: ${{ secrets.OIDC_DISPLAY_NAME }}
OIDC_SIGNING_ALGORITHM: ${{ secrets.OIDC_SIGNING_ALGORITHM }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
ASSET_PREFIX_URL: ${{ vars.ASSET_PREFIX_URL }}
NOTION_OAUTH_CLIENT_ID: ${{ secrets.NOTION_OAUTH_CLIENT_ID }}
NOTION_OAUTH_CLIENT_SECRET: ${{ secrets.NOTION_OAUTH_CLIENT_SECRET }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
GOOGLE_SHEETS_CLIENT_ID: ${{ secrets.GOOGLE_SHEETS_CLIENT_ID }}
GOOGLE_SHEETS_CLIENT_SECRET: ${{ secrets.GOOGLE_SHEETS_CLIENT_SECRET }}
GOOGLE_SHEETS_REDIRECT_URL: ${{ secrets.GOOGLE_SHEETS_REDIRECT_URL }}
AIRTABLE_CLIENT_ID: ${{ secrets.AIRTABLE_CLIENT_ID }}
ENTERPRISE_LICENSE_KEY: ${{ secrets.ENTERPRISE_LICENSE_KEY }}
DEFAULT_TEAM_ID: ${{ vars.DEFAULT_TEAM_ID }}
ONBOARDING_DISABLED: ${{ vars.ONBOARDING_DISABLED }}
CUSTOMER_IO_API_KEY: ${{ secrets.CUSTOMER_IO_API_KEY }}
CUSTOMER_IO_SITE_ID: ${{ secrets.CUSTOMER_IO_SITE_ID }}
NEXT_PUBLIC_POSTHOG_API_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_API_KEY }}
NEXT_PUBLIC_POSTHOG_API_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_API_HOST: ${{ vars.NEXT_PUBLIC_FORMBRICKS_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID }}
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID }}
NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NODE_ENV: production
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_DNS_API_TOKEN: ${{ secrets.CLOUDFLARE_DNS_API_TOKEN }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_REGION: ${{ vars.S3_REGION }}
S3_BUCKET_NAME: ${{ vars.S3_BUCKET_NAME }}
OPENTELEMETRY_LISTENER_URL: ${{ vars.OPENTELEMETRY_LISTENER_URL }}
RATE_LIMITING_DISABLED: ${{ vars.RATE_LIMITING_DISABLED }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_NAME: ${{ secrets.DB_NAME }}
REDIS_URL: ${{ secrets.REDIS_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- name: Install dependencies
run: |
gem install kamal
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Create builder
run: docker buildx create --use --name formbricks-gh-actions-builder
if: steps.buildx.outputs.should_create_builder == 'true'
- name: Push env variables to Kamal
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
kamal env push
- name: Run setup command
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
set +e
DEPLOY_OUTPUT=$(kamal setup 2>&1)
DEPLOY_EXIT_CODE=$?
echo "$DEPLOY_OUTPUT"
if [[ "$DEPLOY_OUTPUT" == *"container not unhealthy (healthy)"* ]]; then
echo "Deployment reported healthy container. Considering as success."
kamal lock release
exit 0
else
exit $DEPLOY_EXIT_CODE
fi
shell: bash
+2 -2
View File
@@ -8,8 +8,8 @@ jobs:
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout repo - uses: actions/checkout@v3
uses: actions/checkout@v3 - uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x - name: Setup Node.js 18.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
-40
View File
@@ -1,40 +0,0 @@
name: E2E Tests
on:
workflow_call:
jobs:
build:
name: Run E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Docker Compose
run: sudo apt-get update && sudo apt-get install -y docker-compose
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Build Formricks JS package
run: pnpm build --filter=js
- name: Build Formbricks Image & Run
run: docker-compose up -d
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm test:e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
+29 -3
View File
@@ -1,7 +1,7 @@
name: PR Update name: PR Update
on: on:
pull_request_target: pull_request:
branches: branches:
- main - main
merge_group: merge_group:
@@ -12,27 +12,53 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
has-files-requiring-all-checks:
- "!(**.md|.github/CODEOWNERS)"
test: test:
name: Run Tests name: Run Unit Tests
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/test.yml uses: ./.github/workflows/test.yml
secrets: inherit secrets: inherit
lint: lint:
name: Run Linters name: Run Linters
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/lint.yml uses: ./.github/workflows/lint.yml
secrets: inherit secrets: inherit
build: build:
name: Build Formbricks-web name: Build Formbricks-web
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/build-web.yml uses: ./.github/workflows/build-web.yml
secrets: inherit secrets: inherit
e2e-test: e2e-test:
name: Run E2E Tests name: Run E2E Tests
uses: ./.github/workflows/playwright.yml needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e.yml
secrets: inherit secrets: inherit
required: required:
name: PR Check Summary
needs: [lint, test, build, e2e-test] needs: [lint, test, build, e2e-test]
if: always() if: always()
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -0,0 +1,70 @@
name: Docker for Data Migrations
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
workflow_dispatch:
push:
tags:
- "v*"
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
IMAGE_NAME: formbricks/data-migrations
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public"
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: "v2.1.1"
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=raw,value=${{ github.ref_name }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./packages/database/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DATABASE_URL=${{ env.DATABASE_URL }}
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
run: |
cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
+7 -27
View File
@@ -31,19 +31,12 @@ jobs:
id-token: write id-token: write
steps: steps:
- name: Generate Random NEXTAUTH_SECRET
run: |
SECRET=$(openssl rand -hex 32)
echo "NEXTAUTH_SECRET=$SECRET" >> $GITHUB_ENV
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Depot CLI
uses: depot/setup-action@v1
# Install the cosign tool except on PR # Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer # https://github.com/sigstore/cosign-installer
- name: Install cosign - name: Install cosign
@@ -52,17 +45,6 @@ jobs:
with: with:
cosign-release: "v2.1.1" cosign-release: "v2.1.1"
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # v3.0.0
# Login against a Docker registry except on PR # Login against a Docker registry except on PR
# https://github.com/docker/login-action # https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }} - name: Log into registry ${{ env.REGISTRY }}
@@ -85,20 +67,18 @@ jobs:
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@v5 # v5.0.0 uses: depot/build-push-action@v1
with: with:
project: tw0fqmsx3c
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
context: . context: .
file: ./apps/web/Dockerfile file: ./apps/web/Dockerfile
# platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
build-args: |
NEXTAUTH_SECRET=${{ env.NEXTAUTH_SECRET }}
DATABASE_URL=${{ env.DATABASE_URL }}
ENCRYPTION_KEY=${{ env.ENCRYPTION_KEY }}
# Sign the resulting Docker image digest except on PRs. # Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker # This will only write to the public Rekor transparency log when the Docker
-14
View File
@@ -14,16 +14,6 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/formbricks?schema=public" DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/formbricks?schema=public"
steps: steps:
- name: Generate Random NEXTAUTH_SECRET
run: |
SECRET=$(openssl rand -hex 32)
echo "NEXTAUTH_SECRET=$SECRET" >> $GITHUB_ENV
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -52,7 +42,3 @@ jobs:
tags: | tags: |
${{ secrets.DOCKER_USERNAME }}/formbricks:${{ env.RELEASE_TAG }} ${{ secrets.DOCKER_USERNAME }}/formbricks:${{ env.RELEASE_TAG }}
${{ secrets.DOCKER_USERNAME }}/formbricks:latest ${{ secrets.DOCKER_USERNAME }}/formbricks:latest
build-args: |
NEXTAUTH_SECRET=${{ env.NEXTAUTH_SECRET }}
DATABASE_URL=${{ env.DATABASE_URL }}
ENCRYPTION_KEY=${{ env.ENCRYPTION_KEY }}
+5 -12
View File
@@ -3,22 +3,18 @@ on:
workflow_call: workflow_call:
jobs: jobs:
build: build:
name: Tests name: Unit Tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps: steps:
- name: Checkout repo - uses: actions/checkout@v3
uses: actions/checkout@v3 - uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x - name: Setup Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18.x node-version: 20.x
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
@@ -34,8 +30,5 @@ jobs:
SECRET=$(openssl rand -hex 32) SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Build formbricks-js dependencies
run: pnpm build --filter=js
- name: Test - name: Test
run: pnpm test run: pnpm test
+7
View File
@@ -51,3 +51,10 @@ Zone.Identifier
/playwright-report/ /playwright-report/
/blob-report/ /blob-report/
/playwright/.cache/ /playwright/.cache/
# uploads
packages/lib/uploads
# Vite Timestamps
vite.config.*.timestamp-*
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# A sample post-deploy hook
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME
echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
echo "Rebooted Traefik on $KAMAL_HOSTS"
+51
View File
@@ -0,0 +1,51 @@
#!/bin/sh
# A sample pre-build hook
#
# Checks:
# 1. We have a clean checkout
# 2. A remote is configured
# 3. The branch has been pushed to the remote
# 4. The version we are deploying matches the remote
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
if [ -n "$(git status --porcelain)" ]; then
echo "Git checkout is not clean, aborting..." >&2
git status --porcelain >&2
exit 1
fi
first_remote=$(git remote)
if [ -z "$first_remote" ]; then
echo "No git remote set, aborting..." >&2
exit 1
fi
current_branch=$(git branch --show-current)
if [ -z "$current_branch" ]; then
echo "Not on a git branch, aborting..." >&2
exit 1
fi
remote_head=$(git ls-remote $first_remote --tags $current_branch | cut -f1)
if [ -z "$remote_head" ]; then
echo "Branch not pushed to remote, aborting..." >&2
exit 1
fi
if [ "$KAMAL_VERSION" != "$remote_head" ]; then
echo "Version ($KAMAL_VERSION) does not match remote HEAD ($remote_head), aborting..." >&2
exit 1
fi
exit 0
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env ruby
# A sample pre-connect check
#
# Warms DNS before connecting to hosts in parallel
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME
hosts = ENV["KAMAL_HOSTS"].split(",")
results = nil
max = 3
elapsed = Benchmark.realtime do
results = hosts.map do |host|
Thread.new do
tries = 1
begin
Socket.getaddrinfo(host, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)
rescue SocketError
if tries < max
puts "Retrying DNS warmup: #{host}"
tries += 1
sleep rand
retry
else
puts "DNS warmup failed: #{host}"
host
end
end
tries
end
end.map(&:value)
end
retries = results.sum - hosts.size
nopes = results.count { |r| r == max }
puts "Prewarmed %d DNS lookups in %.2f sec: %d retries, %d failures" % [ hosts.size, elapsed, retries, nopes ]
+109
View File
@@ -0,0 +1,109 @@
#!/usr/bin/env ruby
# A sample pre-deploy hook
#
# Checks the Github status of the build, waiting for a pending build to complete for up to 720 seconds.
#
# Fails unless the combined status is "success"
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_COMMAND
# KAMAL_SUBCOMMAND
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# Only check the build status for production deployments
if ENV["KAMAL_COMMAND"] == "rollback" || ENV["KAMAL_DESTINATION"] != "production"
exit 0
end
require "bundler/inline"
# true = install gems so this is fast on repeat invocations
gemfile(true, quiet: true) do
source "https://rubygems.org"
gem "octokit"
gem "faraday-retry"
end
MAX_ATTEMPTS = 72
ATTEMPTS_GAP = 10
def exit_with_error(message)
$stderr.puts message
exit 1
end
class GithubStatusChecks
attr_reader :remote_url, :git_sha, :github_client, :combined_status
def initialize
@remote_url = `git config --get remote.origin.url`.strip.delete_prefix("https://github.com/")
@git_sha = `git rev-parse HEAD`.strip
@github_client = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"])
refresh!
end
def refresh!
@combined_status = github_client.combined_status(remote_url, git_sha)
end
def state
combined_status[:state]
end
def first_status_url
first_status = combined_status[:statuses].find { |status| status[:state] == state }
first_status && first_status[:target_url]
end
def complete_count
combined_status[:statuses].count { |status| status[:state] != "pending"}
end
def total_count
combined_status[:statuses].count
end
def current_status
if total_count > 0
"Completed #{complete_count}/#{total_count} checks, see #{first_status_url} ..."
else
"Build not started..."
end
end
end
$stdout.sync = true
puts "Checking build status..."
attempts = 0
checks = GithubStatusChecks.new
begin
loop do
case checks.state
when "success"
puts "Checks passed, see #{checks.first_status_url}"
exit 0
when "failure"
exit_with_error "Checks failed, see #{checks.first_status_url}"
when "pending"
attempts += 1
end
exit_with_error "Checks are still pending, gave up after #{MAX_ATTEMPTS * ATTEMPTS_GAP} seconds" if attempts == MAX_ATTEMPTS
puts checks.current_status
sleep(ATTEMPTS_GAP)
checks.refresh!
end
rescue Octokit::NotFound
exit_with_error "Build status could not be found"
end
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
echo "Rebooting Traefik on $KAMAL_HOSTS..."
+67 -49
View File
@@ -1,50 +1,46 @@
<div id="top"></div> <div id="top"></div>
<p align="center"> <p align="center">
<a href="https://formbricks.com"> <a href="https://formbricks.com">
<img width="120" alt="Open Source Privacy First Experience Management Solution Qualtrics Alternative Logo" src="https://github.com/formbricks/formbricks/assets/72809645/0086704f-bee7-4d38-9cc8-fa42ee59e004"> <img width="120" alt="Open Source Privacy First Experience Management Solution Qualtrics Alternative Logo" src="https://github.com/formbricks/formbricks/assets/72809645/0086704f-bee7-4d38-9cc8-fa42ee59e004">
</a> </a>
<h3 align="center">Formbricks</h3> <h3 align="center">Formbricks</h3>
<p align="center"> <p align="center">
Harvest user-insights, build irresistible experiences. Harvest user-insights, build irresistible experiences.
<br /> <br />
<a href="https://formbricks.com/">Website</a> | <a href="https://formbricks.com/discord">Join Discord community</a> <a href="https://formbricks.com/">Website</a> | <a href="https://formbricks.com/discord">Join Discord community</a>
</p> </p>
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a> <a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a>
<a href="https://news.ycombinator.com/item?id=32303986"><img src="https://img.shields.io/badge/Hacker%20News-122-%23FF6600" alt="Hacker News"></a> <a href="https://news.ycombinator.com/item?id=32303986"><img src="https://img.shields.io/badge/Hacker%20News-122-%23FF6600" alt="Hacker News"></a>
<a href="[https://www.producthunt.com/products/formbricks](https://www.producthunt.com/posts/formbricks)"><img src="https://img.shields.io/badge/Product%20Hunt-455-orange?logo=producthunt&logoColor=%23fff" alt="Product Hunt"></a> <a href="[https://www.producthunt.com/products/formbricks](https://www.producthunt.com/posts/formbricks)"><img src="https://img.shields.io/badge/Product%20Hunt-455-orange?logo=producthunt&logoColor=%23fff" alt="Product Hunt"></a>
<a href="https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/"><img src="https://img.shields.io/badge/2023-blue?logo=github&label=Github%20Accelerator" alt="Github Accelerator"></a> <a href="https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/"><img src="https://img.shields.io/badge/2023-blue?logo=github&label=Github%20Accelerator" alt="Github Accelerator"></a>
<a href="https://github.com/formbricks/formbricks/issues?q=is:issue+is:open+label:%22%F0%9F%99%8B%F0%9F%8F%BB%E2%80%8D%E2%99%82%EF%B8%8Fhelp+wanted%22"><img src="https://img.shields.io/badge/Help%20Wanted-Contribute-blue"></a> <a href="https://github.com/formbricks/formbricks/issues?q=is:issue+is:open+label:%22%F0%9F%99%8B%F0%9F%8F%BB%E2%80%8D%E2%99%82%EF%B8%8Fhelp+wanted%22"><img src="https://img.shields.io/badge/Help%20Wanted-Contribute-blue"></a>
</p> </p>
<br/> <br/>
<div style="background-color:#f8fafc; border-radius:5px;"> <div style="background-color:#f8fafc; border-radius:5px;">
<p align="center"> <p align="center">
<i>Trusted by</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>Trusted by</i><br/>
<a href="https://flixbus.com"><img src="https://github.com/formbricks/formbricks/assets/72809645/d6c91d89-7633-4845-ae1e-03bbd2ce0946" height="35px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img width="867" alt="clients-hi-res" src="https://github.com/formbricks/formbricks/assets/72809645/924d3693-f66a-4063-bb31-6e5789a8175a">
<a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/1a8763cf-f47e-4960-90f6-334f6dc12a17#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/675065/59b1a4d4-25e4-4ef3-b0bf-4426446fbfd0#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/72e5e37b-8ef7-4340-b06e-f1d12a05330f#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://clovyr.io/"><img src="https://github.com/formbricks/formbricks/assets/675065/9291c8df-9aac-423a-a430-a9a581240075" height="20px"></a>
</p> </p>
<div> <div>
<p align="center"> <p align="center">
<a href="https://trendshift.io/repositories/2570" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2570" alt="Trendshift Badge for formbricks/formbricks" style="width: 250px; height: 55px;" width="250" height="55"/></a> <a href="https://trendshift.io/repositories/2570" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2570" alt="Trendshift Badge for formbricks/formbricks" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p> </p>
## ✨ About Formbricks ## ✨ About Formbricks
<img width="1527" alt="formbricks-sneak" src="https://github-production-user-asset-6210df.s3.amazonaws.com/675065/249441967-ccb89ea3-82b4-4bf2-8d2c-528721ec313b.png"> <img width="1527" alt="formbricks-sneak" src="https://github-production-user-asset-6210df.s3.amazonaws.com/675065/249441967-ccb89ea3-82b4-4bf2-8d2c-528721ec313b.png">
Formbricks provides a free and open source surveying platform. Gather feedback at every point in the user journey with beautiful in-app, website, link and email surveys. Build on top of Formbricks or leverage prebuilt data analysis capabilities. Formbricks provides a free and open source surveying platform. Gather feedback at every point in the user journey with beautiful in-app, website, link and email surveys. Build on top of Formbricks or leverage prebuilt data analysis capabilities.
@@ -70,11 +66,11 @@ Formbricks is both a free and open source survey platform - and a privacy-first
- [Contact](#contact-us) - [Contact](#contact-us)
- [License](#license)
- [Security](#security) - [Security](#security)
<a id="features"></a> - [License](#license)
<a id="features"></a>
### Features ### Features
@@ -108,26 +104,26 @@ Formbricks is both a free and open source survey platform - and a privacy-first
- 🧘‍♂️ [Zod](https://zod.dev/) - 🧘‍♂️ [Zod](https://zod.dev/)
<a id="getting-started"></a> - 🐛 [Vitest](https://vitest.dev/)
<a id="getting-started"></a>
## 🚀 Getting started ## 🚀 Getting started
We've got several options depending on your need to help you quickly get started with Formbricks. We've got several options depending on your need to help you quickly get started with Formbricks.
<a id="cloud-version"></a> <a id="cloud-version"></a>
### ☁️ Cloud Version ### ☁️ Cloud Version
Formbricks has a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. To get started, please visit [formbricks.com](https://app.formbricks.com/auth/signup). Formbricks has a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. To get started, please visit [formbricks.com](https://app.formbricks.com/auth/signup).
<a id="self-hosted-version"></a> <a id="self-hosted-version"></a>
### 🐳 Self-hosting Formbricks ### 🐳 Self-hosting Formbricks
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription. Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription.
(In the future we may develop additional features that aren't in the free Open-Source version).
If you opt for self-hosting Formbricks, here are a few options to consider: If you opt for self-hosting Formbricks, here are a few options to consider:
#### Docker #### Docker
@@ -142,11 +138,17 @@ You can deploy Formbricks on [Railway](https://railway.app) using the button bel
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/PPDzCd) [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/PPDzCd)
<a id="development"></a> ##### RepoCloud
### 👨‍💻 Development Or you can also deploy Formbricks on [RepoCloud](https://repocloud.io) using the button below.
#### Prerequisites [![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=254)
<a id="development"></a>
## 👨‍💻 Development
### Prerequisites
Here is what you need to be able to run Formbricks: Here is what you need to be able to run Formbricks:
@@ -156,11 +158,11 @@ Here is what you need to be able to run Formbricks:
- [Docker](https://www.docker.com/) - to run PostgreSQL and MailHog - [Docker](https://www.docker.com/) - to run PostgreSQL and MailHog
#### Local Setup ### Local Setup
To get started locally, we've got a [guide to help you](https://formbricks.com/docs/contributing/setup). To get started locally, we've got a [guide to help you](https://formbricks.com/docs/contributing/setup).
#### Gitpod Setup ### Gitpod Setup
1. Click the button below to open this project in Gitpod. 1. Click the button below to open this project in Gitpod.
@@ -168,7 +170,7 @@ To get started locally, we've got a [guide to help you](https://formbricks.com/d
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/formbricks/formbricks) [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/formbricks/formbricks)
<a id="contribution"></a> <a id="contribution"></a>
## ✍️ Contribution ## ✍️ Contribution
@@ -186,30 +188,46 @@ Please check out [our contribution guide](https://formbricks.com/docs/contributi
## All Thanks To Our Contributors ## All Thanks To Our Contributors
<a href="https://github.com/formbricks/formbricks/graphs/contributors"> <a href="https://github.com/formbricks/formbricks/graphs/contributors">
<img src="https://contrib.rocks/image?repo=formbricks/formbricks" /> <img src="https://contrib.rocks/image?repo=formbricks/formbricks" />
</a> </a>
<a id="contact-us"></a> <a id="contact-us"></a>
## 📆 Contact us ## 📆 Contact us
Let's have a chat about your survey needs and get you started. Let's have a chat about your survey needs and get you started.
<a href="https://cal.com/johannes/onboarding?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a> <a href="https://cal.com/johannes/onboarding?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a>
<a id="license"></a> <a id="license"></a>
## ⚖️ License <a id="security"></a>
Distributed under the AGPLv3 License. See [`LICENSE`](./LICENSE) for more information.
<a id="security"></a>
## 🔒 Security ## 🔒 Security
We take security very seriously. If you come across any security vulnerabilities, please disclose them by sending an email to security@formbricks.com. We appreciate your help in making our platform as secure as possible and are committed to working with you to resolve any issues quickly and efficiently. See [`SECURITY.md`](./SECURITY.md) for more information. We take security very seriously. If you come across any security vulnerabilities, please disclose them by sending an email to security@formbricks.com. We appreciate your help in making our platform as secure as possible and are committed to working with you to resolve any issues quickly and efficiently. See [`SECURITY.md`](./SECURITY.md) for more information.
<p align="right"><a href="#top">🔼 Back to top</a></p> <a id="license"></a>
## 👩‍⚖️ License
### The AGPL Formbricks Core
The Formbricks core application is licensed under the [AGPLv3 Open Source License](https://github.com/formbricks/formbricks/blob/main/LICENSE). The core application is fully functional and includes everything you need to design & run link surveys, website surveys and in-app surveys. You can use the software for free for personal and commercial use. You're also allowed to create and distribute modified versions as long as you document the changes you make incl. date. The AGPL license requires you to publish your modified version under the AGPLv3 license as well.
### The Enterprise Edition
Additional to the AGPL licensed Formbricks core, this repository contains code licensed under an Enterprise license. The [code](https://github.com/formbricks/formbricks/tree/main/packages/ee) and [license](https://github.com/formbricks/formbricks/blob/main/packages/ee/LICENSE) for the enterprise functionality can be found in the `/packages/ee` folder of this repository. This additional functionality is not part of the AGPLv3 licensed Formbricks core and is designed to meet the needs of larger teams and enterprises. This advanced functionality is already included in the Docker images, but you need an [Enterprise License Key](https://formbricks.com/docs/self-hosting/enterprise) to unlock it.
### White-Labeling Formbricks and Other Licensing Needs
If you have other licensing requirements such as White-Labeling please [send us an email](mailto:hola@formbricks.com).
### Why charge for Enterprise Features?
The Enterprise Edition and White-Label Licenses allow us to fund the development of Formbricks sustainably. It guarantees that the open-source surveying infrastructure we're building will be around for decades to come.
<p align="right"><a href="#top">🔼 Back to top</a></p>
+9 -8
View File
@@ -1,27 +1,28 @@
import { classNames } from "@/lib/utils";
import { import {
ClockIcon, ClockIcon,
CogIcon, CogIcon,
CreditCardIcon, CreditCardIcon,
DocumentChartBarIcon, FileBarChartIcon,
HelpCircleIcon,
HomeIcon, HomeIcon,
QuestionMarkCircleIcon,
ScaleIcon, ScaleIcon,
ShieldCheckIcon, ShieldCheckIcon,
UserGroupIcon, UsersIcon,
} from "@heroicons/react/24/outline"; } from "lucide-react";
import { classNames } from "../lib/utils";
const navigation = [ const navigation = [
{ name: "Home", href: "#", icon: HomeIcon, current: true }, { name: "Home", href: "#", icon: HomeIcon, current: true },
{ name: "History", href: "#", icon: ClockIcon, current: false }, { name: "History", href: "#", icon: ClockIcon, current: false },
{ name: "Balances", href: "#", icon: ScaleIcon, current: false }, { name: "Balances", href: "#", icon: ScaleIcon, current: false },
{ name: "Cards", href: "#", icon: CreditCardIcon, current: false }, { name: "Cards", href: "#", icon: CreditCardIcon, current: false },
{ name: "Recipients", href: "#", icon: UserGroupIcon, current: false }, { name: "Recipients", href: "#", icon: UsersIcon, current: false },
{ name: "Reports", href: "#", icon: DocumentChartBarIcon, current: false }, { name: "Reports", href: "#", icon: FileBarChartIcon, current: false },
]; ];
const secondaryNavigation = [ const secondaryNavigation = [
{ name: "Settings", href: "#", icon: CogIcon }, { name: "Settings", href: "#", icon: CogIcon },
{ name: "Help", href: "#", icon: QuestionMarkCircleIcon }, { name: "Help", href: "#", icon: HelpCircleIcon },
{ name: "Privacy", href: "#", icon: ShieldCheckIcon }, { name: "Privacy", href: "#", icon: ShieldCheckIcon },
]; ];
+25
View File
@@ -0,0 +1,25 @@
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui/Select";
interface SurveySwitchProps {
value: "website" | "app";
formbricks: any;
}
export const SurveySwitch = ({ value, formbricks }: SurveySwitchProps) => {
return (
<Select
value={value}
onValueChange={(v) => {
formbricks.logout();
window.location.href = `/${v}`;
}}>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder="Theme" />
</SelectTrigger>
<SelectContent>
<SelectItem value="website">Website Surveys</SelectItem>
<SelectItem value="app">App Surveys</SelectItem>
</SelectContent>
</Select>
);
};
+1
View File
@@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
transpilePackages: ["@formbricks/ui"],
async redirects() { async redirects() {
return [ return [
{ {
+5 -3
View File
@@ -12,12 +12,14 @@
}, },
"dependencies": { "dependencies": {
"@formbricks/js": "workspace:*", "@formbricks/js": "workspace:*",
"@heroicons/react": "^2.1.1", "@formbricks/ui": "workspace:*",
"next": "14.0.4", "lucide-react": "^0.368.0",
"next": "14.2.1",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"eslint-config-formbricks": "workspace:*" "eslint-config-formbricks": "workspace:*",
"@formbricks/tsconfig": "workspace:*"
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@ import { Head, Html, Main, NextScript } from "next/document";
export default function Document() { export default function Document() {
return ( return (
<Html lang="en" className="h-full bg-gray-50"> <Html lang="en" className="h-full bg-slate-50">
<Head /> <Head />
<body className="h-full"> <body className="h-full">
<Main /> <Main />
+55 -75
View File
@@ -2,8 +2,9 @@ import Image from "next/image";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import formbricks from "@formbricks/js"; import formbricksApp from "@formbricks/js/app";
import { SurveySwitch } from "../../components/SurveySwitch";
import fbsetup from "../../public/fb-setup.png"; import fbsetup from "../../public/fb-setup.png";
declare const window: any; declare const window: any;
@@ -21,23 +22,33 @@ export default function AppPage({}) {
}, [darkMode]); }, [darkMode]);
useEffect(() => { useEffect(() => {
// enable Formbricks debug mode by adding formbricksDebug=true GET parameter
const addFormbricksDebugParam = () => {
const urlParams = new URLSearchParams(window.location.search);
if (!urlParams.has("formbricksDebug")) {
urlParams.set("formbricksDebug", "true");
const newUrl = `${window.location.pathname}?${urlParams.toString()}`;
window.history.replaceState({}, "", newUrl);
}
};
addFormbricksDebugParam();
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) { if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const isUserId = window.location.href.includes("userId=true"); const userId = "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING";
const userId = isUserId ? "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING" : undefined; const userInitAttributes = { language: "de", "Init Attribute 1": "eight", "Init Attribute 2": "two" };
const attributes = isUserId ? { "Init Attribute 1": "eight", "Init Attribute 2": "two" } : undefined;
formbricks.init({ formbricksApp.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID, environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST, apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
userId, userId,
debug: true, attributes: userInitAttributes,
attributes,
}); });
window.formbricks = formbricks;
} }
// Connect next.js router to Formbricks // Connect next.js router to Formbricks
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) { if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const handleRouteChange = formbricks?.registerRouteChange; const handleRouteChange = formbricksApp?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange); router.events.on("routeChangeComplete", handleRouteChange);
return () => { return () => {
@@ -49,15 +60,19 @@ export default function AppPage({}) {
return ( return (
<div className="h-screen bg-white px-12 py-6 dark:bg-slate-800"> <div className="h-screen bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col justify-between md:flex-row"> <div className="flex flex-col justify-between md:flex-row">
<div> <div className="flex items-center gap-2">
<h1 className="text-2xl font-bold text-slate-900 dark:text-white"> <SurveySwitch value="app" formbricks={formbricksApp} />
Formbricks In-product Survey Demo App <div>
</h1> <h1 className="text-2xl font-bold text-slate-900 dark:text-white">
<p className="text-slate-700 dark:text-slate-300"> Formbricks In-product Survey Demo App
This app helps you test your in-app surveys. You can create and test user actions, create and </h1>
update user attributes, etc. <p className="text-slate-700 dark:text-slate-300">
</p> This app helps you test your app surveys. You can create and test user actions, create and
update user attributes, etc.
</p>
</div>
</div> </div>
<button <button
className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100" className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100"
onClick={() => setDarkMode(!darkMode)}> onClick={() => setDarkMode(!darkMode)}>
@@ -70,7 +85,7 @@ export default function AppPage({}) {
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900"> <div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3> <h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3>
<p className="text-slate-700 dark:text-slate-300"> <p className="text-slate-700 dark:text-slate-300">
Copy the environment ID of your Formbricks app to the env variable in demo/.env Copy the environment ID of your Formbricks app to the env variable in /apps/demo/.env
</p> </p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority /> <Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
@@ -81,7 +96,7 @@ export default function AppPage({}) {
{process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID} {process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID}
</strong> </strong>
<span className="relative ml-2 flex h-3 w-3"> <span className="relative ml-2 flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"></span> <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"></span>
<span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span> <span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span>
</span> </span>
</div> </div>
@@ -100,22 +115,22 @@ export default function AppPage({}) {
</div> </div>
<div className="md:grid md:grid-cols-3"> <div className="md:grid md:grid-cols-3">
<div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-gray-600 dark:bg-gray-800"> <div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-800">
<h3 className="text-lg font-semibold dark:text-white"> <h3 className="text-lg font-semibold dark:text-white">
Reset person / pull data from Formbricks app Reset person / pull data from Formbricks app
</h3> </h3>
<p className="text-slate-700 dark:text-gray-300"> <p className="text-slate-700 dark:text-slate-300">
On formbricks.reset() a few things happen: <strong>New person is created</strong> and{" "} On formbricks.reset() the local state will <strong>be deleted</strong> and formbricks gets{" "}
<strong>surveys & no-code actions are pulled from Formbricks:</strong>. <strong>reinitialized</strong>.
</p> </p>
<button <button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600" className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => { onClick={() => {
formbricks.reset(); formbricksApp.reset();
}}> }}>
Reset Reset
</button> </button>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and
try again. try again.
</p> </p>
@@ -124,15 +139,15 @@ export default function AppPage({}) {
<div className="p-6"> <div className="p-6">
<div> <div>
<button <button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600" className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => { onClick={() => {
formbricks.track("Code Action"); formbricksApp.track("Code Action");
}}> }}>
Code Action Code Action
</button> </button>
</div> </div>
<div> <div>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
This button sends a{" "} This button sends a{" "}
<a href="https://formbricks.com/docs/actions/code" className="underline" target="_blank"> <a href="https://formbricks.com/docs/actions/code" className="underline" target="_blank">
Code Action Code Action
@@ -143,12 +158,12 @@ export default function AppPage({}) {
</div> </div>
<div className="p-6"> <div className="p-6">
<div> <div>
<button className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"> <button className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600">
No-Code Action No-Code Action
</button> </button>
</div> </div>
<div> <div>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
This button sends a{" "} This button sends a{" "}
<a <a
href="https://formbricks.com/docs/actions/no-code" href="https://formbricks.com/docs/actions/no-code"
@@ -170,14 +185,14 @@ export default function AppPage({}) {
<div> <div>
<button <button
onClick={() => { onClick={() => {
formbricks.setAttribute("Plan", "Free"); formbricksApp.setAttribute("Plan", "Free");
}} }}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"> className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600">
Set Plan to &apos;Free&apos; Set Plan to &apos;Free&apos;
</button> </button>
</div> </div>
<div> <div>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
This button sets the{" "} This button sets the{" "}
<a <a
href="https://formbricks.com/docs/attributes/custom-attributes" href="https://formbricks.com/docs/attributes/custom-attributes"
@@ -193,14 +208,14 @@ export default function AppPage({}) {
<div> <div>
<button <button
onClick={() => { onClick={() => {
formbricks.setAttribute("Plan", "Paid"); formbricksApp.setAttribute("Plan", "Paid");
}} }}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"> className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600">
Set Plan to &apos;Paid&apos; Set Plan to &apos;Paid&apos;
</button> </button>
</div> </div>
<div> <div>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
This button sets the{" "} This button sets the{" "}
<a <a
href="https://formbricks.com/docs/attributes/custom-attributes" href="https://formbricks.com/docs/attributes/custom-attributes"
@@ -216,14 +231,14 @@ export default function AppPage({}) {
<div> <div>
<button <button
onClick={() => { onClick={() => {
formbricks.setEmail("test@web.com"); formbricksApp.setEmail("test@web.com");
}} }}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"> className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600">
Set Email Set Email
</button> </button>
</div> </div>
<div> <div>
<p className="text-xs text-slate-700 dark:text-gray-300"> <p className="text-xs text-slate-700 dark:text-slate-300">
This button sets the{" "} This button sets the{" "}
<a <a
href="https://formbricks.com/docs/attributes/identify-users" href="https://formbricks.com/docs/attributes/identify-users"
@@ -235,41 +250,6 @@ export default function AppPage({}) {
</p> </p>
</div> </div>
</div> </div>
<div className="p-6">
{router.query.userId === "true" ? (
<div>
<button
onClick={() => {
window.location.href = "/app";
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Deactivate User Identification
</button>
</div>
) : (
<div>
<button
onClick={() => {
window.location.href = "/app?userId=true";
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Activate User Identification
</button>
</div>
)}
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button activates/deactivates{" "}
<a
href="https://formbricks.com/docs/attributes/identify-users"
target="_blank"
className="underline dark:text-blue-500">
user identification
</a>{" "}
with the userId &apos;THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING&apos;
</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
+197
View File
@@ -0,0 +1,197 @@
import { MonitorIcon } from "lucide-react";
import Image from "next/image";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import formbricksWebsite from "@formbricks/js/website";
import { SurveySwitch } from "../../components/SurveySwitch";
import fbsetup from "../../public/fb-setup.png";
declare const window: any;
export default function AppPage({}) {
const [darkMode, setDarkMode] = useState(false);
const router = useRouter();
useEffect(() => {
if (darkMode) {
document.body.classList.add("dark");
} else {
document.body.classList.remove("dark");
}
}, [darkMode]);
useEffect(() => {
// enable Formbricks debug mode by adding formbricksDebug=true GET parameter
const addFormbricksDebugParam = () => {
const urlParams = new URLSearchParams(window.location.search);
if (!urlParams.has("formbricksDebug")) {
urlParams.set("formbricksDebug", "true");
const newUrl = `${window.location.pathname}?${urlParams.toString()}`;
window.history.replaceState({}, "", newUrl);
}
};
addFormbricksDebugParam();
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const defaultAttributes = {
language: "de",
};
formbricksWebsite.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
attributes: defaultAttributes,
});
}
// Connect next.js router to Formbricks
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const handleRouteChange = formbricksWebsite?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}
});
return (
<div className="h-screen bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col items-center justify-between md:flex-row">
<div className="flex items-center gap-2">
<SurveySwitch value="website" formbricks={formbricksWebsite} />
<div>
<h1 className="text-2xl font-bold text-slate-900 dark:text-white">
Formbricks Website Survey Demo App
</h1>
<p className="text-slate-700 dark:text-slate-300">
This app helps you test your app surveys. You can create and test user actions, create and
update user attributes, etc.
</p>
</div>
</div>
<button
className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100"
onClick={() => setDarkMode(!darkMode)}>
{darkMode ? "Toggle Light Mode" : "Toggle Dark Mode"}
</button>
</div>
<div className="my-4 grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3>
<p className="text-slate-700 dark:text-slate-300">
Copy the environment ID of your Formbricks app to the env variable in /apps/demo/.env
</p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
<div className="mt-4 flex-col items-start text-sm text-slate-700 sm:flex sm:items-center sm:text-base dark:text-slate-300">
<p className="mb-1 sm:mb-0 sm:mr-2">You&apos;re connected with env:</p>
<div className="flex items-center">
<strong className="w-32 truncate sm:w-auto">
{process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID}
</strong>
<span className="relative ml-2 flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"></span>
<span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span>
</span>
</div>
</div>
</div>
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">2. Widget Logs</h3>
<p className="text-slate-700 dark:text-slate-300">
Look at the logs to understand how the widget works.{" "}
<strong className="dark:text-white">Open your browser console</strong> to see the logs.
</p>
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
<LogsContainer />
</div> */}
</div>
</div>
<div className="md:grid md:grid-cols-3">
<div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-800">
<h3 className="text-lg font-semibold dark:text-white">
Reset person / pull data from Formbricks app
</h3>
<p className="text-slate-700 dark:text-slate-300">
On formbricks.reset() the local state will <strong>be deleted</strong> and formbricks gets{" "}
<strong>reinitialized</strong>.
</p>
<button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => {
formbricksWebsite.reset();
}}>
Reset
</button>
<p className="text-xs text-slate-700 dark:text-slate-300">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and
try again.
</p>
</div>
<div className="pt-6">
<div>
<button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => {
formbricksWebsite.track("New Session");
}}>
Track New Session
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-slate-300">
This button sends an Action to the Formbricks API called &apos;New Session&apos;. You will
find it in the Actions Tab.
</p>
</div>
</div>
<div className="pt-6">
<div>
<button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => {
formbricksWebsite.track("Exit Intent");
}}>
Track Exit Intent
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-slate-300">
This button sends an Action to the Formbricks API called &apos;Exit Intent&apos;. You can also
move your mouse to the top of the browser to trigger the exit intent.
</p>
</div>
</div>
<div className="pt-6">
<div>
<button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"
onClick={() => {
formbricksWebsite.track("50% Scroll");
}}>
Track 50% Scroll
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-slate-300">
This button sends an Action to the Formbricks API called &apos;50% Scroll&apos;. You can also
scroll down to trigger the 50% scroll.
</p>
</div>
</div>
</div>
</div>
</div>
);
}
+1 -19
View File
@@ -1,23 +1,5 @@
{ {
"compilerOptions": { "extends": "@formbricks/tsconfig/nextjs.json",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }
+4
View File
@@ -4,3 +4,7 @@ NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID=
# Strapi API Key # Strapi API Key
STRAPI_API_KEY= STRAPI_API_KEY=
NEXT_PUBLIC_DOCSEARCH_APP_ID=
NEXT_PUBLIC_DOCSEARCH_API_KEY=
NEXT_PUBLIC_DOCSEARCH_INDEX_NAME=
@@ -0,0 +1,5 @@
export async function GET(_: Request, { params }: { params: { surveyId: string } }) {
const surveyId = params.surveyId;
// redirect to Formbricks Cloud
return Response.redirect(`https://app.formbricks.com/s/${surveyId}`, 301);
}
@@ -1,37 +0,0 @@
export const metadata = {
title: "Implementing Code Actions in Formbricks | Real-time User Action Tracking",
description:
"Dive into the world of Formbricks' code actions. Learn how to seamlessly integrate formbricks.track() method into your codebase, enabling real-time tracking of user actions like button clicks, visiting a specific URL. Up your survey game with precise and exact triggers.",
};
#### Actions
# Code Actions
Actions can also be set in the codebase to trigger surveys. Please add the code action first in the Formbricks web interface to be able to configure your surveys to use this action.
After that you can fire an action using `formbricks.track()`
<Col>
<CodeGroup title="Track an action">
```javascript
formbricks.track("Action Name");
```
</CodeGroup>
</Col>
Here is an example of how to fire an action when a user clicks a button:
<Col>
<CodeGroup title="Track Button Click">
```javascript
const handleClick = () => {
formbricks.track("Button Clicked");
};
return <button onClick={handleClick}>Click Me</button>;
```
</CodeGroup>
</Col>
@@ -1,30 +0,0 @@
export const metadata = {
title: "Implementing No-Code Actions in Formbricks | Real-time User Action Tracking",
description:
"Discover the power of Formbricks' No-Code Actions. Easily set up triggers based on Page URL, innerText, and CSS Selectors without touching a line of code. Inccrease user engagement and get insights at precise moments in the user journey.",
};
#### Actions
# No-Code Actions
No-Code actions can be set up within Formbricks with just a few clicks. There are three types of No-Code actions:
## Page URL Action
The page URL action is triggered, when a user visits a specific page in your application. There are several match conditions:
- `exactMatch`: The URL should exactly match the provided string.
- `contains`: The URL should contain the specified string as a substring.
- `startsWith`: The URL should start with the specified string.
- `endsWith`: The URL should end with the specified string.
- `notMatch`: The URL should not match the specified condition.
- `notContains`: The URL should not contain the specified string as a substring.
## innerText Action
The innerText action checks if the `innerText` of a clicked HTML element matches a specific text, e.g. the label of a button. Display a survey on any button click!
## CSS Selector Action
The CSS Selector action checks if the provided CSS selector matches the selector of a clicked HTML element. The CSS selector can be a class, id or any other CSS selector within your website. Display a survey on any element click!
@@ -1,23 +0,0 @@
export const metadata = {
title: "Using Actions in Formbricks | Fine-tuning User Moments",
description:
"Dive deep into how actions in Formbricks help products and teams to engage users at precise moments in their journey. Discover the power of actions, from coding to no-code setups, to refine user targeting and generate richer, more detailed user insights.",
};
#### Actions
# What are actions and why are they useful?
You want to understand what your users think and feel during specific moments in the user journey. To be able to ask at exactly the right point in time, you need actions.
## What are actions?
Actions are a little notification sent from your application to Formbricks. You decide which actions are sent either in your [Code](/docs/actions/code) or by setting up a [No-Code](/docs/actions/no-code) action within Formbricks.
## How do actions work?
When a predefined action happens in your app, the Formbricks widget notices. This action can then trigger a survey to be shown to the user and is stored in the database.
## Why are actions useful?
Actions help you to display your surveys at the right time. Later on, you will be able to segment your users based on the actions they have triggered in the past. This way, you can create much more granular user segments, e.g. only target users that already have used a specific feature.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,137 @@
import { MdxImage } from "@/components/shared/MdxImage";
import AddApiKey from "./add-api-key.webp";
import ApiKeySecret from "./api-key-secret.webp";
export const metadata = {
title: "Formbricks API Overview: Public Client & Management API Breakdown",
description:
"Formbricks provides a powerful API to manage your surveys, responses, users, displays, actions, attributes & webhooks programmatically. Get a detailed understanding of Formbricks' dual API offerings: the unauthenticated Public Client API optimized for client-side tasks and the secured Management API for advanced account operations. Choose the perfect fit for your integration needs and ensure robust data handling",
};
#### API
# API Overview
Formbricks offers two types of APIs: the **Public Client API** and the **Management API**. Each API serves a different purpose, has different authentication requirements, and provides access to different data and settings.
View our [API Documentation](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh) in more than 30 frameworks and languages. Or directly try out our APIs in Postman by clicking the button below:
<div className="max-w-full sm:max-w-3xl">
<a target="_blank" href="https://formbricks.postman.co/collection/11026000-927c954f-85a9-4f8f-b0ec-14191b903737?source=rip_html">
<img alt="Run in Postman" src="https://run.pstmn.io/button.svg"/>
</a>
</div>
## Public Client API
The [Public Client API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#5c981d9e-5e7d-455d-9795-b9c45bc2f930) is designed for our SDKs and **does not require authentication**. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
We currently have the following Client API methods exposed and below is their documentation attached in Postman:
- [Actions API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#b8f3a10e-1642-4d82-a629-fef0a8c6c86c) - Create actions for a Person
- [Displays API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#949272bf-daec-4d72-9b52-47af3d74a62c) - Mark Survey as Displayed or Update an existing Display by linking it with a Response for a Person
- [People API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#ee3d2188-4253-4bca-9238-6b76455805a9) - Create & Update a Person (e.g. attributes, email, userId, etc)
- [Responses API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#8c773032-536c-483c-a237-c7697347946e) - Create & Update a Response for a Survey
## Management API
The [Management API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#98fce5a1-1365-4125-8de1-acdb28206766) provides access to all data and settings that your account has access to in the Formbricks app. This API **requires a personal API Key** for authentication, which can be generated in the Settings section of the Formbricks app. Checkout the [API Key Setup](#how-to-generate-an-api-key) below to generate & manage API Keys.
We currently have the following Management API methods exposed and below is their documentation attached in Postman:
- [Action Class API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#81947f69-99fc-41c9-a184-f3260e02be48) - Create, List, and Delete Action Classes
- [Attribute Class API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#31089010-d468-4a7c-943e-8ebe71b9a36e) - Create, List, and Delete Attribute Classes
- [Me API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#79e08365-641d-4b2d-aea2-9a855e0438ec) - Retrieve Account Information
- [People API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#cffc27a6-dafb-428f-8ea7-5165bedb911e) - List and Delete People
- [Response API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#e544ec0d-8b30-4e33-8d35-2441cb40d676) - List, List by Survey, Update, and Delete Responses
- [Survey API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#953189b2-37b5-4429-a7bd-f4d01ceae242) - List, Create, Update, and Delete Surveys
- [Webhook API](https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#62e6ec65-021b-42a4-ac93-d1434b393c6c) - List, Create, and Delete Webhooks
## How to Generate an API key
The API requests are authorized with a personal API key. This API key gives you the same rights as if you were logged in at formbricks.com - **don't share it around!**
1. Go to your settings on [app.formbricks.com](https://app.formbricks.com).
2. Go to page “API keys”
<MdxImage src={AddApiKey} alt="Add API Key" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
3. Create a key for the development or production environment.
4. Copy the key immediately. You wont be able to see it again.
<MdxImage
src={ApiKeySecret}
alt="API Key Secret"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Note>
### Store API key safely!
Anyone who has your API key has full control over your account. For security reasons, you cannot view the API key again.
</Note>
### Test your API Key
Hit the below request to verify that you are authenticated with your API Key and the server is responding.
## Get My Profile {{ tag: 'GET', label: '/api/v1/me' }}
<Row>
<Col>
Get the product details and environment type of your account.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Delete a personal API key
1. Go to settings on [app.formbricks.com](https://app.formbricks.com/).
2. Go to page “API keys”.
3. Find the key you wish to revoke and select “Delete”.
4. Your API key will stop working immediately.
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/me">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/me' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"id": "cll2m30r70004mx0huqkitgqv",
"createdAt": "2023-08-08T18:04:59.922Z",
"updatedAt": "2023-08-08T18:04:59.922Z",
"type": "production",
"product": {
"id": "cll2m30r60003mx0hnemjfckr",
"name": "My Product"
},
"widgetSetupCompleted": false
}
```
```json {{ title: '401 Not Authenticated' }}
Not authenticated
```
</CodeGroup>
</Col>
</Row>
Cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts) and we'd be glad to assist you!
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@@ -0,0 +1,174 @@
import { MdxImage } from "@/components/shared/MdxImage";
import AddLanguageInSurvey from "./add-language-in-survey.webp";
import AddLanguages from "./add-languages.webp";
import EditMultiLang from "./edit-multi-lang.webp";
import EnableMultiLang from "./enable-multi-lang.webp";
import SeeSurveyInLanguage from "./see-survey-in-language.webp";
import SurveyLanguagesFromHome from "./survey-languages-from-home.webp";
import SurveyLanguageSettings from "./survey-languague-settings.webp";
import SurveySharing from "./survey-sharing.webp";
import SurveysHome from "./surveys-home.webp";
import TranslateAsPerLanguage from "./translate-as-per-language.webp";
export const metadata = {
title: "Multi-language Surveys | Formbricks",
description:
"Create multi-language link & in-app surveys with Formbricks. Get feedback from your users in their preferred language without writing a single line of code.",
};
#### Additional Features
# Multi-language Surveys
Multi-Language Surveys allow you to create surveys that support multiple languages using translations. This makes it easier to reach a diverse audience without creating separate surveys for each language. This feature simplifies the creation, delivery, and analysis of surveys for a multilingual audience.
How to deliver a specific language depends on the survey type (in-app or link survey):
- In-app survey: Set a `language` attribute for the user. [See the guide below for In-App Surveys](#in-app-surveys-configuration)
- Link survey: Add a `lang` parameter in the survey URL. [See the guide below for Link Surveys](#link-surveys-configuration)
<Note>
Multi-Language is feature of the Enterprise Edition. You can use it for **free** by adding your credit card details
on the Formbricks Cloud.
</Note>
<iframe
width="700"
height="450"
src="https://www.youtube.com/embed/Vol5zjYIoos?si=FOeDSqcy_OgtaUyM"
title="YouTube video player: Formbricks"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"></iframe>
---
## Creating a Multi-language Survey
1. Open the **Survey Languages** page in the Formbricks settings via the top-right menu:
<MdxImage
src={SurveyLanguagesFromHome}
alt="Formbricks Home"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Click on the **Edit Languages** button, to add a new language to your survey
<MdxImage
src={SurveyLanguageSettings}
alt="Formbricks Home"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. Select the preferred language from the dropdown and assign an identifier Alias. Click the **Add Language** button to add the language to your product.
<MdxImage
src={AddLanguages}
alt="Add Multiple Languages to your Product"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
You can come back to this page anytime to add more languages or remove existing ones.
4. Now, return to the dashboard to create a new survey or edit an existing one.
<MdxImage
src={SurveysHome}
alt="Add Multiple Languages to your Product"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
5. In the survey editor, scroll down to the **Multiple Languages** section at the bottom and enable the toggle next to it.
<MdxImage
src={EnableMultiLang}
alt="Enable Multi-language for a survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
6. Now choose a **Default Language** for your survey. This is the language that will be shown to users who have not selected a preferred language.
<Note>Changing the default language will reset all the translations you have made for the survey.</Note>
7. Now, add the languages from the dropdown that you want to support in your survey.
<MdxImage
src={AddLanguageInSurvey}
alt="Enable Multi-language for a survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
8. You can now see the survey in the selected language by clicking on the language dropdown in any of the questions.
<MdxImage
src={SeeSurveyInLanguage}
alt="Enable Multi-language for a survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
9. You can now translate all survey content, including questions, options, and button placeholders, into the selected language.
<MdxImage
src={TranslateAsPerLanguage}
alt="Enable Multi-language for a survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
10. Once you are done, click on the **Publish** button to save the survey.
## In-App Surveys Configuration
1. When you initialise the Formbricks SDK for your user, you can pass a `language` attribute with the language code. This can be either the ISO identifier or the Alias you set when creating the language. The `language` attribute makes sure that this user only sees surveys with a translation in this specific language available.
<Col>
<CodeGroup title="Configuring Formbricks SDK with Multi-language">
```js
Formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user_id>",
attributes: {
language: "de", // ISO identifier or Alias set when creating language
},
});
```
</CodeGroup>
</Col>
<Note>If a user has a language assigned, a survey has multi-language activate and it is missing a translation in the language of the user, the survey will not be displayed.</Note>
2. That's it! Now, users with the language attribute set will see the survey in their preferred language. You can start collecting responses in multiple languages and filter them by language on the summary page.
---
## Link Surveys Configuration
For link surveys, the translation delivery is dependent on the `land` URL parameter.
After publishing the survey, just copy the survey link and append the `lang` query parameter with the language alias you have set.
For example, if you have set the alias for French as `fr`, you can share the survey link as
`https://your-survey-url.com?lang=fr`
Here are two examples:
- English: https://app.Formbricks.com/s/clptfos2i1pj516pvhxqyu3bn?lang=en
- German: https://app.Formbricks.com/s/clptfos2i1pj516pvhxqyu3bn?lang=de
Without the `lang` parameter, Formbricks will show the survey in the default language you have set.
You can now start collecting responses in multiple languages!
Cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts)!
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -1,88 +0,0 @@
import { Fence } from "@/components/shared/Fence";
export const metadata = {
title: "Formbricks Responses API Documentation - Manage Your Survey Data Seamlessly",
description:
"Unlock the full potential of Formbricks' Client Actions API. Create Actions right from the API.",
};
#### Client API
# Actions API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
This API can be used to:
- [Add Action for User](#add-action-for-user)
---
## Add Action for User {{ tag: 'POST', label: '/api/v1/client/<environment-id>/actions' }}
Adds an Actions for a given User by their User ID
<Row>
<Col>
### Mandatory Body Fields
<Properties>
<Property name="userId" type="string">
The id of the user for whom the action is being created.
</Property>
<Property name="name" type="string">
The name of the Action being created.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/<environment-id>/actions">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/client/<environment-id>/actions' \
--data-raw '{
"userId": "1",
"name": "new_action_v2",
"properties":{}
}'
```
```json {{ title: 'Example Request Body' }}
{
"userId": "1",
"name": "new_action_v3",
"properties":{}
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"name": "Required"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,145 +0,0 @@
import { Fence } from "@/components/shared/Fence";
export const metadata = {
title: "Formbricks Public Client API Guide: Manage Survey Displays & Responses",
description:
"Dive deep into Formbricks' Public Client API designed for customisation. This comprehensive guide provides detailed instructions on how to mark create and update survey displays for users.",
};
#### Client API
# Displays API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
This set of API can be used to
- [Create Display](#create-display)
- [Update Display](#update-display)
---
## Create Display {{ tag: 'POST', label: '/api/v1/client/<environment-id>/diplays' }}
<Row>
<Col>
Create Display of survey for a user
### Mandatory Request Body JSON Keys
<Properties>
<Property name="surveyId" type="string">
Survey ID to mark as viewed for a person
</Property>
</Properties>
### Optional Request Body JSON Keys
<Properties>
<Property name="userId" type="string">
Already existing user's ID to mark as viewed for a survey
</Property>
<Property name="responseId" type="string">
Already existing response's ID to link with this new Display
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/<environment-id>/displays">
```bash {{ title: 'cURL' }}
curl -X POST \
'https://app.formbricks.com/api/v1/client/displays' \
-H 'Content-Type: application/json' \
-d '{
"surveyId":"<survey-id>",
"userId":"<user-id>"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "clphzz6oo00083zdmc7e0nwzi"
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"surveyId": "Required"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Update Display {{ tag: 'PUT', label: '/api/v1/client/<environment-id>/diplays/<display-id>' }}
<Row>
<Col>
Update a display by it's ID
### Optional Request Body JSON Keys
<Properties>
<Property name="userId" type="string">
Already existing user's ID to mark as viewed for a survey
</Property>
<Property name="responseId" type="string">
Already existing response's ID to link with this new Display
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="PUT" label="/api/v1/client/<environment-id>/displays/<display-id>">
```bash {{ title: 'cURL' }}
curl -X POST \
'https://app.formbricks.com/api/v1/client/<environment-id>/displays/<display-id>' \
-H 'Content-Type: application/json' \
-d '{
"userId":"<user-id>"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"surveyId": "Required"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,47 +0,0 @@
export const metadata = {
title: "Formbricks API Overview: Public Client & Management API Breakdown",
description:
"Get a detailed understanding of Formbricks' dual API offerings: the unauthenticated Public Client API optimized for client-side tasks and the secured Management API for advanced account operations. Choose the perfect fit for your integration needs and ensure robust data handling",
};
#### API
# API Overview
Formbricks offers two types of APIs: the **Public Client API** and the **Management API**. Each API serves a different purpose, has different authentication requirements, and provides access to different data and settings.
Checkout the [API Key Setup](/docs/api/management/api-key-setup) - to generate, store, or delete API Keys.
## Public Client API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
- [Actions API](/docs/api/client/actions) - Create actions for a person
- [Displays API](/docs/api/client/displays) - Mark Survey as Displayed or Responded for a Person
- [People API](/docs/api/client/people) - Create & update people (e.g. attributes)
- [Responses API](/docs/api/client/responses) - Create & update responses for a survey
## Management API
The Management API provides access to all data and settings that are visible in the Formbricks App. This API requires a personal API Key for authentication, which can be generated in the Settings section of the Formbricks App. With the Management API, you can manage your Formbricks account programmatically, accessing and modifying data and settings as needed.
**Auth:** Personal API Key
API requests made to the Management API are authorized using a personal API key. This key grants the same rights and access as if you were logged in at formbricks.com. It's essential to keep your API key secure and not share it with others.
To generate, store, or delete an API key, follow the instructions provided on the following page [API Key](/docs/api/management/api-key-setup).
- [Action Class API](/docs/api/management/action-classes) - Create, Update, and Delete Action Classes
- [Attribute Class API](/docs/api/management/attribute-classes) - Create, Update, and Delete Attribute Classes
- [Me API](/docs/api/management/me) - Retrieve Account Information
- [People API](/docs/api/management/people) - Create, Update, and Delete People
- [Responses API](/docs/api/management/responses) - Create, Update, and Delete Responses
- [Surveys API](/docs/api/management/surveys) - Create, Update, and Delete Surveys
- [Webhook API](/docs/api/management/webhooks) - Create, Update, and Delete Webhooks
<Note>
By understanding the differences between these two APIs, you can choose the appropriate one for your needs,
ensuring a secure and efficient integration with the Formbricks platform.
</Note>
---
@@ -1,130 +0,0 @@
import { Fence } from "@/components/shared/Fence";
export const metadata = {
title: "Formbricks Public Client API Guide: Manage Users",
description:
"Dive deep into Formbricks' Public Client API designed for customisation. This comprehensive guide provides detailed instructions on creating and updating users to help in user identification.",
};
#### Client API
# People API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
This set of API can be used to
- [Create Person](#create-person)
- [Update Person](#update-person)
---
## Create Person {{ tag: 'POST', label: '/api/v1/client/<environment-id>/people' }}
<Row>
<Col>
Create User with your own User ID
### Mandatory Request Body JSON Keys
<Properties>
<Property name="userId" type="string">
User ID which you would like to identify the person with
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/<environment-id>/people">
```bash {{ title: 'cURL' }}
curl -X POST \
'https://app.formbricks.com/api/v1/client/<environment-id>/people' \
-H 'Content-Type: application/json' \
-d '{
"userId":"docs_user"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"userId": "docs_user"
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"surveyId": "Required"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Update Person {{ tag: 'POST', label: '/api/v1/client/<environment-id>/people/<user-id>' }}
<Row>
<Col>
Update Person by their User ID
### Mandatory Request Body JSON Keys
<Properties>
<Property name="attributes" type="JSON">
Key Value pairs of attributes to add to the user
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/<environment-id>/people/<user-id>">
```bash {{ title: 'cURL' }}
curl -X POST \
--location \
'https://app.formbricks.com/api/v1/client/<environment-id>/people/<user-id>'
-H 'Content-Type: application/json' \
-d '{
"attributes":{
"welcome_to":"formbricks"
}
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {}
}
```
```json {{ title: '500 Internal Server Error' }}
{
"code": "internal_server_error",
"message": "Database operation failed",
"details": {}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,200 +0,0 @@
import { Fence } from "@/components/shared/Fence";
export const metadata = {
title: "Formbricks Responses API Documentation - Manage Your Survey Data Seamlessly",
description:
"Unlock the full potential of Formbricks' Responses API. From fetching to updating survey responses, our comprehensive guide helps you integrate and manage survey data efficiently without compromising security. Ideal for client-side interactions.",
};
#### Client API
# Responses API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
This set of API can be used to
- [Create Response](#create-response)
- [Update Response](#update-response)
---
## Create Response {{ tag: 'POST', label: '/api/v1/client/<environment-id>/responses' }}
Add a new response to a survey.
<Row>
<Col>
### Mandatory Body Fields
<Properties>
<Property name="surveyId" type="string">
The id of the survey the response belongs to.
</Property>
<Property name="finished" type="boolean">
Marks whether the response is complete or not.
</Property>
<Property name="data" type="string">
The data of the response as JSON object (key: questionId, value: answer).
</Property>
</Properties>
### Optional Body Fields
<Properties>
<Property name="userId" type="string" required>
Pre-existing User ID to identify the user sending the response
</Property>
</Properties>
### Parameters Explained
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| data | yes | - | The response data object (answers to the survey). In this object the key is the questionId, the value the answer of the user to this question. |
| userId | no | - | The person this response is connected to. |
| surveyId | yes | - | The survey this response is connected to. |
| finished | yes | false | Mark a response as complete to be able to filter accordingly. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/<environment-id>/responses">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/client/<environment-id>/responses' \
--data-raw '{
"surveyId":"cloqzeuu70000z8khcirufo60",
"userId": "1",
"finished": true,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}'
```
```json {{ title: 'Example Request Body' }}
{
"userId": "1",
"surveyId": "cloqzeuu70000z8khcirufo60",
"finished": true,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "clp84xdld0002px36fkgue5ka",
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "surveyId was not provided.",
"details": {
"surveyId": "This field is required."
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Update Response {{ tag: 'PUT', label: '/api/v1/client/<environment-id>/responses/<response-id>' }}
Update an existing response in a survey.
<Row>
<Col>
### Mandatory Body Fields
<Properties>
<Property name="finished" type="boolean">
Marks whether the response is complete or not.
</Property>
<Property name="data" type="string">
The data of the response as JSON object (key: questionId, value: answer).
</Property>
</Properties>
### Parameters Explained
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| data | yes | - | The response data object (answers to the survey). In this object the key is the questionId, the value the answer of the user to this question. |
| finished | yes | false | Mark a response as complete to be able to filter accordingly. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="PUT" label="/api/v1/client/<environment-id>/responses/<response-id>">
```bash {{ title: 'cURL' }}
curl --location --request PUT 'https://app.formbricks.com/api/v1/client/<environment-id>/responses/<response-id>' \
--data-raw '{
"finished":false,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}'
```
```json {{ title: 'Example Request Body' }}
{
"finished":false,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "data was not provided.",
"details": {
"data": "This field is required."
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Response not found"
}
```
</CodeGroup>
</Col>
</Row>
@@ -1,297 +0,0 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("Action Class",["Fetch","Create","Delete"])
#### Management API
# Action Classes API
This set of API can be used to
- [List Actions](#get-all-action-classes)
- [Get Action](#get-action-class-by-id)
- [Create Actions](#create-action-class)
- [Delete Actions](#delete-action-class)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get all Action Classes {{ tag: 'GET', label: '/api/v1/management/action-classes' }}
<Row>
<Col>
Get all the existing action classes in your environment.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/action-classes">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/action-classes' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": [
{
"id": "cln8k0t47000gz87nw4ibwv35",
"createdAt": "2023-10-02T07:13:19.207Z",
"updatedAt": "2023-10-02T07:13:19.207Z",
"name": "New Session",
"description": "Gets fired when a new session is created",
"type": "automatic",
"noCodeConfig": null,
"environmentId": "cln8k0t47000fz87njmmu2bck"
},
{
"id": "cln8k0t55000uz87noerwdooj",
"createdAt": "2023-10-02T07:13:19.241Z",
"updatedAt": "2023-10-02T07:13:19.241Z",
"name": "Invited Team Member",
"description": "Person invited a team member",
"type": "noCode",
"noCodeConfig": {
"type": "innerHtml",
"innerHtml": {
"value": "Add Team Member"
}
},
"environmentId": "cln8k0t47000fz87njmmu2bck"
},
]
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Action Class by ID {{ tag: 'GET', label: '/api/v1/management/action-classes/<action-class-id>' }}
<Row>
<Col>
Fetch an action class by its ID.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/action-classes/<action-class-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/action-classes/<action-class-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln8k0t55000uz87noerwdooj",
"createdAt": "2023-10-02T07:13:19.241Z",
"updatedAt": "2023-10-02T07:13:19.241Z",
"name": "Invited Team Member",
"description": "Person invited a team member",
"type": "noCode",
"noCodeConfig": {
"type": "innerHtml",
"innerHtml": {
"value": "Add Team Member"
}
},
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Create Action Class {{ tag: 'POST', label: '/api/v1/management/action-classes/' }}
<Row>
<Col>
Create an action class.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Body
<CodeGroup title="Request Body">
```json {{ title: 'cURL' }}
{
"environmentId": "cln8k0t47000fz87njmmu2bck",
"name": "My Action from API",
"type": "code"
}
```
</CodeGroup>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/management/action-classes/">
```bash {{ title: 'cURL' }}
curl -X POST https://app.formbricks.com/api/v1/management/action-classes/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
-d '{"environmentId": "cln8k0t47000fz87njmmu2bck", "name": "My Action from API", "type": "code"}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln9w1cno0008z8zu79nk5w0c",
"createdAt": "2023-10-03T05:37:26.100Z",
"updatedAt": "2023-10-03T05:37:26.100Z",
"name": "My Action from API",
"description": null,
"type": "code",
"noCodeConfig": null,
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete Action Class {{ tag: 'DELETE', label: '/api/v1/management/action-classes/<action-class-id>' }}
<Row>
<Col>
Delete an action class by its ID.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/management/action-classes/<action-class-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE https://app.formbricks.com/api/v1/management/action-classes/<action-class-id> \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln9w1cno0008z8zu79nk5w0c",
"createdAt": "2023-10-03T05:37:26.100Z",
"updatedAt": "2023-10-03T05:37:26.100Z",
"name": "My Action from API",
"description": null,
"type": "code",
"noCodeConfig": null,
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,103 +0,0 @@
import Image from "next/image";
import AddApiKey from "./add-api-key.webp";
import ApiKeySecret from "./api-key-secret.webp";
export const metadata = {
title: "Formbricks API Key: Setup and Testing",
description:
"This guide provides step-by-step instructions to generate, store, and delete API keys, ensuring safe and authenticated access to your Formbricks account.",
};
#### API
# API Key Setup
## Auth: Personal API key
The API requests are authorized with a personal API key. This API key gives you the same rights as if you were logged in at formbricks.com - **don't share it around!**
### How to generate an API key
1. Go to your settings on [app.formbricks.com](https://app.formbricks.com).
2. Go to page “API keys”
<Image src={AddApiKey} alt="Add API Key" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
3. Create a key for the development or production environment.
4. Copy the key immediately. You wont be able to see it again.
<Image
src={ApiKeySecret}
alt="API Key Secret"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
<Note>
### Store API key safely
Anyone who has your API key has full control over your account.
For security reasons, you cannot view the API key again.
</Note>
### Test your API Key
Hit the below request to verify that you are authenticated with your API Key and the server is responding.
## Get My Profile {{ tag: 'GET', label: '/api/v1/me' }}
<Row>
<Col>
Get the product details and environment type of your account.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/me">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/me' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"id": "cll2m30r70004mx0huqkitgqv",
"createdAt": "2023-08-08T18:04:59.922Z",
"updatedAt": "2023-08-08T18:04:59.922Z",
"type": "production",
"product": {
"id": "cll2m30r60003mx0hnemjfckr",
"name": "My Product"
},
"widgetSetupCompleted": false
}
```
```json {{ title: '401 Not Authenticated' }}
Not authenticated
```
</CodeGroup>
</Col>
</Row>
---
### Delete a personal API key
1. Go to settings on [app.formbricks.com](https://app.formbricks.com/).
2. Go to page “API keys”.
3. Find the key you wish to revoke and select “Delete”.
4. Your API key will stop working immediately.
@@ -1,289 +0,0 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("Attribute Class",["Fetch","Create","Delete"])
#### Management API
# Attribute Classes API
This set of API can be used to
- [List Attributes](#get-all-attribute-classes)
- [Get Attributes](#get-attribute-class-by-id)
- [Create Attributes](#create-attribute-class)
- [Delete Attributes](#delete-attribute-class)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get all Attribute Classes {{ tag: 'GET', label: '/api/v1/management/attribute-classes' }}
<Row>
<Col>
Get all the existing attribute classes in your environment.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/attribute-classes">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/attribute-classes' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": [
{
"id": "cln8k0t47000kz87n3lh23zf0",
"createdAt": "2023-10-02T07:13:19.207Z",
"updatedAt": "2023-10-02T07:13:19.207Z",
"name": "email",
"description": "The email of the person",
"archived": false,
"type": "automatic",
"environmentId": "cln8k0t47000fz87njmmu2bck"
},
{
"id": "cln8k0t55000xz87nrtwbo7sf",
"createdAt": "2023-10-02T07:13:19.241Z",
"updatedAt": "2023-10-02T07:13:19.241Z",
"name": "Name",
"description": "Full Name of the Person",
"archived": false,
"type": "code",
"environmentId": "cln8k0t47000fz87njmmu2bck"
},
]
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Attribute Class by ID {{ tag: 'GET', label: '/api/v1/management/attribute-classes/<attribute-class-id>' }}
<Row>
<Col>
Fetch an Attribute class by its ID.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/attribute-classes/<attribute-class-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/attribute-classes/<attribute-class-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln8k0t47000jz87nfwcey6mh",
"createdAt": "2023-10-02T07:13:19.207Z",
"updatedAt": "2023-10-02T07:13:19.207Z",
"name": "userId",
"description": "The internal ID of the person",
"archived": false,
"type": "automatic",
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Create Attribute Class {{ tag: 'POST', label: '/api/v1/management/attribute-classes/' }}
<Row>
<Col>
Create an Attribute class.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Body
<CodeGroup title="Request Body">
```json {{ title: 'cURL' }}
{
"environmentId": "clmlmwdqq0003196ufewo6ibg",
"name": "My Attribute from API",
"type": "code",
"description": "My description"
}
```
</CodeGroup>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/management/attribute-classes/">
```bash {{ title: 'cURL' }}
curl -X POST https://app.formbricks.com/api/v1/management/attribute-classes/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
-d '{"environmentId": "clmlmwdqq0003196ufewo6ibg", "name": "My Attribute from API", "type": "code", "description":"My description"}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "clna0hd7z0009z8zue2z3a7wy",
"createdAt": "2023-10-03T07:41:51.792Z",
"updatedAt": "2023-10-03T07:41:51.792Z",
"name": "My Attribute from API",
"description": null,
"archived": false,
"type": "code",
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete Attribute Class {{ tag: 'DELETE', label: '/api/v1/management/attribute-classes/<attribute-class-id>' }}
<Row>
<Col>
Delete an Attribute class by its ID.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/management/attribute-classes/<attribute-class-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE https://app.formbricks.com/api/v1/management/attribute-classes/<attribute-class-id> \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "clna0hd7z0009z8zue2z3a7wy",
"createdAt": "2023-10-03T07:41:51.792Z",
"updatedAt": "2023-10-03T07:41:51.792Z",
"name": "My Attribute from API",
"description": null,
"archived": false,
"type": "code",
"environmentId": "cln8k0t47000fz87njmmu2bck"
}
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,78 +0,0 @@
import { Fence } from "@/components/shared/Fence";
export const metadata = {
title: "Formbricks Me API: Fetch your environment details",
description:
"Dive into Formbricks' Me API within the Public Client API suite. Seamlessly fetch your own current environment details.",
};
#### Management API
# Me API
This API can be used to get your own current environment details.
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get Environment {{ tag: 'GET', label: '/api/v1/management/me' }}
<Row>
<Col>
Get your current environment details.
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/me">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/me' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"id": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.207Z",
"updatedAt": "2023-10-02T07:14:14.162Z",
"type": "production",
"product": {
"id": "cln8k0t47000ez87n57aqywvz",
"name": "Demo Product"
},
"widgetSetupCompleted": true
}
```
```json {{ title: '401 Unauthorized' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,232 +0,0 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("People",["Fetch","Delete"])
#### Management API
# People API
This set of API can be used to
- [List People](#list-people)
- [Get Person](#get-person)
- [Delete Person](#delete-person)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List People {{ tag: 'GET', label: '/api/v1/management/people' }}
<Row>
<Col>
List People
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/people">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/people' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": [
{
"id": "b4wgrzl363dn3zb6yy5gf265",
"attributes": {
"userId": "CYO618",
"email": "sophia@amazon.com",
"Name": "Sophia Johnson",
"Role": "Designer",
"Company": "Amazon",
"Experience": "7 years",
"Usage Frequency": "Yearly",
"Company Size": "1628 employees",
"Product Satisfaction Score": "62",
"Recommendation Likelihood": "9"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
{
"id": "jrb5iyzqvnkg9322ckhde3j4",
"attributes": {
"userId": "CYO511",
"email": "antonio@ibm.com",
"Name": "Antonio García",
"Role": "Designer",
"Company": "IBM",
"Experience": "1 years",
"Usage Frequency": "Weekly",
"Company Size": "4023 employees",
"Product Satisfaction Score": "77",
"Recommendation Likelihood": "4"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
]
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"userId": ""
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Person {{ tag: 'GET', label: '/api/v1/management/people/<person-id>' }}
<Row>
<Col>
Get Person by ID
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/people/<person-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/people/<person-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "jrb5iyzqvnkg9322ckhde3j4",
"attributes": {
"userId": "CYO511",
"email": "antonio@ibm.com",
"Name": "Antonio García",
"Role": "Designer",
"Company": "IBM",
"Experience": "1 years",
"Usage Frequency": "Weekly",
"Company Size": "4023 employees",
"Product Satisfaction Score": "77",
"Recommendation Likelihood": "4"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Person not found",
"details": {
"resource_id": "clmlmykc2000019vz5o3jglsa",
"resource_type": "Person"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete Person {{ tag: 'DELETE', label: '/api/v1/management/people/<person-id>' }}
<Row>
<Col>
Delete Person by ID
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/management/people/<person-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE https://app.formbricks.com/api/v1/management/people/<person-id> \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"success": "Person deleted successfully"
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Person not found",
"details": {
"resource_id": "clmlmykc2000019vz5o3jglsa",
"resource_type": "Person"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,286 +0,0 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("Responses",["Fetch","Delete"])
#### Management API
# Responses API
This set of API can be used to
- [List Responses](#list-all-responses)
- [Get Response](#get-response-by-id)
- [Delete Response](#delete-a-response)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List all Responses {{ tag: 'GET', label: '/api/v1/management/responses' }}
<Row>
<Col>
Retrieve all the responses you have received in your environment.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/responses">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/responses' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data":[
{
"id": "cln8k0tqv00pcz87no4qrw333",
"createdAt": "2023-10-02T07:13:20.023Z",
"updatedAt": "2023-10-02T07:13:20.023Z",
"surveyId": "cln8k0tqu00p7z87nqr4thi3k",
"finished": true,
"data": {
"interview-prompt": "clicked"
},
"meta": {
"userAgent": {
"os": "MacOS",
"browser": "Chrome"
}
},
"personAttributes": null,
"person": {
"id": "e0x4i5tvsp8puxfztyrwykvn",
"attributes": {
"userId": "CYO675",
"email": "ravi@netflix.com",
"Name": "Ravi Kumar",
"Role": "Manager",
"Company": "Netflix",
"Experience": "6 years",
"Usage Frequency": "Monthly",
"Company Size": "4610 employees",
"Product Satisfaction Score": "43",
"Recommendation Likelihood": "4"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
"notes": [],
"tags": []
},
]
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Response by ID {{ tag: 'GET', label: '/api/v1/management/responses/<response-id>' }}
<Row>
<Col>
Retrieve a response by its ID.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/responses/<response-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/responses/<response-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data":
{
"id": "cln8k0tqv00pbz87nwo5lr72b",
"createdAt": "2023-10-02T07:13:20.023Z",
"updatedAt": "2023-10-02T07:13:20.023Z",
"surveyId": "cln8k0tqu00p7z87nqr4thi3k",
"finished": true,
"data": {
"interview-prompt": "clicked"
},
"meta": {
"userAgent": {
"os": "Windows",
"browser": "Edge"
}
},
"personAttributes": null,
"person": {
"id": "hsx38f15v50ua8383uadagq5",
"attributes": {
"userId": "CYO278",
"email": "jorge@facebook.com",
"Name": "Jorge Sanchez",
"Role": "Product Manager",
"Company": "Facebook",
"Experience": "10 years",
"Usage Frequency": "Daily",
"Company Size": "1685 employees",
"Product Satisfaction Score": "84",
"Recommendation Likelihood": "6"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
"notes": [],
"tags": []
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete a response {{ tag: 'DELETE', label: '/api/v1/client/responses/<response-id>' }}
<Row>
<Col>
Delete Response by ID
### Mandatory Headers
<Properties>
<Property name="x-api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/client/responses/<response-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE https://app.formbricks.com/api/v1/management/resposnes/<response-id> \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cln8k0tqv00pbz87nwo5lr72b",
"createdAt": "2023-10-02T07:13:20.023Z",
"updatedAt": "2023-10-02T07:13:20.023Z",
"surveyId": "cln8k0tqu00p7z87nqr4thi3k",
"finished": true,
"data": {
"interview-prompt": "clicked"
},
"meta": {
"userAgent": {
"os": "Windows",
"browser": "Edge"
}
},
"personAttributes": null,
"person": {
"id": "hsx38f15v50ua8383uadagq5",
"attributes": {
"userId": "CYO278",
"email": "jorge@facebook.com",
"Name": "Jorge Sanchez",
"Role": "Product Manager",
"Company": "Facebook",
"Experience": "10 years",
"Usage Frequency": "Daily",
"Company Size": "1685 employees",
"Product Satisfaction Score": "84",
"Recommendation Likelihood": "6"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
"notes": [],
"tags": []
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "surveyId was not provided.",
"details": {
"surveyId": "This field is required."
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,780 +0,0 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("Surveys",["Fetch","Create","Update","Delete"])
#### Management API
# Surveys API
This set of API can be used to
- [List All Surveys](#list-all-surveys)
- [Get Survey](#get-survey-by-id)
- [Create Survey](#create-survey)
- [Update Survey](#update-survey-by-id)
- [Delete Survey](#delete-survey-by-id)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List all surveys {{ tag: 'GET', label: '/api/v1/management/surveys' }}
<Row>
<Col>
Retrieve all the surveys you have for the environment.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/surveys">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/surveys' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": [
{
"id": "cllnfy2780fromy0hy7uoxvtn",
"createdAt": "2023-08-23T07:56:20.516Z",
"updatedAt": "2023-08-23T07:56:26.947Z",
"name": "Product Market Fit (Superhuman)",
"type": "link",
"environmentId": "cll2m30r70004mx0huqkitgqv",
"status": "inProgress",
"attributeFilters": [],
"displayOption": "displayOnce",
"autoClose": null,
"triggers": [],
"redirectUrl": null,
"recontactDays": null,
"questions": [
{
"id": "gml6mgy71efgtq8np3s9je5p",
"type": "cta",
"headline": "You are one of our power users! Do you have 5 minutes?",
"required": false,
"buttonLabel": "Happy to help!",
"logic": [
{
"condition": "skipped",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We would love to understand your user experience better. Sharing your insight helps a lot!</span></p>",
"buttonExternal": false,
"dismissButtonLabel": "No, thanks."
},
{
"id": "kp62fbqe8cfzmvy8qwpr81b2",
"type": "multipleChoiceSingle",
"headline": "How disappointed would you be if you could no longer use My Product?",
"subheader": "Please select one of the following options:",
"required": true,
"choices": [
{
"id": "bdgy1hnwd7uwmfxk1ljqp1n5",
"label": "Not at all disappointed"
},
{
"id": "poabnvgtwenp8rb2v70gj4hj",
"label": "Somewhat disappointed"
},
{
"id": "opfiqyqz8wrqn0i0f7t24d3n",
"label": "Very disappointed"
}
],
"shuffleOption": "none"
},
{
"id": "klvpwd4x08x8quesihvw5l92",
"type": "multipleChoiceSingle",
"headline": "What is your role?",
"subheader": "Please select one of the following options:",
"required": true,
"choices": [
{
"id": "c8nerw6l9gpsxcmqkn10f9hy",
"label": "Founder"
},
{
"id": "ebjqezei6a2axtuq86cleetn",
"label": "Executive"
},
{
"id": "ctiijjblyhlp22snypfamqt1",
"label": "Product Manager"
},
{
"id": "ibalyr0mhemfkkr82vypmg40",
"label": "Product Owner"
},
{
"id": "fipk606aegslbd0e7yhc0xjx",
"label": "Software Engineer"
}
],
"shuffleOption": "none"
},
{
"id": "ryo75306flyg72iaeditbv51",
"type": "openText",
"headline": "What type of people do you think would most benefit from My Product?",
"required": true
},
{
"id": "lkjaxb73ulydzeumhd51sx9g",
"type": "openText",
"headline": "What is the main benefit you receive from My Product?",
"required": true
},
{
"id": "ec7agikkr58j8uonhioinkyk",
"type": "openText",
"headline": "How can we improve My Product for you?",
"subheader": "Please be as specific as possible.",
"required": true
}
],
"thankYouCard": {
"enabled": true,
"headline": "Thank you!",
"subheader": "We appreciate your feedback."
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null
}
]
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Survey by ID {{ tag: 'GET', label: '/api/v1/management/surveys/<survey-id>' }}
<Row>
<Col>
Get a specific survey by its ID.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/surveys/<survey-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/surveys/<survey-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln8k0tjz00n5z87nwq527h3z",
"createdAt": "2023-10-02T07:13:19.775Z",
"updatedAt": "2023-10-02T07:13:19.775Z",
"name": "Churn Survey",
"type": "link",
"environmentId": "cln8k0t47000fz87njmmu2bck",
"status": "inProgress",
"attributeFilters": [],
"displayOption": "displayOnce",
"autoClose": null,
"triggers": [],
"redirectUrl": null,
"recontactDays": null,
"questions": [
{
"id": "churn-reason",
"type": "multipleChoiceSingle",
"headline": "Why did you cancel your subscription?",
"subheader": "We're sorry to see you leave. Help us do better:",
"required": true,
"logic": [
{
"condition": "equals",
"value": "Difficult to use",
"destination": "easier-to-use"
},
{
"condition": "equals",
"value": "It's too expensive",
"destination": "30-off"
},
{
"condition": "equals",
"value": "I am missing features",
"destination": "missing-features"
},
{
"condition": "equals",
"value": "Poor customer service",
"destination": "poor-service"
},
{
"condition": "equals",
"value": "I just didn't need it anymore",
"destination": "end"
}
],
"choices": [
{
"id": "isud2xethsw63dlwl89kr4kj",
"label": "Difficult to use"
},
{
"id": "opuu4ba3dlele3n0gjkuh27c",
"label": "It's too expensive"
},
{
"id": "gnypapo0rhvkt8pwosrphvbl",
"label": "I am missing features"
},
{
"id": "wkgsrsrazd9kfunqhzjezx6t",
"label": "Poor customer service"
},
{
"id": "pykmgyyw74vg0gaeryj6bo4c",
"label": "I just didn't need it anymore"
}
]
},
{
"id": "easier-to-use",
"type": "openText",
"headline": "What would have made {{productName}} easier to use?",
"subheader": "",
"required": true,
"buttonLabel": "Send",
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "30-off",
"type": "cta",
"headline": "Get 30% off for the next year!",
"required": true,
"buttonLabel": "Get 30% off",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We'd love to keep you as a customer. Happy to offer a 30% discount for the next year.</span></p>",
"buttonUrl": "https://formbricks.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
},
{
"id": "missing-features",
"type": "openText",
"headline": "What features are you missing?",
"subheader": "",
"required": true,
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "poor-service",
"type": "cta",
"headline": "So sorry to hear 😔 Talk to our CEO directly!",
"required": true,
"buttonLabel": "Send email to CEO",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We aim to provide the best possible customer service. Please email our CEO and she will personally handle your issue.</span></p>",
"buttonUrl": "mailto:ceo@company.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
}
],
"thankYouCard": {
"enabled": false
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null,
"surveyClosedMessage": null,
"verifyEmail": null
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Create Survey {{ tag: 'POST', label: '/api/v1/management/surveys' }}
<Row>
<Col>
Create a survey
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Body
<CodeGroup title="Request Body">
```json {{ title: 'cURL' }}
{
"environmentId": "clmlmwdqq0003196ufewo6ibg",
"type": "link",
"name": "My new Survey"
}
```
</CodeGroup>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/management/surveys">
```bash {{ title: 'cURL' }}
curl -X POST \
'https://app.formbricks.com/api/v1/management/surveys' \
--header \
'x-api-key: <your-api-key>'
```
```bash {{ title: 'cURL' }}
curl -X POST https://app.formbricks.com/api/v1/management/surveys/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
-d '{"environmentId": "cln8k0t47000fz87njmmu2bck", "name": "My Survey from API", "type": "link"}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "clna6bqnz000az8zubq3e757t",
"createdAt": "2023-10-03T10:25:26.975Z",
"updatedAt": "2023-10-03T10:25:26.975Z",
"name": "My new Survey",
"redirectUrl": null,
"type": "link",
"environmentId": "cln8k0t47000fz87njmmu2bck",
"status": "draft",
"questions": [],
"thankYouCard": {
"enabled": false
},
"displayOption": "displayOnce",
"recontactDays": null,
"autoClose": null,
"delay": 0,
"autoComplete": null,
"closeOnDate": null,
"surveyClosedMessage": null,
"verifyEmail": null
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Update Survey by ID {{ tag: 'PUT', label: '/api/v1/management/surveys/<survey-id>' }}
<Row>
<Col>
Update a survey by its ID
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Body
<CodeGroup title="Request Body">
```json {{ title: 'cURL' }}
{
"name": "My renamed Survey",
"redirectUrl":"https://formbricks.com",
"type":"web"
}
```
</CodeGroup>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="PUT" label="/api/v1/management/surveys/<survey-id>">
```bash {{ title: 'cURL' }}
curl -X POST https://app.formbricks.com/api/v1/management/surveys/<survey-id> \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
-d '{"name": "My renamed Survey"}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cloqzeuu70000z8khcirufo60",
"createdAt": "2023-11-09T09:23:42.367Z",
"updatedAt": "2023-11-09T09:23:42.367Z",
"name": "My renamed Survey",
"redirectUrl": null,
"type": "link",
"environmentId": "clonzr6vc0009z8md7y06hipl",
"status": "inProgress",
"welcomeCard": {
"html": "Thanks for providing your feedback - let's go!",
"enabled": false,
"headline": "Welcome!",
"timeToFinish": false
},
"questions": [
{
"id": "l9rwn5nbk48y44tvnyyjcvca",
"type": "openText",
"headline": "Why did you leave the platform?",
"required": true,
"inputType": "text"
}
],
"thankYouCard": {
"enabled": true,
"headline": "Thank you!",
"subheader": "We appreciate your feedback."
},
"hiddenFields": {
"enabled": true,
"fieldIds": []
},
"displayOption": "displayOnce",
"recontactDays": null,
"autoClose": null,
"delay": 0,
"autoComplete": 50,
"closeOnDate": null,
"surveyClosedMessage": null,
"productOverwrites": null,
"singleUse": {
"enabled": false,
"isEncrypted": true
},
"verifyEmail": null,
"pin": null,
"triggers": [],
"attributeFilters": []
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete Survey by ID {{ tag: 'DELETE', label: '/api/v1/management/surveys/<survey-id>' }}
<Row>
<Col>
Delete a survey by its ID.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/management/surveys/<survey-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE \
'https://app.formbricks.com/api/v1/management/surveys/<survey-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "cln8k0tjz00n5z87nwq527h3z",
"createdAt": "2023-10-02T07:13:19.775Z",
"updatedAt": "2023-10-02T07:13:19.775Z",
"name": "Churn Survey",
"type": "link",
"environmentId": "cln8k0t47000fz87njmmu2bck",
"status": "inProgress",
"attributeFilters": [],
"displayOption": "displayOnce",
"autoClose": null,
"triggers": [],
"redirectUrl": null,
"recontactDays": null,
"questions": [
{
"id": "churn-reason",
"type": "multipleChoiceSingle",
"headline": "Why did you cancel your subscription?",
"subheader": "We're sorry to see you leave. Help us do better:",
"required": true,
"logic": [
{
"condition": "equals",
"value": "Difficult to use",
"destination": "easier-to-use"
},
{
"condition": "equals",
"value": "It's too expensive",
"destination": "30-off"
},
{
"condition": "equals",
"value": "I am missing features",
"destination": "missing-features"
},
{
"condition": "equals",
"value": "Poor customer service",
"destination": "poor-service"
},
{
"condition": "equals",
"value": "I just didn't need it anymore",
"destination": "end"
}
],
"choices": [
{
"id": "isud2xethsw63dlwl89kr4kj",
"label": "Difficult to use"
},
{
"id": "opuu4ba3dlele3n0gjkuh27c",
"label": "It's too expensive"
},
{
"id": "gnypapo0rhvkt8pwosrphvbl",
"label": "I am missing features"
},
{
"id": "wkgsrsrazd9kfunqhzjezx6t",
"label": "Poor customer service"
},
{
"id": "pykmgyyw74vg0gaeryj6bo4c",
"label": "I just didn't need it anymore"
}
]
},
{
"id": "easier-to-use",
"type": "openText",
"headline": "What would have made {{productName}} easier to use?",
"subheader": "",
"required": true,
"buttonLabel": "Send",
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "30-off",
"type": "cta",
"headline": "Get 30% off for the next year!",
"required": true,
"buttonLabel": "Get 30% off",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We'd love to keep you as a customer. Happy to offer a 30% discount for the next year.</span></p>",
"buttonUrl": "https://formbricks.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
},
{
"id": "missing-features",
"type": "openText",
"headline": "What features are you missing?",
"subheader": "",
"required": true,
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "poor-service",
"type": "cta",
"headline": "So sorry to hear 😔 Talk to our CEO directly!",
"required": true,
"buttonLabel": "Send email to CEO",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We aim to provide the best possible customer service. Please email our CEO and she will personally handle your issue.</span></p>",
"buttonUrl": "mailto:ceo@company.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
}
],
"thankYouCard": {
"enabled": false
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null,
"surveyClosedMessage": null,
"verifyEmail": null
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,398 +0,0 @@
import {generateManagementApiMetadata} from "@/lib/utils"
export const metadata = generateManagementApiMetadata("Webhook",["Fetch","Create","Delete"])
#### Management API
# Webhook API
Formbricks' Webhook API offers a powerful interface for interacting with webhooks. Webhooks allow you to receive real-time HTTP notifications of changes to specific objects in the Formbricks environment.
The behavior of the webhooks is determined by their trigger settings. The trigger determines which updates the webhook sends. Current available triggers include "responseCreated", "responseUpdated", and "responseFinished". This allows you to customize your webhooks to only send notifications for the events that are relevant to your application.
Webhooks are tied to a specific Formbricks environment. Once set, a webhook will receive updates from all surveys within this environment. This makes it easy to manage your data flow and ensure that all relevant updates are caught by the webhook.
This set of API can be used to
- [List All Webhooks](#list-webhooks)
- [Get Webhook](#retrieve-webhook-by-id)
- [Create Webhook](#create-webhook)
- [Delete Webhook](#delete-webhook-by-id)
And the detailed Webhook Payload is elaborated [here](#webhook-payload).
These APIs are designed to facilitate seamless integration of Formbricks with third-party systems. By making use of our webhook API, you can automate the process of sending data to these systems whenever significant events occur within your Formbricks environment.
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List Webhooks {{ tag: 'GET', label: '/api/v1/webhooks' }}
<Row>
<Col>
Learn how to retrieve a list of all webhooks via API.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/webhooks">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/webhooks' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": [
{
"id": "cliu1kdza000219zftad4ip6c",
"createdAt": "2023-06-13T08:49:04.198Z",
"updatedAt": "2023-06-13T08:49:04.198Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": [
"responseFinished"
]
}
]
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Retrieve Webhook by ID {{ tag: 'GET', label: '/api/v1/webhooks/<webhook-id>' }}
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/webhooks/<webhook-id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/webhooks/<webhook-id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu167rk000019zfhbo68bar",
"createdAt": "2023-06-13T08:38:02.960Z",
"updatedAt": "2023-06-13T08:38:02.960Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": [
"responseFinished"
]
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Create Webhook {{ tag: 'POST', label: '/api/v1/webhooks' }}
Add a webhook to your product.
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Request Body Parameters
<Properties>
<Property name="url" type="string" required>
The URL where the webhook will send data to.
</Property>
<Property name="triggers" type="string[]" required>
List of events that will trigger the webhook.
</Property>
<Property name="surveyIds" type="string[]">
List of survey IDs that will trigger the webhook. If not provided, the webhook will be triggered for all surveys.
</Property>
</Properties>
| field name | required | default | description |
| ---------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
| url | yes | - | The endpoint that the webhook will send data to |
| trigger | yes | - | The event that will trigger the webhook ("responseCreated" or "responseUpdated" or "responseFinished") |
| surveyIds | no | - | List of survey IDs that will trigger the webhook. If not provided, the webhook will be triggered for all surveys. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/webhooks">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/webhooks' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://mysystem.com/myendpoint",
"triggers": ["responseFinished"]
}'
```
```json {{ title: 'Example Request Body' }}
{
"url": "https://mysystem.com/myendpoint",
"triggers": ["responseFinished"]
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu1kdza000219zftad4ip6c",
"createdAt": "2023-06-13T08:49:04.198Z",
"updatedAt": "2023-06-13T08:49:04.198Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": ["responseFinished"],
"surveyIds": ["clisypjy4000319t4imm289uo"]
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Missing trigger",
"details": {
"missing_field": "trigger"
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Delete Webhook by ID {{ tag: 'DELETE', label: '/api/v1/webhooks/<webhook-id>' }}
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/webhooks/<webhook-id>">
```bash {{ title: 'cURL' }}
curl --location --request DELETE 'https://app.formbricks.com/api/v1/webhooks/<webhook-id>' \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu167rk000019zfhbo68bar",
"createdAt": "2023-06-13T08:38:02.960Z",
"updatedAt": "2023-06-13T08:38:02.960Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": ["responseFinished"]
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Webhook not found.",
"details": {
"webhookId": "The requested webhook does not exist."
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Webhook Payload
This documentation helps understand the payload structure that will be received when the webhook is triggered in Formbricks.
<Row>
<Col sticky>
| Variable | Type | Description |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| webhookId | String | Webhook's Id |
| event | String | The name of the trigger event [responseCreated, responseUpdated, responseFinished] |
| data | Object | Contains the details of the newly created response. |
| data.id | String | Formbricks Response ID. |
| data.createdAt | String | The timestamp when the response was created. |
| data.updatedAt | String | The timestamp when the response was last updated. |
| data.surveyId | String | The identifier of the survey associated with this response. |
| data.finished | Boolean | A boolean value indicating whether the survey response is marked as finished. |
| data.data | Object | An object containing the response data, where keys are question identifiers, and values are the corresponding answers given by the respondent. |
| data.meta | Object | Additional metadata related to the response, such as the user's operating system and browser information. |
| data.personAttributes | Object | An object with attributes related to the respondent, such as their email and a user ID (if available). |
| data.person | Object | Information about the respondent, including their unique id, attributes, and creation/update timestamps. |
| data.notes | Array | An array of notes associated with the response (if any). |
| data.tags | Array | An array of tags assigned to the response (if any). |
</Col>
<Col>
### An example webhook payload
<CodeGroup title="Payload">
```json
{
"webhookId": "cljwxvjos0003qhnvj2jg4k5i",
"event": "responseCreated",
"data": {
"id": "cljwy2m8r0001qhclco1godnu",
"createdAt": "2023-07-10T14:14:17.115Z",
"updatedAt": "2023-07-10T14:14:17.115Z",
"surveyId": "cljsf3d7a000019cv9apt2t27",
"finished": false,
"data": {
"qumbk3fkr6cky8850bvvq5z1": "Executive"
},
"meta": {
"userAgent": {
"os": "Mac OS",
"browser": "Chrome"
}
},
"personAttributes": {
"email": "test@web.com",
"userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING"
},
"person": {
"id": "cljold01t0000qh8ewzigzmjk",
"attributes": {
"email": "test@web.com",
"userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING"
},
"createdAt": "2023-07-04T17:56:17.154Z",
"updatedAt": "2023-07-04T17:56:17.154Z"
},
"notes": [],
"tags": []
}
}
```
</CodeGroup>
</Col>
</Row>
---
@@ -1,57 +0,0 @@
export const metadata = {
title: "Guide for Setting Custom Attributes | Formbricks Documentation",
description:
"Learn how to set attributes in code using setAttribute function. Enhance user segmentation, target surveys effectively, and gather valuable insights for better decisions. Easily send user-specific details for better survey segmentation and gain deeper insights.",
};
#### Attributes
# Setting attributes with code
One way to send attributes to Formbricks is in your code. In Formbricks, there are two special attributes for [user identification](/docs/attributes/identify-users)(user ID & email) and custom attributes. An example:
## Setting during Initialization
It's recommended to set custom user attributes directly during the initialization of Formbricks for better user identification.
<Col>
<CodeGroup title="Set custom attributes during initialization">
```javascript
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
userId: "<user_id>",
attributes: {
plan: "free",
},
});
```
</CodeGroup>
</Col>
## Setting independently
You can use the setAttribute function to set any custom attribute for the user (e.g. name, plan, etc.) anywhere in the user journey. Formbricks maintains a state of the current user inside the browser and makes sure attributes aren't sent to the backend twice.
<Col>
<CodeGroup title="Setting Plan to Pro">
```javascript
formbricks.setAttribute("Plan", "Pro");
```
</CodeGroup>
</Col>
Generally speaking, the setAttribute function works like this:
<Col>
<CodeGroup title="Setting Custom Attributes">
```javascript
formbricks.setAttribute("attribute_key", "attribute_value");
```
</CodeGroup>
</Col>
Where `attributeName` is the name of the attribute you want to set, and `attributeValue` is the value of the attribute you want to set.
@@ -1,23 +0,0 @@
export const metadata = {
title: "Understanding User Attributes in Formbricks Surveys",
description:
"Dive into the importance of attributes in surveys. Learn how key-value pairs can significantly improve survey targeting, enhance feedback quality, and guide data-driven decisions with Formbricks.",
};
#### Attributes
# What are attributes and why are they useful?
Surveying your user base without segmentation leads to weak results and survey fatigue. Attributes help you segment your users into groups.
## What are attributes?
Attributes are key-value pairs that you can set for each person individually. For example, the attribute "Plan" can be set to "Free" or "Paid".
## How do attributes work?
Attributes are sent from your application to Formbricks and are associated with the current user. We store it in our database and allow you to use it the next time you create a survey.
## Why are attributes useful?
Attributes help show surveys to the right group of people. For example, you can show a survey to all users who have a "Plan" attribute set to "Paid".
@@ -1,18 +1,19 @@
import Image from "next/image";
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import { MdxImage } from "@/components/shared/MdxImage";
import CreateChurnFlow from "./create-cancel-flow.webp";
import ChangeText from "./change-text.webp"; import ChangeText from "./change-text.webp";
import TriggerInnerText from "./trigger-inner-text.webp"; import CreateChurnFlow from "./create-cancel-flow.webp";
import TriggerCSS from "./trigger-css-selector.webp";
import TriggerPageUrl from "./trigger-page-url.webp";
import RecontactOptions from "./recontact-options.webp";
import PublishSurvey from "./publish-survey.webp"; import PublishSurvey from "./publish-survey.webp";
import RecontactOptions from "./recontact-options.webp";
import SelectAction from "./select-action.webp"; import SelectAction from "./select-action.webp";
import TriggerCSS from "./trigger-css-selector.webp";
import TriggerInnerText from "./trigger-inner-text.webp";
import TriggerPageUrl from "./trigger-page-url.webp";
export const metadata = { export const metadata = {
title: "Mastering Churn Surveys with Formbricks | Essential Tips & Steps", title: "Mastering Churn Surveys with Formbricks | Essential Tips & Steps",
description: "Learn how to effectively utilize Formbricks' Churn Surveys to gain deeper insights into user departures. Dive into a step-by-step guide to craft, trigger, and optimize your churn surveys, ensuring you capture invaluable feedback at critical junctures", description:
"Learn how to effectively utilize Formbricks' Churn Surveys to gain deeper insights into user departures. Dive into a step-by-step guide to craft, trigger, and optimize your churn surveys, ensuring you capture invaluable feedback at critical junctures",
}; };
#### Best Practices #### Best Practices
@@ -39,15 +40,15 @@ The Churn Survey is among the most effective ways to identify weaknesses in your
To run the Churn Survey in your app you want to proceed as follows: To run the Churn Survey in your app you want to proceed as follows:
1. Create new Churn Survey at [app.formbricks.com](http://app.formbricks.com/) 1. Create new Churn Survey at [app.formbricks.com](https://app.formbricks.com/)
2. Set up the user action to display survey at right point in time 2. Set up the user action to display survey at right point in time
3. Choose correct recontact options to never miss a feedback 3. Choose correct recontact options to never miss a feedback
4. Prevent that churn! 4. Prevent that churn!
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? We assume that you have already installed the Formbricks Widget in your web
We assume that you have already installed the Formbricks Widget in your web app. Its required to display messages app. Its required to display messages and surveys in your app. If not, please follow the [Quick Start Guide
and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey) (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey)
</Note> </Note>
### 1. Create new Churn Survey ### 1. Create new Churn Survey
@@ -56,22 +57,22 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Churn Survey”: Click on "Create Survey" and choose the template “Churn Survey”:
<Image <MdxImage
src={CreateChurnFlow} src={CreateChurnFlow}
alt="Create churn survey by template" alt="Create churn survey by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update questions (if you like) ### 2. Update questions (if you like)
Youre free to update the question and answer options. However, based on our experience, we suggest giving the provided template a go 😊 Youre free to update the question and answer options. However, based on our experience, we suggest giving the provided template a go 😊
<Image <MdxImage
src={ChangeText} src={ChangeText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
_Want to change the button color? You can do so in the product settings._ _Want to change the button color? You can do so in the product settings._
@@ -88,29 +89,29 @@ To create the trigger for your Churn Survey, you have two options to choose from
1. **Trigger by innerText:** You likely have a “Cancel Subscription” button in your app. You can setup a user Action with the according `innerText` to trigger the survey, like so: 1. **Trigger by innerText:** You likely have a “Cancel Subscription” button in your app. You can setup a user Action with the according `innerText` to trigger the survey, like so:
<Image <MdxImage
src={TriggerInnerText} src={TriggerInnerText}
alt="Set the trigger by inner Text" alt="Set the trigger by inner Text"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
2. **Trigger by CSS Selector:** In case you have more than one button saying “Cancel Subscription” in your app and only want to display the survey when one of them is clicked, you want to be more specific. The best way to do that is to give this button the HTML `id=“cancel-subscription”` and set your user action up like so: 2. **Trigger by CSS Selector:** In case you have more than one button saying “Cancel Subscription” in your app and only want to display the survey when one of them is clicked, you want to be more specific. The best way to do that is to give this button the HTML `id=“cancel-subscription”` and set your user action up like so:
<Image <MdxImage
src={TriggerCSS} src={TriggerCSS}
alt="Set the trigger by CSS Selector" alt="Set the trigger by CSS Selector"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
3. **Trigger by pageURL:** Lastly, you could also display your survey on a subpage “/subscription-cancelled” where you forward users once they cancelled the trial subscription. You can then create a user Action with the type `pageURL` with the following settings: 3. **Trigger by pageURL:** Lastly, you could also display your survey on a subpage “/subscription-cancelled” where you forward users once they cancelled the trial subscription. You can then create a user Action with the type `pageURL` with the following settings:
<Image <MdxImage
src={TriggerPageUrl} src={TriggerPageUrl}
alt="Set the trigger by page URL" alt="Set the trigger by page URL"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Whenever a user visits this page, matches the filter conditions above and the recontact options (below) the survey will be displayed ✅ Whenever a user visits this page, matches the filter conditions above and the recontact options (below) the survey will be displayed ✅
@@ -118,47 +119,46 @@ Whenever a user visits this page, matches the filter conditions above and the re
Here is our complete [Actions manual](/docs/actions/why) covering [Code](/docs/actions/code) and [No-Code](/docs/actions/no-code) Actions. Here is our complete [Actions manual](/docs/actions/why) covering [Code](/docs/actions/code) and [No-Code](/docs/actions/no-code) Actions.
<Note> <Note>
## Pre-churn flow coming soon ## Pre-churn flow coming soon Were currently building full-screen survey pop-ups. Youll be able to prevent
Were currently building full-screen survey pop-ups. Youll be able to prevent users from closing the survey users from closing the survey unless they respond to it. Its certainly debatable if you want that but you
unless they respond to it. Its certainly debatable if you want that but you could force them to click through could force them to click through the survey before letting them cancel 🤷
the survey before letting them cancel 🤷
</Note> </Note>
### 5. Select Action in the “When to ask” card ### 5. Select Action in the “When to ask” card
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select feedback button action" alt="Select feedback button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 6. Last step: Set Recontact Options correctly ### 6. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure you milk these super valuable insights. You want to make sure that this survey is always displayed, no matter if the user has already seen a survey in the past days: Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure you milk these super valuable insights. You want to make sure that this survey is always displayed, no matter if the user has already seen a survey in the past days:
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
These settings make sure the survey is always displayed, when a user wants to Cancel their subscription. These settings make sure the survey is always displayed, when a user wants to Cancel their subscription.
### 7. Congrats! Youre ready to publish your survey 💃 ### 7. Congrats! Youre ready to publish your survey 💃
<Image <MdxImage
src={PublishSurvey} src={PublishSurvey}
alt="Publish survey" alt="Publish survey"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Churn Survey
You need to have the Formbricks Widget installed to display the Churn Survey in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### ###
@@ -1,4 +1,4 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import DocsFeedback from "@/components/docs/DocsFeedback"; import DocsFeedback from "@/components/docs/DocsFeedback";
import AddAction from "./add-action.webp"; import AddAction from "./add-action.webp";
@@ -46,7 +46,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
2. In the Menu (top right) you see that you can switch between a “Development” and a “Production” environment. These are two separate environments so your test data doesnt mess up the insights from prod. Switch to “Development”: 2. In the Menu (top right) you see that you can switch between a “Development” and a “Production” environment. These are two separate environments so your test data doesnt mess up the insights from prod. Switch to “Development”:
<Image <MdxImage
src={SwitchToDev} src={SwitchToDev}
alt="switch to dev environment" alt="switch to dev environment"
quality="100" quality="100"
@@ -55,7 +55,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
3. Then, create a survey using the template “Docs Feedback”: 3. Then, create a survey using the template “Docs Feedback”:
<Image <MdxImage
src={DocsTemplate} src={DocsTemplate}
alt="select docs template" alt="select docs template"
quality="100" quality="100"
@@ -64,7 +64,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
4. Change the Internal Question ID of the first question to **“isHelpful”** to make your life easier 😉 4. Change the Internal Question ID of the first question to **“isHelpful”** to make your life easier 😉
<Image <MdxImage
src={ChangeId} src={ChangeId}
alt="switch to dev environment" alt="switch to dev environment"
quality="100" quality="100"
@@ -80,7 +80,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
6. Click on “Continue to Settings or select the audience tab manually. Scroll down to “When to ask” and create a new Action: 6. Click on “Continue to Settings or select the audience tab manually. Scroll down to “When to ask” and create a new Action:
<Image <MdxImage
src={WhenToAsk} src={WhenToAsk}
alt="set up when to ask card" alt="set up when to ask card"
quality="100" quality="100"
@@ -89,7 +89,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
7. Our goal is to create an event that never fires. This is a bit nonsensical because it is a workaround. Stick with me 😃 Fill the action out like on the screenshot: 7. Our goal is to create an event that never fires. This is a bit nonsensical because it is a workaround. Stick with me 😃 Fill the action out like on the screenshot:
<Image <MdxImage
src={AddAction} src={AddAction}
alt="add action" alt="add action"
quality="100" quality="100"
@@ -99,7 +99,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
8. Select the Non-Event in the dropdown. Now you see that the “Publish survey” button is active. Publish your survey 🤝 8. Select the Non-Event in the dropdown. Now you see that the “Publish survey” button is active. Publish your survey 🤝
<Image <MdxImage
src={SelectNonevent} src={SelectNonevent}
alt="select nonevent" alt="select nonevent"
quality="100" quality="100"
@@ -128,7 +128,7 @@ This allows us to capture and analyze partial feedback where the user is not wil
2. Likely, you have a template file or similar which renders the navigation at the bottom of the page: 2. Likely, you have a template file or similar which renders the navigation at the bottom of the page:
<Image <MdxImage
src={DocsNavi} src={DocsNavi}
alt="doc navigation" alt="doc navigation"
quality="100" quality="100"
@@ -412,7 +412,7 @@ Before you roll it out in production, you want to test it. To do so, you need tw
When you are on the survey detail page, youll find both of them in the URL: When you are on the survey detail page, youll find both of them in the URL:
<Image src={CopyIds} alt="copy IDs" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" /> <MdxImage src={CopyIds} alt="copy IDs" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
Now, you have to replace the IDs and the API host accordingly in your `handleFeedbackSubmit`: Now, you have to replace the IDs and the API host accordingly in your `handleFeedbackSubmit`:
<Col> <Col>
@@ -1,5 +1,5 @@
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ActionCSS from "./action-css.webp"; import ActionCSS from "./action-css.webp";
import ActionText from "./action-text.webp"; import ActionText from "./action-text.webp";
@@ -11,7 +11,8 @@ import SelectAction from "./select-action.webp";
export const metadata = { export const metadata = {
title: "Setting Up Feature Chaser Surveys with Formbricks: A Comprehensive Guide", title: "Setting Up Feature Chaser Surveys with Formbricks: A Comprehensive Guide",
description: "Learn how to harness the power of Formbricks to gather targeted user feedback on specific features. Dive deep into creating, triggering, and publishing the Feature Chaser survey to enhance your product with actionable insights for specific users.", description:
"Learn how to harness the power of Formbricks to gather targeted user feedback on specific features. Dive deep into creating, triggering, and publishing the Feature Chaser survey to enhance your product with actionable insights for specific users.",
}; };
#### Best Practices #### Best Practices
@@ -38,13 +39,13 @@ Product analytics never tell you why a feature is used - and why not. Following
To run the Feature Chaser survey in your app you want to proceed as follows: To run the Feature Chaser survey in your app you want to proceed as follows:
1. Create new Feature Chaser survey at [app.formbricks.com](http://app.formbricks.com/) 1. Create new Feature Chaser survey at [app.formbricks.com](https://app.formbricks.com/)
2. Setup a user action to display survey at the right point in time 2. Setup a user action to display survey at the right point in time
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? We assume that you have already installed the Formbricks Widget in your web
We assume that you have already installed the Formbricks Widget in your web app. Its required to display messages app. Its required to display messages and surveys in your app. If not, please follow the [Quick Start Guide
and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey) (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey)
</Note> </Note>
### 1. Create new Feature Chaser ### 1. Create new Feature Chaser
@@ -53,22 +54,22 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Feature Chaser”: Click on "Create Survey" and choose the template “Feature Chaser”:
<Image <MdxImage
src={CreateSurvey} src={CreateSurvey}
alt="Create survey by template" alt="Create survey by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update questions ### 2. Update questions
The questions you want to ask are dependent on your feature and can be very specific. In the template, we suggest a high-level check on how easy it was for the user to achieve their goal. We also add an opportunity to provide context: The questions you want to ask are dependent on your feature and can be very specific. In the template, we suggest a high-level check on how easy it was for the user to achieve their goal. We also add an opportunity to provide context:
<Image <MdxImage
src={ChangeText} src={ChangeText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Save, and move over to where the magic happens: The “Audience” tab. Save, and move over to where the magic happens: The “Audience” tab.
@@ -83,52 +84,52 @@ There are two ways to track a button:
1. **Trigger by innerText:** You might have a button with a unique text at the end of your feature e.g. "Export Report". You can setup a user Action with the according `innerText` to trigger the survey, like so: 1. **Trigger by innerText:** You might have a button with a unique text at the end of your feature e.g. "Export Report". You can setup a user Action with the according `innerText` to trigger the survey, like so:
<Image <MdxImage
src={ActionText} src={ActionText}
alt="Set the trigger by inner Text" alt="Set the trigger by inner Text"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
2. **Trigger by CSS Selector:** In case you have more than one button saying “Export Report” in your app and only want to display the survey when one of them is clicked, you want to be more specific. The best way to do that is to give this button the HTML `id=“export-report-featurename”` and set your user action up like so: 2. **Trigger by CSS Selector:** In case you have more than one button saying “Export Report” in your app and only want to display the survey when one of them is clicked, you want to be more specific. The best way to do that is to give this button the HTML `id=“export-report-featurename”` and set your user action up like so:
<Image <MdxImage
src={ActionCSS} src={ActionCSS}
alt="Set the trigger by CSS Selector" alt="Set the trigger by CSS Selector"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Please follow our [Actions manual](/docs/actions/why) for an in-depth description of how Actions work. Please follow our [Actions manual](/docs/actions/why) for an in-depth description of how Actions work.
### 4. Select Action in the “When to ask” card ### 4. Select Action in the “When to ask” card
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select PMF trigger button action" alt="Select PMF trigger button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 5. Last step: Set Recontact Options correctly ### 5. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have full freedom to decide who you want to ask. Generally, you only want to ask every user once and prevent survey fatigue. It's up to you to decide if you want to ask again, when the user did not yet reply: Lastly, scroll down to “Recontact Options”. Here you have full freedom to decide who you want to ask. Generally, you only want to ask every user once and prevent survey fatigue. It's up to you to decide if you want to ask again, when the user did not yet reply:
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 7. Congrats! Youre ready to publish your survey 💃 ### 7. Congrats! Youre ready to publish your survey 💃
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={Publish} alt="Publish survey" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Feature Chaser
You need to have the Formbricks Widget installed to display the Feature Chaser in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### ###
@@ -1,6 +1,6 @@
import Link from "next/link";
import Image from "next/image";
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import { MdxImage } from "@/components/shared/MdxImage";
import Link from "next/link";
import AddAction from "./add-action.webp"; import AddAction from "./add-action.webp";
import AddCSSAction from "./add-css-action.webp"; import AddCSSAction from "./add-css-action.webp";
@@ -13,7 +13,8 @@ import RecontactOptions from "./set-recontact-options.webp";
export const metadata = { export const metadata = {
title: "Implementing the Feedback Box with Formbricks: A Step-by-Step Tutorial", title: "Implementing the Feedback Box with Formbricks: A Step-by-Step Tutorial",
description: "Unlock user insights effortlessly! Discover how to set up the Feedback Box in your app using Formbricks, allowing your users to provide real-time feedback. Follow our comprehensive guide to enhance user experience and respond rapidly to feedback", description:
"Unlock user insights effortlessly! Discover how to set up the Feedback Box in your app using Formbricks, allowing your users to provide real-time feedback. Follow our comprehensive guide to enhance user experience and respond rapidly to feedback",
}; };
#### Best Practices #### Best Practices
@@ -49,34 +50,34 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Then, create a new survey and look for the "Feedback Box" template: Then, create a new survey and look for the "Feedback Box" template:
<Image <MdxImage
src={CreateFeedbackBox} src={CreateFeedbackBox}
alt="Create feedback box by template" alt="Create feedback box by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update question content ### 2. Update question content
Change the questions and answer options according to your preference: Change the questions and answer options according to your preference:
<Image <MdxImage
src={ChangeTextContent} src={ChangeTextContent}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 3. Create user action to trigger Feedback Box: ### 3. Create user action to trigger Feedback Box:
Go to the “Audience” tab, find the “When to send” card and choose “Add Action”. We will now use our super cool No-Code User Action Tracker: Go to the “Audience” tab, find the “When to send” card and choose “Add Action”. We will now use our super cool No-Code User Action Tracker:
<Image src={AddAction} alt="Add action" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={AddAction} alt="Add action" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## You can also add actions in your code ## You can also add actions in your code You can also create [Code Actions](/docs/actions/code) using
You can also create [Code Actions](/docs/actions/code) using `formbricks.track("Eventname")` - they will automatically `formbricks.track("Eventname")` - they will automatically appear in your Actions overview as long as the SDK
appear in your Actions overview as long as the SDK is embedded. is embedded.
</Note> </Note>
We have two options to track the Feedback Button in your application: innerText and CSS-Selector: We have two options to track the Feedback Button in your application: innerText and CSS-Selector:
@@ -84,46 +85,46 @@ We have two options to track the Feedback Button in your application: innerText
1. **innerText:** This means that whenever a user clicks any HTML item in your app which has an `innerText` of `Feedback` the Feedback Box will be displayed. 1. **innerText:** This means that whenever a user clicks any HTML item in your app which has an `innerText` of `Feedback` the Feedback Box will be displayed.
2. **CSS-Selector:** This means that when an element with a specific CSS-Selector like `#feedback-button` is clicked, your Feedback Box is triggered. 2. **CSS-Selector:** This means that when an element with a specific CSS-Selector like `#feedback-button` is clicked, your Feedback Box is triggered.
<div className="grid grid-cols-2 space-x-2 max-w-full sm:max-w-3xl"> <div className="grid max-w-full grid-cols-2 space-x-2 sm:max-w-3xl">
<Image src={AddHTMLAction} alt="Add HTML action" quality="100" className="rounded-lg" /> <MdxImage src={AddHTMLAction} alt="Add HTML action" quality="100" className="rounded-lg" />
<Image src={AddCSSAction} alt="Add CSS action" quality="100" className="rounded-lg" /> <MdxImage src={AddCSSAction} alt="Add CSS action" quality="100" className="rounded-lg" />
</div> </div>
### 4. Select action in the “When to ask” card ### 4. Select action in the “When to ask” card
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select feedback button action" alt="Select feedback button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 5. Set Recontact Options correctly ### 5. Set Recontact Options correctly
Scroll down to “Recontact Options”. Here you have to choose the right settings so that the Feedback Box pops up every time the user action is performed. (Our default is that every user sees every survey only once): Scroll down to “Recontact Options”. Here you have to choose the right settings so that the Feedback Box pops up every time the user action is performed. (Our default is that every user sees every survey only once):
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 6. Youre ready publish your survey! ### 6. Youre ready publish your survey!
<Image <MdxImage
src={PublishSurvey} src={PublishSurvey}
alt="Publish survey" alt="Publish survey"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
## Setting up the Widget ## Setting up the Widget
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Feedback Box
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### &nbsp; ### &nbsp;
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

@@ -0,0 +1,115 @@
import DemoPreview from "@/components/dummyUI/DemoPreview";
import { MdxImage } from "@/components/shared/MdxImage";
import NewsletterSurveyType from "./choose-survey-type.webp";
import NewsletterSurveyEmbedCode from "./embed-survey-code-in-your-email.webp";
import NewsletterSurveyEmbedPrompt from "./embed-survey-prompt.webp";
import NewsletterSurveyEditor from "./improve-newsletter-content-editor-formbricks.webp";
import NewsletterSurvey from "./improve-newsletter-content-survey-location.webp";
export const metadata = {
title: "Measure email content quality with Formbricks",
description:
"Measuring the content quality of both transactional and marketing email is a key element for improving customer communication.",
};
#### Best Practices
# Improve Email Content
Email remains the predominant way to communicate with your customers. Measure the effectiveness to improve your offering.
## Purpose
Measuring the content quality of both transactional and marketing email is a key element for improving customer communication.
## Preview
<DemoPreview template="Improve Newsletter Content" />
## Formbricks Approach
- Embed the survey into your email so its part of the newsletter.
- Use link prefilling to store the answer users clicked on in the email.
- Dynamic user identification to append reader's email for personalized profiles and follow ups.
## Installation
To embed the newsletter survey into your email, follow these steps:
1. Create new 'Improve Newsletter Content' survey at [app.formbricks.com](https://app.formbricks.com/)
2. Select how you where you want to display the survey.
3. Copy the embed code anywhere you want in your newsletter.
### 1. Create new 'Improve Newsletter Content' Survey
If you don't have an account yet, create one at [app.formbricks.com](https://app.formbricks.com/auth/signup)
Then, create a new survey and look for the "Improve Newsletter Content" template:
<MdxImage
src={NewsletterSurvey}
alt="Create Improve Newsletter Content by template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### 2. Customize Survey questions
Customize survey questions, emojis or stars however you like:
<MdxImage
src={NewsletterSurveyEditor}
alt="Edit Improve Newsletter Content template"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### 3. Configure Survey Settings
When you are done customizing your survey questions, navigate to the Settings tab and choose the type of survey you want. You need to choose Link Survey:
<MdxImage
src={NewsletterSurveyType}
alt="Choose survey type"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### 4. Choose how you want to embed your survey
After publishing your survey, a modal that prompts you to embed your survey will pop up.
<MdxImage
src={NewsletterSurveyEmbedPrompt}
alt="Embed newsletter survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Select the Embed Survey card and you will be directed to another modal, where the first embed option displayed will be to embed the survey in an email.
### 5. Copy code to embed the survey in your newsletter
Click the button with the “View Embed Code” text at the top right corner of the modal and simply paste the HTML code for your survey anywhere you want it in your newsletter. You can see the preview in the below image:
<MdxImage
src={NewsletterSurveyEmbedCode}
alt="Embed survey code"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
And you're done! Send a test email to yourself and try it out 🤓
## Learn about data prefilling
<Note>
## How does data prefilling work? Learn about how link prefilling and user identification maximize your
insights in [this detailed
guide](/blog/how-smart-writers-use-formbricks-open-source-tool-to-measure-the-quality-of-their-newsletter-content).
</Note>
### &nbsp;
# Thats it! 🎉
@@ -1,5 +1,5 @@
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ActionText from "./action-innertext.webp"; import ActionText from "./action-innertext.webp";
import ActionPageurl from "./action-pageurl.webp"; import ActionPageurl from "./action-pageurl.webp";
@@ -11,7 +11,8 @@ import SelectAction from "./select-action.webp";
export const metadata = { export const metadata = {
title: "Boost Your Trial Conversion Rates with Formbricks: Comprehensive Guide", title: "Boost Your Trial Conversion Rates with Formbricks: Comprehensive Guide",
description: "Unlock the secret to converting more trial users into paying customers using Formbricks. Understand insights behind trial cancellations and tailor your offering to fit user needs. Dive into our step-by-step tutorial and improve your conversion strategy today", description:
"Unlock the secret to converting more trial users into paying customers using Formbricks. Understand insights behind trial cancellations and tailor your offering to fit user needs. Dive into our step-by-step tutorial and improve your conversion strategy today",
}; };
#### Best Practices #### Best Practices
@@ -37,14 +38,14 @@ The better you understand why free users dont convert to paid users, the high
To display the Trial Conversion Survey in your app you want to proceed as follows: To display the Trial Conversion Survey in your app you want to proceed as follows:
1. Create new Trial Conversion Survey at [app.formbricks.com](http://app.formbricks.com/) 1. Create new Trial Conversion Survey at [app.formbricks.com](https://app.formbricks.com/)
2. Set up the user action to display survey at right point in time 2. Set up the user action to display survey at right point in time
3. Print that 💸 3. Print that 💸
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? We assume that you have already installed the Formbricks Widget in your web
We assume that you have already installed the Formbricks Widget in your web app. Its required to display messages app. Its required to display messages and surveys in your app. If not, please follow the [Quick Start Guide
and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey) (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey)
</Note> </Note>
### 1. Create new Trial Conversion Survey ### 1. Create new Trial Conversion Survey
@@ -53,22 +54,22 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Improve Trial Conversion”: Click on "Create Survey" and choose the template “Improve Trial Conversion”:
<Image <MdxImage
src={CreateSurvey} src={CreateSurvey}
alt="Create survey by template" alt="Create survey by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update questions (if you like) ### 2. Update questions (if you like)
Youre free to update the questions and answer options. However, based on our experience, we suggest giving the provided template a go 😊 Youre free to update the questions and answer options. However, based on our experience, we suggest giving the provided template a go 😊
<Image <MdxImage
src={ChangeText} src={ChangeText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
_Want to change the button color? You can do so in the product settings!_ _Want to change the button color? You can do so in the product settings!_
@@ -78,8 +79,8 @@ Save, and move over to the “Audience” tab.
### 3. Pre-segment your audience (coming soon) ### 3. Pre-segment your audience (coming soon)
<Note> <Note>
## Filter by attribute coming soon ## Filter by attribute coming soon We're working on pre-segmenting users by attributes. We will update this
We're working on pre-segmenting users by attributes. We will update this manual in the next days. manual in the next days.
</Note> </Note>
Pre-segmentation isn't relevant for this survey because you likely want to solve all people who cancel their trial. You probably have a specific user action e.g. clicking on "Cancel Trial" you can use to only display the survey to users trialing your product. Pre-segmentation isn't relevant for this survey because you likely want to solve all people who cancel their trial. You probably have a specific user action e.g. clicking on "Cancel Trial" you can use to only display the survey to users trialing your product.
@@ -90,54 +91,54 @@ How you trigger your survey depends on your product. There are two options:
1. **Trigger by pageURL:** Lets say you have a page under “/trial-cancelled” where you forward users once they cancelled the trial subscription. You can then create an user Action with the type `pageURL` with the following settings: 1. **Trigger by pageURL:** Lets say you have a page under “/trial-cancelled” where you forward users once they cancelled the trial subscription. You can then create an user Action with the type `pageURL` with the following settings:
<Image <MdxImage
src={ActionPageurl} src={ActionPageurl}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Whenever a user visits this page, the survey will be displayed ✅ Whenever a user visits this page, the survey will be displayed ✅
2. **Trigger by Button Click:** In a different case, you have a “Cancel Trial button in your app. You can setup a user Action with the according `innerText` like so: 2. **Trigger by Button Click:** In a different case, you have a “Cancel Trial button in your app. You can setup a user Action with the according `innerText` like so:
<Image <MdxImage
src={ActionText} src={ActionText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Please have a look at our complete [Actions manual](/docs/actions/why) if you have questions. Please have a look at our complete [Actions manual](/docs/actions/why) if you have questions.
### 5. Select Action in the “When to ask” card ### 5. Select Action in the “When to ask” card
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select feedback button action" alt="Select feedback button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 6. Last step: Set Recontact Options correctly ### 6. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure you gather as many insights as possible. You want to make sure that this survey is always displayed, no matter if the user has already seen a survey in the past days: Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure you gather as many insights as possible. You want to make sure that this survey is always displayed, no matter if the user has already seen a survey in the past days:
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 7. Congrats! Youre ready to publish your survey 💃 ### 7. Congrats! Youre ready to publish your survey 💃
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={Publish} alt="Publish survey" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Feedback Box
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### ###
@@ -1,5 +1,5 @@
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ActionCSS from "./action-css.webp"; import ActionCSS from "./action-css.webp";
import ActionInner from "./action-innertext.webp"; import ActionInner from "./action-innertext.webp";
@@ -14,7 +14,8 @@ import SelectAction from "./select-action.webp";
export const metadata = { export const metadata = {
title: "Maximize User Interview Participation with In-app Interview Prompts", title: "Maximize User Interview Participation with In-app Interview Prompts",
description: "Engage with your power users seamlessly using Formbricks' In-app Interview Prompt. Ditch traditional email invites and experience way more more respondents. Dive into our comprehensive guide on setting up auto-scheduled interviews today and enhance your user understanding", description:
"Engage with your power users seamlessly using Formbricks' In-app Interview Prompt. Ditch traditional email invites and experience way more more respondents. Dive into our comprehensive guide on setting up auto-scheduled interviews today and enhance your user understanding",
}; };
#### Best Practices #### Best Practices
@@ -42,14 +43,14 @@ Product analytics and in-app surveys are incomplete without user interviews. Set
To display an Interview Prompt in your app you want to proceed as follows: To display an Interview Prompt in your app you want to proceed as follows:
1. Create new Interview Prompt at [app.formbricks.com](http://app.formbricks.com/) 1. Create new Interview Prompt at [app.formbricks.com](https://app.formbricks.com/)
2. Adjust content and settings 2. Adjust content and settings
3. Thats it! 🎉 3. Thats it! 🎉
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? We assume that you have already installed the Formbricks Widget in your web
We assume that you have already installed the Formbricks Widget in your web app. Its required to display messages app. Its required to display messages and surveys in your app. If not, please follow the [Quick Start Guide
and surveys in your app. If not, please follow the [Quick Start Guide (15mins).](/docs/getting-started/quickstart-in-app-survey) (15mins).](/docs/getting-started/quickstart-in-app-survey)
</Note> </Note>
### 1. Create new Interview Prompt ### 1. Create new Interview Prompt
@@ -58,31 +59,31 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Interview Prompt”: Click on "Create Survey" and choose the template “Interview Prompt”:
<Image <MdxImage
src={CreatePrompt} src={CreatePrompt}
alt="Create interview prompt by template" alt="Create interview prompt by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update prompt and CTA ### 2. Update prompt and CTA
Update the prompt, description and button text to match your products tonality. You can also update the button color in the Product Settings. Update the prompt, description and button text to match your products tonality. You can also update the button color in the Product Settings.
<Image <MdxImage
src={ChangeText} src={ChangeText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
In the button settings you have to make sure it is set to “External URL”. In the URL field, copy your booking link (e.g. https://cal.com/company/user-interview). If you dont have a booking link yet, head over to [cal.com](http://cal.com) and get one - they have the best free plan out there! In the button settings you have to make sure it is set to “External URL”. In the URL field, copy your booking link (e.g. https://cal.com/company/user-interview). If you dont have a booking link yet, head over to [cal.com](http://cal.com) and get one - they have the best free plan out there!
<Image <MdxImage
src={InterviewExample} src={InterviewExample}
alt="Add CSS action" alt="Add CSS action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Save, and move over to the “Audience” tab. Save, and move over to the “Audience” tab.
@@ -90,8 +91,8 @@ Save, and move over to the “Audience” tab.
### 3. Pre-segment your audience (coming soon) ### 3. Pre-segment your audience (coming soon)
<Note> <Note>
## Filter by attribute coming soon ## Filter by attribute coming soon We're working on pre-segmenting users by attributes. We will update this
We're working on pre-segmenting users by attributes. We will update this manual in the next few days. manual in the next few days.
</Note> </Note>
Once you clicked over to the “Audience” tab you can change the settings. In the **Who To Send** card, select “Filter audience by attribute”. This allows you to only show the prompt to a specific segment of your user base. Once you clicked over to the “Audience” tab you can change the settings. In the **Who To Send** card, select “Filter audience by attribute”. This allows you to only show the prompt to a specific segment of your user base.
@@ -104,65 +105,70 @@ Great, now only the “Power User” segment will see our Interview Prompt. But
To create the trigger to show your Interview Prompt, go to the “Audience” tab, find the “When to send” card and choose “Add Action”. We will now use our super cool No-Code User Action Tracker: To create the trigger to show your Interview Prompt, go to the “Audience” tab, find the “When to send” card and choose “Add Action”. We will now use our super cool No-Code User Action Tracker:
<Image src={AddAction} alt="Add action" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={AddAction} alt="Add action" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## You can also add actions in your code ## You can also add actions in your code You can also create [Code Actions](/docs/actions/code) using
You can also create [Code Actions](/docs/actions/code) using `formbricks.track("Eventname")` - they will automatically `formbricks.track("Eventname")` - they will automatically appear in your Actions overview as long as the SDK
appear in your Actions overview as long as the SDK is embedded. is embedded.
</Note> </Note>
Generally, we have two types of user actions: Page views and clicks. The Interview Prompt, youll likely want to display it on a page visit since you already filter who sees the prompt by attributes. Generally, we have two types of user actions: Page views and clicks. The Interview Prompt, youll likely want to display it on a page visit since you already filter who sees the prompt by attributes.
1. **pageURL:** Whenever a user visits a page the survey will be displayed, as long as the other conditions match. Other conditions are pre-segmentation, if this user has seen a survey in the past 2 weeks, etc. 1. **pageURL:** Whenever a user visits a page the survey will be displayed, as long as the other conditions match. Other conditions are pre-segmentation, if this user has seen a survey in the past 2 weeks, etc.
<Image <MdxImage
src={ActionPageurl} src={ActionPageurl}
alt="Add page URL action" alt="Add page URL action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
2. **innerText & CSS-Selector:** When a user clicks an element (like a button) with a specific text content or CSS selector, the prompt will be displayed as long as the other conditions also match. 2. **innerText & CSS-Selector:** When a user clicks an element (like a button) with a specific text content or CSS selector, the prompt will be displayed as long as the other conditions also match.
<div className="flex max-w-full flex-col sm:max-w-3xl lg:gap-1"> <div className="flex max-w-full flex-col sm:max-w-3xl lg:gap-1">
<Image src={ActionCSS} alt="Add CSS action" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage
<Image src={ActionCSS}
alt="Add CSS action"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<MdxImage
src={ActionInner} src={ActionInner}
alt="Add inner text action" alt="Add inner text action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
</div> </div>
### 5. Select action in the “When to ask” card ### 5. Select action in the “When to ask” card
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select feedback button action" alt="Select feedback button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 6. Set Recontact Options correctly ### 6. Set Recontact Options correctly
Scroll down to “Recontact Options”. Here you have to choose the correct settings to strike the right balance between asking for user feedback and preventing survey fatigue. Your settings also depend on the size of your user base or segment. If you e.g. have thousands of “Power Users” you can easily afford to only display the prompt once. If you have a smaller user base you might want to ask twice to get a sufficient amount of bookings: Scroll down to “Recontact Options”. Here you have to choose the correct settings to strike the right balance between asking for user feedback and preventing survey fatigue. Your settings also depend on the size of your user base or segment. If you e.g. have thousands of “Power Users” you can easily afford to only display the prompt once. If you have a smaller user base you might want to ask twice to get a sufficient amount of bookings:
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 7. Congrats! Youre ready to publish your survey 💃 🤸 ### 7. Congrats! Youre ready to publish your survey 💃 🤸
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={Publish} alt="Publish survey" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Feedback Box
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### ###
@@ -1,5 +1,5 @@
import DemoPreview from "@/components/dummyUI/DemoPreview"; import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ActionCSS from "./action-css.webp"; import ActionCSS from "./action-css.webp";
import ActionPageurl from "./action-pageurl.webp"; import ActionPageurl from "./action-pageurl.webp";
@@ -11,7 +11,8 @@ import SelectAction from "./select-action.webp";
export const metadata = { export const metadata = {
title: "How to Set Up a Product-Market Fit Survey Using Formbricks - Step-by-Step Guide", title: "How to Set Up a Product-Market Fit Survey Using Formbricks - Step-by-Step Guide",
description: "Learn to leverage Formbricks to create and implement a Product-Market Fit survey in your web app. Follow our detailed step-by-step guide to measure and understand your PMF effectively. Ensure high data quality, efficient triggers, and actionable insights.", description:
"Learn to leverage Formbricks to create and implement a Product-Market Fit survey in your web app. Follow our detailed step-by-step guide to measure and understand your PMF effectively. Ensure high data quality, efficient triggers, and actionable insights.",
}; };
#### Best Practices #### Best Practices
@@ -36,14 +37,14 @@ Measuring and understanding your PMF is essential to build a large, successful b
To display the Product-Market Fit survey in your app you want to proceed as follows: To display the Product-Market Fit survey in your app you want to proceed as follows:
1. Create new Product-Market Fit survey at [app.formbricks.com](http://app.formbricks.com/) 1. Create new Product-Market Fit survey at [app.formbricks.com](https://app.formbricks.com/)
2. Setup pre-segmentation to assure high data quality 2. Setup pre-segmentation to assure high data quality
3. Setup the user action to display survey at good point in time 3. Setup the user action to display survey at good point in time
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? We assume that you have already installed the Formbricks Widget in your web
We assume that you have already installed the Formbricks Widget in your web app. Its required to display messages app. Its required to display messages and surveys in your app. If not, please follow the [Quick Start Guide
and surveys in your app. If not, please follow the [Quick Start Guide (15mins).](/docs/getting-started/quickstart-in-app-survey) (15mins).](/docs/getting-started/quickstart-in-app-survey)
</Note> </Note>
### 1. Create new PMF survey ### 1. Create new PMF survey
@@ -52,22 +53,22 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose one of the PMF survey templates. The first one is rather short, the latter builds on the ["Product-Market Fit Engine"](https://review.firstround.com/how-superhuman-built-an-engine-to-find-product-market-fit) developed by Superhuman: Click on "Create Survey" and choose one of the PMF survey templates. The first one is rather short, the latter builds on the ["Product-Market Fit Engine"](https://review.firstround.com/how-superhuman-built-an-engine-to-find-product-market-fit) developed by Superhuman:
<Image <MdxImage
src={CreateSurvey} src={CreateSurvey}
alt="Create survey by template" alt="Create survey by template"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 2. Update questions (if you like) ### 2. Update questions (if you like)
Youre free to update the question and answer options. However, based on our experience, we suggest giving the provided template a go 😊 Here is a very [detailed description](https://coda.io/@rahulvohra/superhuman-product-market-fit-engine) of what to do with the data youre collecting. Youre free to update the question and answer options. However, based on our experience, we suggest giving the provided template a go 😊 Here is a very [detailed description](https://coda.io/@rahulvohra/superhuman-product-market-fit-engine) of what to do with the data youre collecting.
<Image <MdxImage
src={ChangeText} src={ChangeText}
alt="Change text content" alt="Change text content"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
_Want to change the button color? You can do so in the product settings!_ _Want to change the button color? You can do so in the product settings!_
@@ -77,8 +78,8 @@ Save, and move over to where the magic happens: The “Audience” tab.
### 3. Pre-segment your audience (coming soon) ### 3. Pre-segment your audience (coming soon)
<Note> <Note>
## Filter by attribute coming soon ## Filter by attribute coming soon We're working on pre-segmenting users by attributes. We will update this
We're working on pre-segmenting users by attributes. We will update this manual in the next days. manual in the next days.
</Note> </Note>
To run this survey properly, you should pre-segment your user base. As touched upon earlier: if you ask every user youll get lots of opinions which are often misleading. You only want to gather feedback from people who invested the time to get to know and use your product: To run this survey properly, you should pre-segment your user base. As touched upon earlier: if you ask every user youll get lots of opinions which are often misleading. You only want to gather feedback from people who invested the time to get to know and use your product:
@@ -96,45 +97,51 @@ This way you make sure that you separate potentially misleading opinions from va
### 4. Set up a trigger for the Product-Market Fit survey: ### 4. Set up a trigger for the Product-Market Fit survey:
You need a trigger to display the survey but in this case, the filtering does all the work. Its up to you to decide to display the survey after the user viewed a specific subpage (pageURL) or after clicking an element. Have a look at the [Actions manual](/docs/actions/why) if you are not sure how to set them up: You need a trigger to display the survey but in this case, the filtering does all the work. Its up to you to decide to display the survey after the user viewed a specific subpage (pageURL) or after clicking an element. Have a look at the [Actions manual](/docs/actions/why) if you are not sure how to set them up:
<Col> <Col>
<div> <div>
<Image src={ActionCSS} alt="Add CSS action" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage
<Image src={ActionCSS}
src={ActionPageurl} alt="Add CSS action"
alt="Add inner text action" quality="100"
quality="100" className="max-w-full rounded-lg sm:max-w-3xl"
className="rounded-lg max-w-full sm:max-w-3xl" />
/> <MdxImage
</div> src={ActionPageurl}
alt="Add inner text action"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
</div>
</Col> </Col>
### 5. Select Action in the “When to ask” card ### 5. Select Action in the “When to ask” card
<Col> <Col>
<Image <MdxImage
src={SelectAction} src={SelectAction}
alt="Select PMF trigger button action" alt="Select PMF trigger button action"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
</Col> </Col>
### 6. Last step: Set Recontact Options correctly ### 6. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure your data remains of high quality. You want to make sure that this survey is only responded to once per user. It is up to you to decide if you want to display it several times until the user responds: Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure your data remains of high quality. You want to make sure that this survey is only responded to once per user. It is up to you to decide if you want to display it several times until the user responds:
<Image <MdxImage
src={RecontactOptions} src={RecontactOptions}
alt="Set recontact options" alt="Set recontact options"
quality="100" quality="100"
className="rounded-lg max-w-full sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
### 7. Congrats! Youre ready to publish your survey 💃 ### 7. Congrats! Youre ready to publish your survey 💃
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" /> <MdxImage src={Publish} alt="Publish survey" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
<Note> <Note>
## Formbricks Widget running? ## Formbricks Widget running? You need to have the Formbricks Widget installed to display the Feedback Box
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this in your app. Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey)
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget. to install the widget.
</Note> </Note>
### ###
@@ -1,4 +1,5 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import UnstableCache from "./unstable-cache-documentation.webp"; import UnstableCache from "./unstable-cache-documentation.webp";
export const metadata = { export const metadata = {
@@ -209,6 +210,7 @@ We will rewrite the function `getApiKey` we created in the `service.ts` file to
```ts ```ts
import { unstable_cache } from "next/cache"; import { unstable_cache } from "next/cache";
import { SERVICES_REVALIDATION_INTERVAL } from "../constants"; import { SERVICES_REVALIDATION_INTERVAL } from "../constants";
import { apiKeyCache } from "./cache"; import { apiKeyCache } from "./cache";
@@ -252,7 +254,7 @@ _Breakdown of the above code._
In the above code we only introduce something new called `unstable_cache`, read more about it [here](https://nextjs.org/docs/app/api-reference/functions/unstable_cache#parameters). In a nutshell these are its parameters: In the above code we only introduce something new called `unstable_cache`, read more about it [here](https://nextjs.org/docs/app/api-reference/functions/unstable_cache#parameters). In a nutshell these are its parameters:
<Image <MdxImage
src={UnstableCache} src={UnstableCache}
alt="Unstable Cache Parameters" alt="Unstable Cache Parameters"
quality="100" quality="100"
@@ -1,4 +1,4 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import DemoApp from "./demoapp.webp"; import DemoApp from "./demoapp.webp";
@@ -14,7 +14,7 @@ export const metadata = {
To play around with the in-app [User Actions](/docs/actions/why), you can use the Demo App. It's a simple React app that you can run locally and use to trigger actions and set [Attributes](/docs/attributes/why). To play around with the in-app [User Actions](/docs/actions/why), you can use the Demo App. It's a simple React app that you can run locally and use to trigger actions and set [Attributes](/docs/attributes/why).
<Image src={DemoApp} alt="Demo App Preview" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" /> <MdxImage src={DemoApp} alt="Demo App Preview" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
## Functionality ## Functionality
@@ -1,4 +1,5 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import CorsHandling from "./cors-handling-in-api.webp"; import CorsHandling from "./cors-handling-in-api.webp";
export const metadata = { export const metadata = {
@@ -25,7 +26,7 @@ Thank you for choosing to contribute to Formbricks. Before you start, please fam
- Constants should be in the packages folder - Constants should be in the packages folder
- Types should be in the packages folder - Types should be in the packages folder
- How we handle Pull Requests - How we handle Pull Requests
- Read environment variables from `.env.mjs` - Read server-side environment variables from `constants.ts`
--- ---
@@ -64,7 +65,7 @@ Please keep the following in mind:
- When dealing with Management APIs always make sure to require authentication via API keys and a sufficient authorization check. - When dealing with Management APIs always make sure to require authentication via API keys and a sufficient authorization check.
- Make sure to handle CORS requests in any new Client API endpoint you create as these are called from the browser in link surveys or `formbricks-js`. Example below: - Make sure to handle CORS requests in any new Client API endpoint you create as these are called from the browser in link surveys or `formbricks-js`. Example below:
<Image <MdxImage
src={CorsHandling} src={CorsHandling}
alt="Cors handling within an API" alt="Cors handling within an API"
quality="100" quality="100"
@@ -83,9 +84,9 @@ You should store constants in `packages/lib/constants`
You should store type in `packages/types` You should store type in `packages/types`
## Read environment variables from `.env.mjs` ## Read server-side environment variables from `constants.ts`
Environment variables (`process.env`) shouldnt be accessed directly but be added in the `.env.mjs` and should be accessed from here. This practice helps us ensure that the variables are typesafe. Server-side environment variables (`process.env`) shouldnt be accessed directly but included into the `constants.ts` file and read from there. This way we can assure they are used only on the server side and are also type-safe.
## How we handle Pull Requests ## How we handle Pull Requests
@@ -42,6 +42,4 @@ If you are at all unsure, just raise it as an enhancement issue first and tell u
To be able to keep working on Formbricks over the coming years, we need to collect a CLA from all relevant contributors. To be able to keep working on Formbricks over the coming years, we need to collect a CLA from all relevant contributors.
Please note that we can only get your contribution merged when we have a CLA signed by you. Once you open a PR, you will get a message from the CLA bot to fill out the form. Please note that we can only get your contribution merged when we have a CLA signed by you.
To access the CLA form, please click [here](https://formbricks.com/clmyhzfrymr4ko00hycsg1tvx)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

@@ -1,4 +1,4 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import GitpodAuth from "./gitpod/auth.webp"; import GitpodAuth from "./gitpod/auth.webp";
import GitpodNewWorkspace from "./gitpod/new-workspace.webp"; import GitpodNewWorkspace from "./gitpod/new-workspace.webp";
@@ -6,12 +6,9 @@ import GitpodPorts from "./gitpod/ports.webp";
import GitpodPreparing from "./gitpod/preparing.webp"; import GitpodPreparing from "./gitpod/preparing.webp";
import GitpodRunning from "./gitpod/running.webp"; import GitpodRunning from "./gitpod/running.webp";
import GithubCodespaceEnvFile from "./github-codespaces/env.webp";
import GithubCodespaceLoading from "./github-codespaces/loading.webp"; import GithubCodespaceLoading from "./github-codespaces/loading.webp";
import GithubCodespaceNew from "./github-codespaces/new.webp"; import GithubCodespaceNew from "./github-codespaces/new.webp";
import GithubCodespacePorts from "./github-codespaces/ports.webp"; import GithubCodespacePorts from "./github-codespaces/ports.webp";
import GithubCodespaceRun from "./github-codespaces/run.webp";
import GithubCodespaceTerminal from "./github-codespaces/terminal.webp";
export const metadata = { export const metadata = {
title: "Formbricks Development Setup: Complete Guide to Local Environment Configuration for Dev", title: "Formbricks Development Setup: Complete Guide to Local Environment Configuration for Dev",
@@ -38,7 +35,7 @@ This will open a fully configured workspace in your browser with all the necessa
### [Github Codespaces](#Github-codespaces) ### [Github Codespaces](#Github-codespaces)
This will open a Github VSCode Interface on the cloud for you. This setup will have the Formbricks codebase and all the dependencies installed. Click the button below to configure your instance and open the project in Github Codespaces. For a detailed guide, visit the [Github Codespaces Setup Guide](#github-codespaces-guide) section below. This will open a Github VSCode Interface on the cloud for you. This setup will have the Formbricks codebase, all the dependencies installed & Formbricks running. Click the button below to configure your instance and open the project in Github Codespaces. For a detailed guide, visit the [Github Codespaces Setup Guide](#github-codespaces-guide) section below.
[![Open in Github Codespaces](https://img.shields.io/badge/Open%20in-Github%20Codespaces-blue?logo=Github)](https://Github.com/codespaces/new?machine=standardLinux32gb&repo=500289888&ref=main&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs2) [![Open in Github Codespaces](https://img.shields.io/badge/Open%20in-Github%20Codespaces-blue?logo=Github)](https://Github.com/codespaces/new?machine=standardLinux32gb&repo=500289888&ref=main&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs2)
@@ -66,7 +63,7 @@ This will install the Formbricks codebase and all the dependencies on your local
1. Wait for the web and demo apps to launch on Gitpod. This automatically opens the `apps/demo/.env` file. Utilize dynamic localhost URLs (e.g., `localhost:3000` for signup and `localhost:8025` for email confirmation) to configure `NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID`. After creating your account and finding the `ID` in the URL at `localhost:3000`, replace `YOUR_ENVIRONMENT_ID` in the `.env` file located in `app/demo`. 1. Wait for the web and demo apps to launch on Gitpod. This automatically opens the `apps/demo/.env` file. Utilize dynamic localhost URLs (e.g., `localhost:3000` for signup and `localhost:8025` for email confirmation) to configure `NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID`. After creating your account and finding the `ID` in the URL at `localhost:3000`, replace `YOUR_ENVIRONMENT_ID` in the `.env` file located in `app/demo`.
**Web Component Initialization:** **Web Component Initialization:**
- we initialize the @formbricks/web component during prebuilds. This involves: - We initialize the @formbricks/web component during prebuilds. This involves:
1. Installing build dependencies for the `@formbricks/web#go` task from turbo.json in prebuilds to save time. 1. Installing build dependencies for the `@formbricks/web#go` task from turbo.json in prebuilds to save time.
2. Starting PostgreSQL and Mailhog containers for running migrations in prebuilds. 2. Starting PostgreSQL and Mailhog containers for running migrations in prebuilds.
3. To prevent the "Init" task from running indefinitely due to prebuild rules, a cleanup `docker compose down` step i.e. `db:down` is added to `turbo.json`. This step is designed to halt the execution of containers that are currently running. 3. To prevent the "Init" task from running indefinitely due to prebuild rules, a cleanup `docker compose down` step i.e. `db:down` is added to `turbo.json`. This step is designed to halt the execution of containers that are currently running.
@@ -96,13 +93,18 @@ After clicking the one-click setup button, Gitpod will open a new tab or window.
### 2. Authorizing in Gitpod ### 2. Authorizing in Gitpod
<Image src={GitpodAuth} alt="Gitpod Auth Page" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />- <MdxImage
This is the Gitpod Authentication Page. It appears when you click the "Open in GitPod" button and Gitpod needs src={GitpodAuth}
alt="Gitpod Auth Page"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- This is the Gitpod Authentication Page. It appears when you click the "Open in GitPod" button and Gitpod needs
to authenticate your access to the workspace. Click on 'Continue With Github' to authorize your GitPod session. to authenticate your access to the workspace. Click on 'Continue With Github' to authorize your GitPod session.
### 3. Creating a New Workspace ### 3. Creating a New Workspace
<Image <MdxImage
src={GitpodNewWorkspace} src={GitpodNewWorkspace}
alt="Gitpod New workspace Page" alt="Gitpod New workspace Page"
quality="100" quality="100"
@@ -116,7 +118,7 @@ and follow the prompts to authorize the integration. 2. Change the `WEBAPP_URL`
### 4. Gitpod preparing the created Workspace ### 4. Gitpod preparing the created Workspace
<Image <MdxImage
src={GitpodPreparing} src={GitpodPreparing}
alt="Gitpod Preparing workspace Page" alt="Gitpod Preparing workspace Page"
quality="100" quality="100"
@@ -127,7 +129,7 @@ page while Gitpod sets up your development environment.
### 5. Gitpod running the Workspace ### 5. Gitpod running the Workspace
<Image <MdxImage
src={GitpodRunning} src={GitpodRunning}
alt="Gitpod Running Workspace Page" alt="Gitpod Running Workspace Page"
quality="100" quality="100"
@@ -162,7 +164,7 @@ Here are the ports and corresponding URLs for the services within your Gitpod en
- **Port 1025**: - **Port 1025**:
- **Service**: SMPT server - **Service**: SMTP server
- **Description**: SMTP Server for sending and receiving email messages. This server is responsible for handling email communication. - **Description**: SMTP Server for sending and receiving email messages. This server is responsible for handling email communication.
- **Port 8025**: - **Port 8025**:
@@ -192,7 +194,7 @@ Here are the ports and corresponding URLs for the services within your Gitpod en
{" "} {" "}
<Image <MdxImage
src={GitpodPorts} src={GitpodPorts}
alt="Gitpod Ports tab" alt="Gitpod Ports tab"
quality="100" quality="100"
@@ -207,7 +209,7 @@ These URLs and port numbers represent various services and endpoints within your
1. After clicking the one-click setup button, you will be redirected to the Github Codespaces page. Review the configuration and click on the 'Create Codespace' button to create a new Codespace. 1. After clicking the one-click setup button, you will be redirected to the Github Codespaces page. Review the configuration and click on the 'Create Codespace' button to create a new Codespace.
<Image <MdxImage
src={GithubCodespaceNew} src={GithubCodespaceNew}
alt="New Github Codespace" alt="New Github Codespace"
quality="100" quality="100"
@@ -216,7 +218,7 @@ These URLs and port numbers represent various services and endpoints within your
2. This will start loading the Codespace. Keep in mind this might take a few minutes to complete depending on your internet connection and the instance availability. 2. This will start loading the Codespace. Keep in mind this might take a few minutes to complete depending on your internet connection and the instance availability.
<Image <MdxImage
src={GithubCodespaceLoading} src={GithubCodespaceLoading}
alt="Loading Github Codespace" alt="Loading Github Codespace"
quality="100" quality="100"
@@ -225,44 +227,7 @@ These URLs and port numbers represent various services and endpoints within your
3. Once the Codespace is loaded, you will be redirected to the VSCode editor. You can start working on your project in this environment. 3. Once the Codespace is loaded, you will be redirected to the VSCode editor. You can start working on your project in this environment.
4. Make the changes you want to, and now, to run the app, we first need to configure the .env file. Copy the .env.example and edit the variables as mentioned in the file itself. 4. Monitor the logs in the terminal and once you see the following, you are good to go!
<Image
src={GithubCodespaceEnvFile}
alt="Github Codespace Env File"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
5. Once you have configured the .env, it's now time to run the app and see the changes. Lets open the terminal first
<Image
src={GithubCodespaceTerminal}
alt="Github Codespace Open Terminal"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
6. Now, run the following command to run the app
<Col>
<CodeGroup title="Run the entire Formbricks Stack">
```bash
pnpm dev
```
</CodeGroup>
</Col>
<Image
src={GithubCodespaceRun}
alt="Run on Github Codespace"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
7. Monitor the logs in the terminal and once you see the following, you are good to go!
<Col> <Col>
<CodeGroup title="The WebApp is running"> <CodeGroup title="The WebApp is running">
@@ -280,9 +245,9 @@ pnpm dev
</CodeGroup> </CodeGroup>
</Col> </Col>
8. Right next to the Terminal, you will see a **Ports** tab, click on it to see the ports and their respective URLs. Now access the Forwarded Address for port 3000 and you should be able to visit your Formbricks App! 5. Right next to the Terminal, you will see a **Ports** tab, click on it to see the ports and their respective URLs. Now access the Forwarded Address for port 3000 and you should be able to visit your Formbricks App!
<Image <MdxImage
src={GithubCodespacePorts} src={GithubCodespacePorts}
alt="Github Codespace Ports" alt="Github Codespace Ports"
quality="100" quality="100"
@@ -344,7 +309,7 @@ cp .env.example .env
</CodeGroup> </CodeGroup>
</Col> </Col>
4. Generate & set some secret values mandatory for the ENCRYPTION_KEY & NEXTAUTH_SECRET in the .env file. You can use the following command to generate the random string of required length: 4. Generate & set some secret values mandatory for the `ENCRYPTION_KEY` & `NEXTAUTH_SECRET` in the .env file. You can use the following command to generate the random string of required length:
<Col> <Col>
<CodeGroup title="Set value of ENCRYPTION_KEY"> <CodeGroup title="Set value of ENCRYPTION_KEY">
@@ -370,11 +335,17 @@ pnpm go
</Col> </Col>
This starts the Formbricks main app (plus all its dependencies) as well as the following services using Docker: This starts the Formbricks main app (plus all its dependencies) as well as the following services using Docker:
- a `postgres` container for hosting your database, - A `postgres` container for hosting your database,
- a `mailhog` container that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host's `localhost:8025`) - A `mailhog` container that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host's `localhost:8025`)
- Demo App at [http://localhost:3002](http://localhost:3002) - Demo App at [http://localhost:3002](http://localhost:3002)
- Landing Page at [http://localhost:3001](http://localhost:3001) - Landing Page at [http://localhost:3001](http://localhost:3001)
<Note>
**WSL2 users**: If you encounter connection issues with Prisma, ensure your WSL2 instance's PostgreSQL
service is stopped before running `pnpm go`. Use the command `sudo systemctl stop postgresql` to stop the
service.
</Note>
**You can now access the Formbricks app on [http://localhost:3000](http://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of formbricks, create a new account. **You can now access the Formbricks app on [http://localhost:3000](http://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of formbricks, create a new account.
{" "} {" "}
@@ -401,4 +372,4 @@ pnpm build
--- ---
Still cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts)! Cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts)!
@@ -1,8 +1,8 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ClearAppData from "./clear-app-data.webp"; import ClearAppData from "./clear-app-data.webp";
import UncaughtPromise from "./uncaught-promise.webp";
import Logout from "./logout.webp"; import Logout from "./logout.webp";
import UncaughtPromise from "./uncaught-promise.webp";
export const metadata = { export const metadata = {
title: "Formbricks Troubleshooting Guide: How to Solve & Debug Common Issues", title: "Formbricks Troubleshooting Guide: How to Solve & Debug Common Issues",
@@ -20,7 +20,7 @@ Here you'll find help with frequently recurring problems
This can happen but fear not, the fix is easy: Delete the application storage of your browser and reload the page. This will force the app to re-fetch the data from the server: This can happen but fear not, the fix is easy: Delete the application storage of your browser and reload the page. This will force the app to re-fetch the data from the server:
<Image <MdxImage
src={ClearAppData} src={ClearAppData}
alt="Demo App Preview" alt="Demo App Preview"
quality="100" quality="100"
@@ -34,6 +34,7 @@ If nothing helps, run `pnpm clean` and then `pnpm i` again. This solves a lot.
## "I get a full-screen error with cryptic strings" ## "I get a full-screen error with cryptic strings"
This usually happens when the Formbricks Widget wasn't correctly or completely built. This usually happens when the Formbricks Widget wasn't correctly or completely built.
<Col> <Col>
<CodeGroup title="Build js library first and then run again"> <CodeGroup title="Build js library first and then run again">
@@ -49,6 +50,7 @@ pnpm dev
## My machine struggles with the repository ## My machine struggles with the repository
Since we're working with a monorepo structure, the repository can get quite big. If you're having trouble working with the repository, try the following: Since we're working with a monorepo structure, the repository can get quite big. If you're having trouble working with the repository, try the following:
<Col> <Col>
<CodeGroup title="Only run the required project"> <CodeGroup title="Only run the required project">
@@ -70,7 +72,7 @@ However, in our experience it's better to run `pnpm dev` than having two termina
## Uncaught (in promise) SyntaxError: Unexpected token !DOCTYPE ... is not valid JSON ## Uncaught (in promise) SyntaxError: Unexpected token !DOCTYPE ... is not valid JSON
<Image <MdxImage
src={UncaughtPromise} src={UncaughtPromise}
alt="Uncaught promise" alt="Uncaught promise"
quality="100" quality="100"
@@ -79,4 +81,4 @@ However, in our experience it's better to run `pnpm dev` than having two termina
This happens when you're using the Demo App and delete the Person within the Formbricks app which the widget is currently connected with. We're fixing it, but you can also just logout your test person and reload the page to get rid of it. This happens when you're using the Demo App and delete the Person within the Formbricks app which the widget is currently connected with. We're fixing it, but you can also just logout your test person and reload the page to get rid of it.
<Image src={Logout} alt="Logout Person" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" /> <MdxImage src={Logout} alt="Logout Person" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />
@@ -1,9 +1,10 @@
import { Libraries } from "@/components/docs/Libraries"; import { Libraries } from "@/components/docs/Libraries";
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import SetupChecklist from "./env-id.webp"; import SetupChecklist from "./env-id.webp";
import WidgetNotConnected from "./widget-not-connected.webp";
import WidgetConnected from "./widget-connected.webp";
import ReactApp from "./react-in-app-survey-app-popup-form.webp"; import ReactApp from "./react-in-app-survey-app-popup-form.webp";
import WidgetConnected from "./widget-connected.webp";
import WidgetNotConnected from "./widget-not-connected.webp";
export const metadata = { export const metadata = {
title: "Integrate Formbricks: Comprehensive Framework Guide & Integration Tutorial", title: "Integrate Formbricks: Comprehensive Framework Guide & Integration Tutorial",
@@ -27,7 +28,7 @@ Before getting started, make sure you have:
1. A web application in your desired framework is set up and running. 1. A web application in your desired framework is set up and running.
2. A Formbricks account with access to your environment ID and API host. You can find these in the **Setup Checklist** in the Settings: 2. A Formbricks account with access to your environment ID and API host. You can find these in the **Setup Checklist** in the Settings:
<Image <MdxImage
src={SetupChecklist} src={SetupChecklist}
alt="Step 2 - Setup Checklist" alt="Step 2 - Setup Checklist"
quality="100" quality="100"
@@ -45,13 +46,13 @@ All you need to do is copy a `<script>` tag to your HTML head, and thats abou
```html {{ title: 'index.html' }} ```html {{ title: 'index.html' }}
<!-- START Formbricks Surveys --> <!-- START Formbricks Surveys -->
<script type="text/javascript"> <script type="text/javascript">
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.4.0/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}(); !function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.6.0/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}();
</script> </script>
<!-- END Formbricks Surveys --> <!-- END Formbricks Surveys -->
``` ```
</CodeGroup> </CodeGroup>
</Col> </Col>
### Required Customizations to be Made ### Required customizations to be made
<Properties> <Properties>
<Property name="environment-id" type="string"> <Property name="environment-id" type="string">
@@ -75,7 +76,7 @@ Install the Formbricks SDK using one of the package managers ie `npm`,`pnpm`,`ya
<Col> <Col>
<CodeGroup title="Install Formbricks JS library"> <CodeGroup title="Install Formbricks JS library">
```shell {{ title: 'npm' }} ```shell {{ title: 'npm' }}
npm install --save @formbricks/js npm install @formbricks/js
``` ```
```shell {{ title: 'pnpm' }} ```shell {{ title: 'pnpm' }}
pnpm add @formbricks/js pnpm add @formbricks/js
@@ -98,7 +99,6 @@ if (typeof window !== "undefined") {
formbricks.init({ formbricks.init({
environmentId: "<environment-id>", environmentId: "<environment-id>",
apiHost: "<api-host>", apiHost: "<api-host>",
debug: true, // remove when in production
}); });
} }
@@ -111,7 +111,7 @@ export default App;
</CodeGroup> </CodeGroup>
</Col> </Col>
### Required Customizations to be Made ### Required customizations to be made
<Properties> <Properties>
<Property name="environment-id" type="string"> <Property name="environment-id" type="string">
@@ -128,9 +128,9 @@ export default App;
The app initializes 'formbricks' when it's loaded in a browser environment (due to the typeof window !== "undefined" check) and then renders your components or content. The app initializes 'formbricks' when it's loaded in a browser environment (due to the typeof window !== "undefined" check) and then renders your components or content.
<Image <MdxImage
src={ReactApp} src={ReactApp}
alt="In app survey in React app for micro surveys" alt="In-app survey in React app for micro surveys"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -153,7 +153,7 @@ Code snippets for the integration for both conventions are provided to further a
<Col> <Col>
<CodeGroup title="Install Formbricks JS library"> <CodeGroup title="Install Formbricks JS library">
```shell {{ title: 'npm' }} ```shell {{ title: 'npm' }}
npm install --save @formbricks/js npm install @formbricks/js
``` ```
```shell {{ title: 'pnpm' }} ```shell {{ title: 'pnpm' }}
pnpm add @formbricks/js pnpm add @formbricks/js
@@ -181,7 +181,6 @@ useEffect(() => {
formbricks.init({ formbricks.init({
environmentId: "<environment-id>", environmentId: "<environment-id>",
apiHost: "<api-host>", apiHost: "<api-host>",
debug: true, // remove when in production
}); });
}, []); }, []);
@@ -222,15 +221,15 @@ Refer to our [Example NextJS App Directory project](https://github.com/formbrick
```tsx {{ title: 'Typescript' }} ```tsx {{ title: 'Typescript' }}
// other import // other import
import formbricks from "@formbricks/js";
import { useEffect } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect } from "react";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
formbricks.init({ formbricks.init({
environmentId: "<environment-id>", environmentId: "<environment-id>",
apiHost: "<api-host>", apiHost: "<api-host>",
debug: true, // remove when in production
}); });
} }
@@ -254,7 +253,7 @@ export default function App({ Component, pageProps }: AppProps) {
</Col> </Col>
Refer to our [Example NextJS Pages Directory project](https://github.com/formbricks/examples/tree/main/nextjs-pages) for more help! Refer to our [Example NextJS Pages Directory project](https://github.com/formbricks/examples/tree/main/nextjs-pages) for more help!
### Required Customizations to be Made ### Required customizations to be made
<Properties> <Properties>
<Property name="environment-id" type="string"> <Property name="environment-id" type="string">
@@ -267,14 +266,6 @@ Refer to our [Example NextJS Pages Directory project](https://github.com/formbri
</Property> </Property>
</Properties> </Properties>
### Optional Customizations to be Made
<Properties>
<Property name="debug" type="boolean">
Whether you want to see debug messages from Formbricks on your client-side console.
</Property>
</Properties>
### What are we doing here? ### What are we doing here?
First we need to initialize the Formbricks SDK, making sure it only runs on the client side. First we need to initialize the Formbricks SDK, making sure it only runs on the client side.
@@ -292,7 +283,7 @@ We will make sure the SDK is only loaded and used on the client side, as it's no
<Col> <Col>
<CodeGroup title="Install Formbricks JS library"> <CodeGroup title="Install Formbricks JS library">
```shell {{ title: 'npm' }} ```shell {{ title: 'npm' }}
npm install --save @formbricks/js npm install @formbricks/js
```` ````
```shell {{ title: 'pnpm' }} ```shell {{ title: 'pnpm' }}
@@ -343,7 +334,7 @@ router.afterEach((to, from) => {
</CodeGroup> </CodeGroup>
</Col> </Col>
### Required Customizations to be Made ### Required customizations to be made
<Properties> <Properties>
<Property name="environment-id" type="string"> <Property name="environment-id" type="string">
@@ -356,21 +347,13 @@ router.afterEach((to, from) => {
</Property> </Property>
</Properties> </Properties>
### Optional Customizations to be Made
<Properties>
<Property name="debug" type="boolean">
Whether you want to see debug messages from Formbricks on your client-side console.
</Property>
</Properties>
Refer to our [Example VueJs project](https://github.com/formbricks/examples/tree/main/vuejs) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup! Refer to our [Example VueJs project](https://github.com/formbricks/examples/tree/main/vuejs) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup!
## Validate your setup ## Validate your setup
Once you have completed the steps above, you can validate your setup by checking the **Setup Checklist** in the Settings. Your widget status indicator should go from this: Once you have completed the steps above, you can validate your setup by checking the **Setup Checklist** in the Settings. Your widget status indicator should go from this:
<Image <MdxImage
src={WidgetNotConnected} src={WidgetNotConnected}
alt="Widget isnt connected" alt="Widget isnt connected"
quality="100" quality="100"
@@ -379,13 +362,90 @@ Once you have completed the steps above, you can validate your setup by checking
To this: To this:
<Image <MdxImage
src={WidgetConnected} src={WidgetConnected}
alt="Widget is connected" alt="Widget is connected"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
## Debugging Formbricks Integration
Enabling Formbricks debug mode in your browser is a useful troubleshooting step for identifying and resolving complex issues. This section outlines how to activate debug mode, covers common use cases, and provides insights into specific debug log messages.
### Activate Debug Mode
To activate Formbricks debug mode:
1. **Via URL Parameter:**
- Enable debug mode mode by adding `?formbricksDebug=true` to your application's URL (e.g. `https://example.com?formbricksDebug=true` or `https://example.com?page=123&formbricksDebug=true`). This parameter will enable debugging for the current page.
2. **View Debug Logs:**
- Open your browser's developer tools by pressing `F12` or right-clicking and selecting "Inspect."
- Navigate to the "Console" tab to view Formbricks debugging information.
**How to Open Browser Console:**
- **Google Chrome:** Press `F12` or right-click, select "Inspect," and go to the "Console" tab.
- **Firefox:** Press `F12` or right-click, select "Inspect Element," and go to the "Console" tab.
- **Safari:** Press `Option + Command + C` to open the developer tools and navigate to the "Console" tab.
- **Edge:** Press `F12` or right-click, select "Inspect Element," and go to the "Console" tab.
### Common Use Cases
Debug mode is beneficial for scenarios such as:
- Verifying Formbricks initialization.
- Identifying survey trigger issues.
- Troubleshooting unexpected behavior.
### Debug Log Messages
Debug log messages provide insights into:
- API calls and responses.
- Event tracking, survey triggers and form interactions.
- Initialization errors.
## Overwrite CSS Styles for In-App Surveys
You can overwrite the default CSS styles for the in-app surveys by adding the following CSS to your global CSS file (eg. `globals.css`):
Make sure that you do not change the CSS variable names as they are used by Formbricks to identify the CSS variables. You can change the values to your liking. We have filled in some sample values for you to change according to your desired appearance.
<Col>
<CodeGroup title="Overwrite Formbricks CSS">
```css
/* Formbricks CSS */
--fb-brand-color: red;
--fb-brand-text-color: white;
--fb-border-color: green;
--fb-border-color-highlight: rgb(13, 13, 12);
--fb-focus-color: red;
--fb-heading-color: yellow;
--fb-subheading-color: green;
--fb-info-text-color: orange;
--fb-signature-text-color: blue;
--fb-survey-background-color: black;
--fb-accent-background-color: rgb(13, 13, 12);
--fb-accent-background-color-selected: red;
--fb-placeholder-color: white;
--fb-shadow-color: var(--fb-brand-color);
--fb-rating-fill: rgb(13, 13, 12);
--fb-rating-hover: green;
--fb-back-btn-border: blue;
--fb-submit-btn-border: transparent;
--fb-rating-selected: black;
```
</CodeGroup>
</Col>
We have an example of this in our [Demo project](https://github.com/formbricks/formbricks/blob/main/apps/demo/styles/globals.css.) here.
**Cant figure it out? [Join our Discord!](https://formbricks.com/discord)** **Cant figure it out? [Join our Discord!](https://formbricks.com/discord)**
--- ---
@@ -1,5 +1,6 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import ReactApp from "../framework-guides/react-in-app-survey-app-popup-form.webp";
import I1 from "./1-in-app-survey-or-popup-survey-setup.webp"; import I1 from "./1-in-app-survey-or-popup-survey-setup.webp";
import I2 from "./2-settings-for-survey-popup-in-app-for-feedback.webp"; import I2 from "./2-settings-for-survey-popup-in-app-for-feedback.webp";
import I3 from "./3-web-app-survey-settings-for-in-app-survey-popup.webp"; import I3 from "./3-web-app-survey-settings-for-in-app-survey-popup.webp";
@@ -8,7 +9,6 @@ import I5 from "./5-options-survey-popup-in-app-for-feedback.webp";
import I6 from "./6-setup-in-app-survey-popup-feedback-box.webp"; import I6 from "./6-setup-in-app-survey-popup-feedback-box.webp";
import I7 from "./7-in-app-survey-popup-for-feedback.webp"; import I7 from "./7-in-app-survey-popup-for-feedback.webp";
import I8 from "./8-pop-up-form-in-web-app-survey.webp"; import I8 from "./8-pop-up-form-in-web-app-survey.webp";
import ReactApp from "../framework-guides/react-in-app-survey-app-popup-form.webp";
export const metadata = { export const metadata = {
title: "Formbricks Quickstart Guide: In-App Surveys Made Simple", title: "Formbricks Quickstart Guide: In-App Surveys Made Simple",
@@ -20,15 +20,15 @@ export const metadata = {
# Quickstart # Quickstart
In app surveys have 6-10x better conversion rates than emailed out surveys. This tutorial explains how to run an in app survey in your web app in 10 to 15 minutes. Lets go! In-app surveys have 6-10x better conversion rates than emailed out surveys. This tutorial explains how to run an in-app survey in your web app in 10 to 15 minutes. Lets go!
## Create a free Formbricks Cloud account ## Create a free Formbricks Cloud account
While you can [self-host](/docs/self-hosting/deployment) Formbricks, the quickest and easiest way to get started is with the free Cloud plan. Just [sign up here](https://app.formbricks.com/auth/signup) and click through the onboarding, until youre here: While you can [self-host](/docs/self-hosting/deployment) Formbricks, the quickest and easiest way to get started is with the free Cloud plan. Just [sign up here](https://app.formbricks.com/auth/signup) and click through the onboarding, until youre here:
<Image <MdxImage
src={I1} src={I1}
alt="Choose in app survey template" alt="Choose in-app survey template"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl " className="max-w-full rounded-lg sm:max-w-3xl "
/> />
@@ -37,7 +37,7 @@ While you can [self-host](/docs/self-hosting/deployment) Formbricks, the quickes
To be able to see a survey in your app, you need to create one. Well choose one of the templates and head over to the survey settings: To be able to see a survey in your app, you need to create one. Well choose one of the templates and head over to the survey settings:
<Image <MdxImage
src={I2} src={I2}
alt="Settings for popup survey inside web app" alt="Settings for popup survey inside web app"
quality="100" quality="100"
@@ -48,7 +48,7 @@ As you can see in the orange note here, we have not yet connected Formbricks Clo
Select “Web App” in the How to ask settings: Select “Web App” in the How to ask settings:
<Image <MdxImage
src={I3} src={I3}
alt="Survey settings for popup micro surve" alt="Survey settings for popup micro surve"
quality="100" quality="100"
@@ -57,25 +57,25 @@ Select “Web App” in the How to ask settings:
Scroll down to Survey Trigger and choose “New Session”. This will cause this survey to appear when the Formbricks Widget tracks a new user session: Scroll down to Survey Trigger and choose “New Session”. This will cause this survey to appear when the Formbricks Widget tracks a new user session:
<Image <MdxImage
src={I4} src={I4}
alt="In app survey trigger for feedback popup micro survey" alt="In-app survey trigger for feedback popup micro survey"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
In **Recontact Options** we choose the following settings, so that we can play around with the survey more easily. By default, each survey will be shown only once to each user to prevent survey fatigue: In **Recontact Options** we choose the following settings, so that we can play around with the survey more easily. By default, each survey will be shown only once to each user to prevent survey fatigue:
<Image <MdxImage
src={I5} src={I5}
alt="Options for survey popup in app micro survey" alt="Options for survey popup in-app micro survey"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
Now hit **Publish** and youll be forwarded to the Summary Page. This is where youll find the responses to this survey. On the Summary Page click through to the Setup Checklist: Now hit **Publish** and youll be forwarded to the Summary Page. This is where youll find the responses to this survey. On the Summary Page click through to the Setup Checklist:
<Image <MdxImage
src={I6} src={I6}
alt="pop up survey settings for inapp web survey" alt="pop up survey settings for inapp web survey"
quality="100" quality="100"
@@ -86,9 +86,9 @@ Now hit **Publish** and youll be forwarded to the Summary Page. This is where
On the Setup Checklist you have two elements. At the top you find the Widget Status Indicator. Once your app is connected to Formbricks Cloud successfully, this will turn green: On the Setup Checklist you have two elements. At the top you find the Widget Status Indicator. Once your app is connected to Formbricks Cloud successfully, this will turn green:
<Image <MdxImage
src={I7} src={I7}
alt="feedback popup in app survey" alt="feedback popup in-app survey"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -98,9 +98,9 @@ In the manual below, this code snippet contains all the information you need:
- The **Environment ID** of your current Formbricks workspace - The **Environment ID** of your current Formbricks workspace
- The **API Host** which is https://app.formbricks.com for Cloud users - The **API Host** which is https://app.formbricks.com for Cloud users
<Image <MdxImage
src={I8} src={I8}
alt="settings for in app survey popping up" alt="settings for in-app survey popping up"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -120,9 +120,9 @@ In a local instance of your app, you'll embed the Formbricks Widget. Dependent o
Now, restart your app in your terminal to make sure the widget is loaded. Once its loaded, open the browser console to see the Formbricks debug logs. If you did everything right, you should now see your survey in the lower right corner: Now, restart your app in your terminal to make sure the widget is loaded. Once its loaded, open the browser console to see the Formbricks debug logs. If you did everything right, you should now see your survey in the lower right corner:
<Image <MdxImage
src={ReactApp} src={ReactApp}
alt="In app survey in React app for micro surveys" alt="In-app survey in React app for micro surveys"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -1,4 +1,4 @@
import Image from "next/image"; import { MdxImage } from "@/components/shared/MdxImage";
import I1 from "./1-set-up-in-app-micro-survey-popup.webp"; import I1 from "./1-set-up-in-app-micro-survey-popup.webp";
import I2 from "./2-micro-survey-pop-up-in-app.webp"; import I2 from "./2-micro-survey-pop-up-in-app.webp";
@@ -20,9 +20,9 @@ In case you dont see your survey right away, here's what you can do. Go throu
Go back to [app.formbricks.com](http://app.formbricks.com) or your self-hosted instance's URL and go to the Setup Checklist in the Settings. If the status is still indicated as “Not connected” your app hasn't yet pinged the Formbricks Cloud: Go back to [app.formbricks.com](http://app.formbricks.com) or your self-hosted instance's URL and go to the Setup Checklist in the Settings. If the status is still indicated as “Not connected” your app hasn't yet pinged the Formbricks Cloud:
<Image <MdxImage
src={I1} src={I1}
alt="setup checklist ui of survey popup for in app surveys" alt="setup checklist ui of survey popup for in-app surveys"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -37,9 +37,9 @@ Go back to [app.formbricks.com](http://app.formbricks.com) or your self-hosted i
If your app is connected with Formbricks Cloud, the survey might have not been loaded properly. Check the debug logs and search for the list of surveys loaded. It should look like so: If your app is connected with Formbricks Cloud, the survey might have not been loaded properly. Check the debug logs and search for the list of surveys loaded. It should look like so:
<Image <MdxImage
src={I3} src={I3}
alt="survey logs for in app survey pop up micro" alt="survey logs for in-app survey pop up micro"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -48,9 +48,9 @@ If your app is connected with Formbricks Cloud, the survey might have not been l
The widget only loads surveys which are **public** and **in progress**. Go to Formbricks Cloud and to the Survey Summary page. Check if your survey is live: The widget only loads surveys which are **public** and **in progress**. Go to Formbricks Cloud and to the Survey Summary page. Check if your survey is live:
<Image <MdxImage
src={I2} src={I2}
alt="ui of survey popup for in app micro surveys" alt="ui of survey popup for in-app micro surveys"
quality="100" quality="100"
className="max-w-full rounded-lg sm:max-w-3xl" className="max-w-full rounded-lg sm:max-w-3xl"
/> />
@@ -0,0 +1,73 @@
export const metadata = {
title: "Using Actions in Formbricks | Fine-tuning User Moments",
description:
"Dive deep into how actions in Formbricks help products and teams to engage users at precise moments in their journey. Discover the power of actions, from coding to no-code setups, to refine user targeting and generate richer, more detailed user insights.",
};
#### In-App Surveys
# Actions
You want to understand what your users think and feel during specific moments in the user journey. To be able to ask at exactly the right point in time, you need actions.
## How do Actions work?
Actions are a little notification sent from your application to Formbricks. When a predefined action happens in your app, the Formbricks widget notices. This action can then trigger a survey to be shown to the user and is stored in the database.
You decide which actions are sent either in your [Code](#code-actions) or by setting up a [No-Code](#no-code-actions) action within Formbricks.
### Why are actions useful?
Actions help you to display your surveys at the right time. Later on, you will be able to segment your users based on the actions they have triggered in the past. This way, you can create much more granular user segments, e.g. only target users that already have used a specific feature.
## No-Code Actions
No-Code actions can be set up within Formbricks with just a few clicks. There are three types of No-Code actions:
1. **Page URL Action**
The page URL action is triggered, when a user visits a specific page in your application. There are several match conditions:
- `exactMatch`: The URL should exactly match the provided string.
- `contains`: The URL should contain the specified string as a substring.
- `startsWith`: The URL should start with the specified string.
- `endsWith`: The URL should end with the specified string.
- `notMatch`: The URL should not match the specified condition.
- `notContains`: The URL should not contain the specified string as a substring.
2. **innerText Action**
The innerText action checks if the `innerText` of a clicked HTML element matches a specific text, e.g. the label of a button. Display a survey on any button click!
3. **CSS Selector Action**
The CSS Selector action checks if the provided CSS selector matches the selector of a clicked HTML element. The CSS selector can be a class, id or any other CSS selector within your website. Display a survey on any element click!
## Code Actions
Actions can also be set in the codebase to trigger surveys. Please add the code action first in the Formbricks web interface to be able to configure your surveys to use this action.
After that you can fire an action using `formbricks.track()`
<Col>
<CodeGroup title="Track an action">
```javascript
formbricks.track("Action Name");
```
</CodeGroup>
</Col>
Here is an example of how to fire an action when a user clicks a button:
<Col>
<CodeGroup title="Track Button Click">
```javascript
const handleClick = () => {
formbricks.track("Button Clicked");
};
return <button onClick={handleClick}>Click Me</button>;
```
</CodeGroup>
</Col>

Some files were not shown because too many files have changed in this diff Show More