mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-13 21:02:56 +08:00
🔊 Capture TypebotPageV2 events
This commit is contained in:
parent
07b48c4eeb
commit
7370298dd5
@ -1,3 +1,4 @@
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { env } from "@typebot.io/env";
|
||||
import { isNotDefined } from "@typebot.io/lib/utils";
|
||||
import prisma from "@typebot.io/prisma";
|
||||
@ -147,6 +148,10 @@ const getTypebotFromPublicId = async (publicId?: string) => {
|
||||
if (isNotDefined(publishedTypebot)) return null;
|
||||
const theme = themeSchema.parse(publishedTypebot.theme);
|
||||
const settings = settingsSchema.parse(publishedTypebot.settings);
|
||||
if (!publishedTypebot.version) {
|
||||
Sentry.setTag("typebotId", publishedTypebot.typebotId);
|
||||
Sentry.captureMessage("Is using TypebotPageV2");
|
||||
}
|
||||
return publishedTypebot.version
|
||||
? {
|
||||
name: publishedTypebot.typebot.name,
|
||||
@ -199,6 +204,10 @@ const getTypebotFromCustomDomain = async (customDomain: string) => {
|
||||
},
|
||||
});
|
||||
if (isNotDefined(publishedTypebot)) return null;
|
||||
if (!publishedTypebot.version) {
|
||||
Sentry.setTag("typebotId", publishedTypebot.typebotId);
|
||||
Sentry.captureMessage("Is using TypebotPageV2");
|
||||
}
|
||||
const theme = themeSchema.parse(publishedTypebot.theme);
|
||||
const settings = settingsSchema.parse(publishedTypebot.settings);
|
||||
return publishedTypebot.version
|
||||
|
||||
Loading…
Reference in New Issue
Block a user