Document on-page feedback logging for self-hosted deployments#4504
Merged
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
Requested by: sandeep |
|
|
||
| ### Filtering logs | ||
|
|
||
| To extract feedback events from your container logs, filter for lines containing the `[fern-docs-feedback]` prefix: |
Contributor
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Microsoft.Wordiness] Consider using 'remove' instead of 'extract'.
Contributor
|
🌿 Preview your docs: https://fern-preview-fern-document-feedback-logs.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
|
|
||
| ## On-page feedback logging for self-hosted deployments | ||
|
|
||
| Self-hosted deployments now log [on-page feedback](/learn/docs/user-feedback) events as structured JSON with the `[fern-docs-feedback]` prefix. Filter your container logs to capture user feedback, including thumbs up/down votes and written messages. |
Contributor
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated
devalog
approved these changes
Mar 23, 2026
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
Documents where on-page feedback events appear in self-hosted deployments. Changes across four files:
[fern-docs-feedback]log prefix, tracked events (feedback_voted,feedback_submitted,code_block_feedback_submitted), properties, and adocker logsfiltering example.Based on the implementation in
packages/fern-docs/bundle/src/components/analytics/track.tsin fern-platform, which emits structured JSON viaconsole.infowith the[fern-docs-feedback]prefix whenNEXT_PUBLIC_IS_SELF_HOSTED=1.Review & Testing Checklist for Human
track.tscallsconsole.info()inside a client-side guard (typeof window === "undefined"returns early). This means logs may go to the browser console rather than Docker container stdout. If so, the documentation, feature table entry, changelog entry, anddocker logsexample are all misleading and need correction. This is the highest-priority item.0.111.1) whether there is additional server-side logging not captured intrack.ts, or whether the intent is browser-console logging only./learn/docs/self-hosted/set-up#on-page-feedbackresolves correctly in the preview.Notes
The Slack thread that prompted this had Denis reporting he couldn't see feedback in the logs despite running the correct container version. This could be because the logging is browser-side only, or there may be a bug. The documentation should accurately reflect what actually happens — worth confirming before merging.
Link to Devin session: https://app.devin.ai/sessions/d32688870d894f058413f6c80fea90c1