Skip to content

Instrument Pendo Track Agent#9

Open
lci-novus-dev[bot] wants to merge 1 commit into
mainfrom
pendo-track-agent-trbpr
Open

Instrument Pendo Track Agent#9
lci-novus-dev[bot] wants to merge 1 commit into
mainfrom
pendo-track-agent-trbpr

Conversation

@lci-novus-dev
Copy link
Copy Markdown

@lci-novus-dev lci-novus-dev Bot commented Apr 26, 2026

Summary

Add Pendo trackAgent() instrumentation to the ChatWidget component to track user prompts and agent responses in the OKR chat assistant. This enables analytics on how users interact with the Goalie AI agent.

Changes

  • Added pendo.trackAgent('prompt', ...) call in handleSend to track user message submissions with conversationId, messageId, and content
  • Added pendo.trackAgent('agent_response', ...) call after successful API response to track agent replies with modelUsed ('llama-3.3-70b-versatile')
  • Added conversationIdRef using crypto.randomUUID() to maintain a stable conversation ID across messages, reset on clearKey
  • Updated global.d.ts to add proper TypeScript typing for pendo.trackAgent method
  • All trackAgent calls are guarded with typeof pendo !== 'undefined' to avoid errors if Pendo is not loaded

Notes

  • No user_reaction tracking was added because the chat UI does not have any feedback mechanisms (thumbs up/down, retry, etc.)
  • The agentId '175tdkEo-JuHMRNosvR28MCawKc' is used as specified for the ChatWidget agent

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