Skip to content

Commit

Permalink
test add analytics event
Browse files Browse the repository at this point in the history
  • Loading branch information
andychase committed Sep 26, 2024
1 parent 5071984 commit edeee5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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={() => {
Expand Down

0 comments on commit edeee5e

Please sign in to comment.