We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7b6db4 commit a920eadCopy full SHA for a920ead
apps/playground/app/dashboard/page.tsx
@@ -33,6 +33,7 @@ export default function DemoPage(): React.JSX.Element {
33
}, []);
34
35
const handleIdentifyUser = () => {
36
+ if (!isInitialized || !userId) return;
37
formbricks.setUserId(userId);
38
formbricks.setAttribute("userType", "Demo-customer");
39
formbricks.setAttribute("plan", "enterprise");
@@ -44,10 +45,12 @@ export default function DemoPage(): React.JSX.Element {
44
45
46
const handleCloseDashboard = () => {
47
setIsDashboardOpen(false);
48
+ if (!isInitialized) return;
49
formbricks.track("dashboard-viewed");
50
};
51
52
const handleUpgradeAction = () => {
53
54
formbricks.track("upgrade-clicked");
55
56
0 commit comments