Instrument Pendo Track Events#3
Open
novus-by-pendo[bot] wants to merge 1 commit into
Open
Conversation
Client-side events (pendo.track): - project_created, project_updated, project_deleted (Home.tsx) - interview_started, interview_completed, interview_failed (Conversation.tsx) - research_brief_generated, linear_issues_created (Conversation.tsx) - interview_link_copied, session_reset (ProjectRow.tsx) - linear_integration_disconnected (IntegrationsContent.tsx) - linear_team_selected (LinearTeamSelector.tsx) - notion_database_created, onboarding_completed (OnboardingSelectors.tsx) Server-side events (HTTP POST to Pendo Track API): - notion_integration_connected (Notion OAuth callback) - linear_integration_connected (Linear OAuth callback) - interview_usage_recorded (actions.ts recordUsage) Supporting changes: - Add pendo global type declaration (env.d.ts) - Add server-side Pendo tracking utility (lib/pendo.ts) - Extract OnboardingContinueLink client component for onboarding_completed event
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Pendo Track Event instrumentation across 17 events covering the full user lifecycle: project management, voice interviews, integrations, and onboarding.
Changes
New files
src/lib/pendo.ts— Server-side Pendo tracking utility. Sends HTTP POST requests to the Pendo Track API (data.pendo.io/data/track) with the integration key, visitor/account IDs, and event properties. Used by server-side route handlers and server actions.src/env.d.ts— Added globalpendotype declaration so client-sidetypeof pendo !== 'undefined'guards andpendo.track()calls type-check correctly.Client-side events (14 events via
pendo.track())project_createdHome.tsxcreateProjectcallproject_updatedHome.tsxupdateProjectcallproject_deletedHome.tsxdeleteProjectcallinterview_startedConversation.tsxonConnectcallback from ElevenLabsinterview_completedConversation.tsxonDisconnectwith non-error reasoninterview_failedConversation.tsxonDisconnectwith error,onError, or 15s connection timeoutresearch_brief_generatedConversation.tsxcreate_briefclient tool completeslinear_issues_createdConversation.tsxcreate_issuesclient tool completesinterview_link_copiedProjectRow.tsxsession_resetProjectRow.tsxresetSessionsucceedslinear_integration_disconnectedIntegrationsContent.tsxdisconnectLinearcompleteslinear_team_selectedLinearTeamSelector.tsxselectLinearTeamsucceedsnotion_database_createdOnboardingSelectors.tsxcreateNotionDatabasesucceedsonboarding_completedOnboardingSelectors.tsx/homeServer-side events (3 events via HTTP POST to Pendo Track API)
notion_integration_connectedapi/auth/notion/callback/route.tslinear_integration_connectedapi/auth/linear/callback/route.tsinterview_usage_recordedactions.tsSupporting changes
src/app/onboarding/page.tsx— Replaced the static<Link>"Continue" button with a new<OnboardingContinueLink>client component that firesonboarding_completedon click, since the page itself is a server component.Implementation notes
typeof pendo !== 'undefined'so the app works normally if the Pendo agent isn't loaded.try/catchso tracking failures never break application flow.