Skip to content

Conversation

@nearestnabors
Copy link
Contributor

@nearestnabors nearestnabors commented Dec 31, 2025

This update to the docs site will allow us to collect feedback and analyze learning bottlenecks. It's been set up to work on the preview https://docs-git-feedback-arcade-ai.vercel.app/ for testing. When merged, we can switch it on for the docs site.

Configuration Changes:

  • Modified /app/_components/posthog.tsx to enable surveys (disable_surveys: false)
  • Enabled heatmaps for click tracking analytics (enable_heatmaps: true)

Event tracking:

  • get_started_clicked - User engagement with getting started
  • sample_app_clicked - Interest in examples
  • code_copied - Technical documentation usage
  • tool_card_clicked - Tool exploration

Session recording enabled so we can see where any problems occur.
Screenshot 2025-12-31 at 2 55 04 PM
Screenshot 2025-12-31 at 2 55 10 PM
Screenshot 2025-12-31 at 2 55 19 PM


Note

Adds comprehensive PostHog analytics and session insights across the docs UI.

  • Enables session recording, heatmaps, and surveys in posthog.tsx; adds $pageview tracking on route changes
  • Instruments key interactions with posthog.capture across components:
    • Landing hero buttons: get_started_clicked, build_tool_clicked
    • Cards: quickstart_card_clicked, sample_app_clicked, integration_card_clicked, tool_card_clicked
    • Code examples: code_example_expanded, code_copied
    • Scope picker: scope_calculator_used
    • Contact/Sales and survey: contact_sales_modal_opened, take_survey_clicked
  • Updates click handlers to record events before navigation or actions

Written by Cursor Bugbot for commit 7710100. This will update automatically on new commits. Configure here.

nearestnabors and others added 4 commits December 31, 2025 13:09
- Enabled surveys for CSAT feedback collection
- Enabled heatmaps for click and scroll tracking
- Added detailed setup documentation for both features
- Server tested and running successfully

Features now active:
✅ Surveys - For CSAT feedback on every page
✅ Heatmaps - For visualizing user interactions
✅ Page tracking - Automatic pageview events
✅ Custom events - Existing event tracking

Next steps:
1. Log into PostHog dashboard (https://us.posthog.com)
2. Create CSAT survey following the guide
3. Review heatmaps to understand user behavior
4. Correlate CSAT scores with interaction patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Enable surveys (disable_surveys: false) for CSAT feedback collection
- Enable heatmaps (enable_heatmaps: true) for click tracking
- Remove debug logging in production

The CSAT survey now appears on all documentation pages with a feedback button on the right side.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed temporary setup documentation now that CSAT survey is working

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Enable session recording to understand user behavior on docs
- Mask all input fields for privacy protection
- Keep text content readable for better UX insights
- Add 'ph-no-capture' class support for opting out specific elements
- Block third-party iframe recording for security

Session recordings will help identify:
- Navigation patterns and user journeys
- Points where users get stuck or confused
- How users interact with code examples and documentation
- Common workflows and usage patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Dec 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Error Error Dec 31, 2025 3:03pm

@nearestnabors nearestnabors enabled auto-merge (squash) December 31, 2025 14:56
selected_tools_count: selectedTools.size,
total_tools_available: tools.length,
});
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analytics reports stale state count after updates

The trackScopeCalculatorUsed function captures selectedTools.size from the closure, but it's called after setSelectedTools in toggleTool, selectAll, and clearAll. Since React state updates are asynchronous, selectedTools still holds the old value when tracking fires, resulting in incorrect selected_tools_count being reported to analytics.

Fix in Cursor Fix in Web

Copy link
Contributor

@evantahler evantahler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this isn't deploying to the preview site due to a type error. Ping me again when it's up and I'll take a look!

// Enable session recording for user behavior analysis
disable_session_recording: false,
session_recording: {
maskAllInputs: true, // Privacy: mask sensitive input fields
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maskAllInputs and maskTextContent seem to be in conflict - which one wins?

@evantahler
Copy link
Contributor

Screenshot 2025-12-31 at 10 53 31 AM Every page currently has this link as well to open a Github Issue - I imagine this PR should remove this link?

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.

3 participants