Skip to content

Instrument Pendo Track Agent#111

Open
novus-by-pendo[bot] wants to merge 2 commits into
mainfrom
pendo-track-agent-lkth6
Open

Instrument Pendo Track Agent#111
novus-by-pendo[bot] wants to merge 2 commits into
mainfrom
pendo-track-agent-lkth6

Conversation

@novus-by-pendo

Copy link
Copy Markdown

Summary

Add Pendo trackAgent() instrumentation to track user interactions with the BrowseGPT AI agent. This enables analytics for user prompts and agent responses in the chat interface.

Changes

  • Added pendo.trackAgent("prompt", ...) call in handleMessageSubmit to track when users send messages, using the chat's openChat.id as conversationId and the stripped message content
  • Added pendo.trackAgent("agent_response", ...) call in sendMessageMutation.onSuccess to track when the agent finishes responding, capturing the response content
  • Added TypeScript declaration for pendo.trackAgent in extension/shared/global.d.ts
  • Both tracking calls use the provided agentId u3R80wC-6_NNhqkVORFL6MfvyVA and generate unique messageIds via crypto.randomUUID()

Notes

  • No user_reaction tracking was added because the chat UI does not have any feedback mechanisms (no thumbs up/down, retry, or undo buttons)
  • The initial automated message sent in the useEffect on line 169 is not tracked as a user prompt since it is system-initiated, not user-initiated

Generated by Novus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants