diff --git a/apps/viewer/src/pages/[[...publicId]].tsx b/apps/viewer/src/pages/[[...publicId]].tsx index bda1edb96..bca574c35 100644 --- a/apps/viewer/src/pages/[[...publicId]].tsx +++ b/apps/viewer/src/pages/[[...publicId]].tsx @@ -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