From edeee5ee50e75a0114000eac93b298e6fa65d6fd Mon Sep 17 00:00:00 2001 From: Andy Chase Date: Thu, 26 Sep 2024 13:43:18 -0700 Subject: [PATCH] test add analytics event --- components/Chat/Chat.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Chat/Chat.tsx b/components/Chat/Chat.tsx index 1c7a31bfa9..951f963167 100644 --- a/components/Chat/Chat.tsx +++ b/components/Chat/Chat.tsx @@ -9,6 +9,7 @@ import { useState, } from 'react'; import toast from 'react-hot-toast'; +import { sendGTMEvent } from '@next/third-parties/google' import { useTranslation } from 'next-i18next'; @@ -482,6 +483,7 @@ export const Chat = memo(({ stopConversationRef }: Props) => { onSend={(message, plugin) => { setCurrentMessage(message); handleSend(message, 0, plugin); + sendGTMEvent({ event: 'messageSent', messageLength: message.content.length }); }} onScrollDownClick={handleScrollDown} onRegenerate={() => {