@formbricks/js
Advanced tools
Comparing version 2.2.0 to 3.0.0
{ | ||
"name": "@formbricks/js", | ||
"license": "MIT", | ||
"version": "2.2.0", | ||
"description": "Formbricks-js allows you to connect your app to Formbricks, display surveys and trigger events.", | ||
"version": "3.0.0", | ||
"description": "Formbricks-js allows you to connect your index to Formbricks, display surveys and trigger events.", | ||
"homepage": "https://formbricks.com", | ||
@@ -22,21 +22,10 @@ "repository": { | ||
"exports": { | ||
"./app": { | ||
"import": "./dist/app.js", | ||
"require": "./dist/app.cjs", | ||
"types": "./dist/app.d.ts" | ||
}, | ||
"./website": { | ||
"import": "./dist/website.js", | ||
"require": "./dist/website.cjs", | ||
"types": "./dist/website.d.ts" | ||
}, | ||
"./*": "./dist/*" | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"app": [ | ||
"./dist/app.d.ts" | ||
], | ||
"website": [ | ||
"./dist/website.d.ts" | ||
"*": [ | ||
"./dist/index.d.ts" | ||
] | ||
@@ -52,4 +41,4 @@ } | ||
"@formbricks/config-typescript": "1.0.0", | ||
"@formbricks/eslint-config": "0.0.0", | ||
"@formbricks/types": "0.0.0" | ||
"@formbricks/types": "0.0.0", | ||
"@formbricks/eslint-config": "0.0.0" | ||
}, | ||
@@ -56,0 +45,0 @@ "peerDependencies": { |
@@ -23,6 +23,4 @@ # Formbricks Browser JS Library | ||
For `Website` surveys: | ||
```javascript | ||
import formbricks from "@formbricks/js/website"; | ||
import formbricks from "@formbricks/js"; | ||
@@ -37,18 +35,4 @@ if (typeof window !== "undefined") { | ||
For `App` surveys: | ||
Replace your-environment-id with your actual environment ID. You can find your environment ID in the **Setup Checklist** in the Formbricks settings. If you want to use the user identification feature, please check out [our docs for details](https://formbricks.com/docs/app-surveys/user-identification). | ||
```javascript | ||
import formbricks from "@formbricks/js/app"; | ||
if (typeof window !== "undefined") { | ||
formbricks.init({ | ||
environmentId: "your-environment-id", | ||
apiHost: "https://app.formbricks.com", | ||
userId: "REPLACE_WITH_DYNAMIC_ID", | ||
}); | ||
} | ||
``` | ||
Replace your-environment-id with your actual environment ID. You can find your environment ID in the **Setup Checklist** in the Formbricks settings. If you are using `App` surveys please make sure to pass a unique user identifier to the Formbricks SDK. | ||
For more detailed guides for different frameworks, check out our [Framework Guides](https://formbricks.com/docs/getting-started/framework-guides). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26093
8
249
37
3