From 5488cd0208a8ac35fa8978423d1c03959cd2be59 Mon Sep 17 00:00:00 2001 From: Henrique Barreto Date: Wed, 27 Nov 2024 23:11:58 +0000 Subject: [PATCH] feat: GROW-284 - PR Remarks --- src/client/thirdParty/Amplitude.tsx | 7 +------ src/client/thirdParty/Inkeep.tsx | 8 ++------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/client/thirdParty/Amplitude.tsx b/src/client/thirdParty/Amplitude.tsx index b929f712..72cbd109 100644 --- a/src/client/thirdParty/Amplitude.tsx +++ b/src/client/thirdParty/Amplitude.tsx @@ -37,12 +37,7 @@ type AmplitudeProps = { apiKey: string; }; -export function trackAskAIHelpMethodChosen( - helpMethod: string, - visitorId: string, - pagePath: string, - pageTitle: string, -) { +export function trackAskAIHelpMethodChosen(helpMethod: string, visitorId: string, pagePath: string, pageTitle: string) { amplitude.track(ASK_AI_CHOSEN_EVENT_TYPE, { helpMethod, visitorId, diff --git a/src/client/thirdParty/Inkeep.tsx b/src/client/thirdParty/Inkeep.tsx index 0fc2b21e..0abf4c8b 100644 --- a/src/client/thirdParty/Inkeep.tsx +++ b/src/client/thirdParty/Inkeep.tsx @@ -1,6 +1,5 @@ 'use client'; -import { InkeepChatButtonProps } from '@inkeep/uikit'; import type { InkeepAIChatSettings, InkeepSearchSettings, @@ -13,8 +12,6 @@ import { trackAskAIHelpMethodChosen } from './Amplitude'; import { useVisitorData } from '@fingerprintjs/fingerprintjs-pro-react'; import { FPJS_CLIENT_TIMEOUT } from '../../const'; -const GET_HELP_OPTIONS_CLICKED = 'get_help_option_clicked'; - /** * Inkeep (AI Help) chat button * Implemented according to https://docs.inkeep.com/integrations/nextjs/chat-button @@ -39,15 +36,14 @@ const useInkeepSettings = (): InkeepSharedSettings => { const { data } = useVisitorData({ extendedResult: true, timeout: FPJS_CLIENT_TIMEOUT }); const visitorId = data?.visitorId || ''; - - const logEventCallback = (event) => { + const logEventCallback = (event: any) => { debugger; const { name } = event.properties; const pagePath = document.location.pathname; const pageTitle = document.title; trackAskAIHelpMethodChosen(name, visitorId, pagePath, pageTitle); - } + }; const baseSettings: InkeepBaseSettings = { apiKey,