From 7370298dd5cf77568c822a85cd8043cf244f098b Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 17 Oct 2025 15:51:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20Capture=20TypebotPageV2=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/viewer/src/pages/[[...publicId]].tsx | 9 +++++++++ 1 file changed, 9 insertions(+) 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