-
Notifications
You must be signed in to change notification settings - Fork 7
docs: add analytics events reference page #5512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
devin-ai-integration
wants to merge
2
commits into
main
Choose a base branch
from
devin/1778793395-analytics-events-reference
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
68 changes: 68 additions & 0 deletions
68
fern/products/docs/pages/integrations/analytics/analytics-events.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| --- | ||
| title: Analytics events reference | ||
| description: Complete reference of the analytics events Fern emits on your documentation site, including page views, feedback, API Playground, search, and error tracking events. | ||
| --- | ||
|
|
||
| Fern automatically emits analytics events on your documentation site. If you have [PostHog](/learn/docs/integrations/analytics/posthog) configured, these events are forwarded to your PostHog instance alongside Fern's internal tracking. Events are also forwarded to any other [analytics provider](/learn/docs/integrations/overview) you configure (GA4, Segment, FullStory, etc.) where supported. | ||
|
|
||
| ## Page views | ||
|
|
||
| | Event | Description | | ||
| | --- | --- | | ||
| | `$pageview` | Fired on every route change. Includes the current URL. | | ||
| | `$pageleave` | Fired when a user navigates away from a page. Captured automatically by PostHog. | | ||
|
|
||
| Page view tracking is automatic and requires no additional configuration. | ||
|
|
||
| ## Feedback events | ||
|
|
||
| These events are emitted by the [on-page feedback](/learn/docs/customization/user-feedback) widget and the Ask Fern feedback component. | ||
|
|
||
| | Event | Description | Key properties | | ||
| | --- | --- | --- | | ||
| | `feedback_voted` | User clicked the thumbs up or thumbs down button. | `satisfied` (boolean), `feedbackQuestion` or `type` | | ||
| | `feedback_submitted` | User submitted written feedback after voting. | `satisfied` (boolean), `feedback` (text ID) | | ||
| | `code_block_feedback_opened` | User opened the feedback prompt on a code block. | Code block context | | ||
| | `code_block_feedback_submitted` | User submitted feedback on a code block. | Code block context | | ||
|
|
||
| ## API playground events | ||
|
|
||
| These events track usage of the [API Explorer](/learn/docs/api-references/api-explorer). | ||
|
|
||
| | Event | Description | Key properties | | ||
| | --- | --- | --- | | ||
| | `api_playground_request_sent` | User sent a request from the API Explorer. | `endpointId`, `endpointName` | | ||
| | `api_playground_request_received` | A response was received in the API Explorer. | `endpointId`, `endpointName`, response status | | ||
|
|
||
| ## Search and AI events | ||
|
|
||
| These events track [search](/learn/docs/customization/search) and [Ask Fern](/learn/docs/ai-features/ask-fern/overview) usage. | ||
|
|
||
| | Event | Description | Key properties | | ||
| | --- | --- | --- | | ||
| | `ask_ai_suggest` | An Ask Fern suggestion was generated. | Query context | | ||
|
|
||
| ## Error events | ||
|
|
||
| These events help identify broken pages and missing content. | ||
|
|
||
| | Event | Description | Key properties | | ||
| | --- | --- | --- | | ||
| | `not_found` | A visitor hit a 404 page. | `pathname`, `url` | | ||
|
|
||
| ## Disabling analytics | ||
|
|
||
| To disable all analytics events, set `disable-analytics: true` in your [site-level settings](/learn/docs/configuration/site-level-settings#settingsdisable-analytics): | ||
|
|
||
| ```yaml docs.yml | ||
| settings: | ||
| disable-analytics: true | ||
| ``` | ||
|
|
||
| This disables all analytics integrations configured in the `analytics` section of `docs.yml`, including Google Analytics 4, Google Tag Manager, PostHog, and any other providers. | ||
|
|
||
| ## CLI and dashboard events | ||
|
|
||
| The Fern CLI and [Dashboard](https://dashboard.buildwithfern.com) emit their own analytics events for internal product telemetry (command usage, onboarding funnels, billing events, etc.). These are not forwarded to your analytics providers and are used only by Fern for product improvement. | ||
|
|
||
| CLI telemetry can be disabled by setting the `FERN_TELEMETRY_DISABLED` environment variable or adding `telemetry.enabled: false` to `~/.fernrc`. | ||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'aren't' instead of 'are not'.