Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughDocumentation updates clarifying metrics concepts, introducing structured guidance for Custom Events with nesting rules, and surfacing Journeys as a visual design tool. Changes include narrative rewording, component additions (Callout), and conversion of metric types to a structured table. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pages/data-design/avo-tracking-plan/metrics.mdx`:
- Around line 67-75: The wording in the "Nesting rules" bullets is ambiguous:
change the two occurrences that read "another metric" (the bullets that start
"One level deep maximum." and "No adding to already-nested metrics.") to
explicitly read "another Custom Event" so the one-level restriction is clearly
limited to Custom Event‑inside‑Custom Event nesting; ensure both bullets now say
a Custom Event "cannot itself be nested inside another Custom Event" and "is
already nested inside another Custom Event" respectively to remove ambiguity.
In `@pages/data-design/start-data-design.mdx`:
- Line 112: Replace the metric type label "Segmentation" with the canonical name
"Event Segmentation" in the list sentence so it matches the Metrics reference;
update the string "Segmentation" to "Event Segmentation" in the sentence that
currently reads "The available metrics types in Avo are _Funnel_,
_Segmentation_, _Retention_, _Proportion_, and _[Custom Event]..." to ensure
consistency with the metrics.mdx terminology.
| ### Nesting rules | ||
|
|
||
| Custom Events support one level of nesting to keep metrics understandable and predictable. The following rules apply: | ||
|
|
||
| - **Only Custom Event metrics can be nested.** You cannot nest a Funnel inside another Funnel, or embed a Retention metric inside a Segmentation metric. Only metrics of type Custom Event can be added as items inside other metrics. | ||
| - **One level deep maximum.** A Custom Event that already contains other nested Custom Events cannot itself be nested inside another metric. This prevents deeply nested chains that would be difficult to understand. | ||
| - **No adding to already-nested metrics.** A Custom Event that is already nested inside another metric cannot have additional Custom Events added to it. This prevents indirect multi-level chains (A contains B, then B gets C added to it later). | ||
| - **No circular references.** A metric cannot contain itself, either directly or indirectly. | ||
| - **Invalid options are shown but disabled.** When browsing the event picker, Custom Events that violate any of these rules still appear in the list but are disabled with the reason shown (e.g., "Cannot nest metrics more than one level deep"), so you can understand why a particular Custom Event is not available. |
There was a problem hiding this comment.
Ambiguous use of "metric" in nesting rules may confuse readers.
Lines 72–73 say a Custom Event "cannot itself be nested inside another metric" and "is already nested inside another metric." Since line 71 defines nesting as being "added as items inside other metrics" (of any type), a literal reading of line 72 implies a composite Custom Event can't be used in a Funnel or Segmentation either — which contradicts the purpose of Custom Events.
If the one-level restriction only applies to Custom-Event-inside-Custom-Event depth (i.e., a composite CE can still be added to a Funnel), replace "another metric" with "another Custom Event" in both bullets to remove the ambiguity.
Proposed fix
-- **One level deep maximum.** A Custom Event that already contains other nested Custom Events cannot itself be nested inside another metric. This prevents deeply nested chains that would be difficult to understand.
-- **No adding to already-nested metrics.** A Custom Event that is already nested inside another metric cannot have additional Custom Events added to it. This prevents indirect multi-level chains (A contains B, then B gets C added to it later).
+- **One level deep maximum.** A Custom Event that already contains other Custom Events cannot itself be nested inside another Custom Event. This prevents deeply nested chains that would be difficult to understand.
+- **No adding to already-nested Custom Events.** A Custom Event that is already nested inside another Custom Event cannot have additional Custom Events added to it. This prevents indirect multi-level chains (A contains B, then B gets C added to it later).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pages/data-design/avo-tracking-plan/metrics.mdx` around lines 67 - 75, The
wording in the "Nesting rules" bullets is ambiguous: change the two occurrences
that read "another metric" (the bullets that start "One level deep maximum." and
"No adding to already-nested metrics.") to explicitly read "another Custom
Event" so the one-level restriction is clearly limited to Custom
Event‑inside‑Custom Event nesting; ensure both bullets now say a Custom Event
"cannot itself be nested inside another Custom Event" and "is already nested
inside another Custom Event" respectively to remove ambiguity.
| ### Step 5 – Select metric type | ||
|
|
||
| The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Segmentation_, _Retention_ and _Proportion_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics). | ||
| The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Segmentation_, _Retention_, _Proportion_, and _[Custom Event](/data-design/avo-tracking-plan/metrics#custom-events)_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics). |
There was a problem hiding this comment.
Inconsistent metric type name: "Segmentation" vs. "Event Segmentation".
This line lists the type as Segmentation, but the metrics page (the canonical reference) consistently calls it Event Segmentation (see the table and the step-by-step list in metrics.mdx). Align the name here to avoid confusing readers who cross-reference the two pages.
Proposed fix
-The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Segmentation_, _Retention_, _Proportion_, and _[Custom Event](/data-design/avo-tracking-plan/metrics#custom-events)_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics).
+The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Event Segmentation_, _Retention_, _Proportion_, and _[Custom Event](/data-design/avo-tracking-plan/metrics#custom-events)_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Segmentation_, _Retention_, _Proportion_, and _[Custom Event](/data-design/avo-tracking-plan/metrics#custom-events)_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics). | |
| The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are _Funnel_, _Event Segmentation_, _Retention_, _Proportion_, and _[Custom Event](/data-design/avo-tracking-plan/metrics#custom-events)_. Read about their unique capabilities in our [Metrics page](/data-design/avo-tracking-plan/metrics). |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pages/data-design/start-data-design.mdx` at line 112, Replace the metric type
label "Segmentation" with the canonical name "Event Segmentation" in the list
sentence so it matches the Metrics reference; update the string "Segmentation"
to "Event Segmentation" in the sentence that currently reads "The available
metrics types in Avo are _Funnel_, _Segmentation_, _Retention_, _Proportion_,
and _[Custom Event]..." to ensure consistency with the metrics.mdx terminology.
This is for https://github.com/avohq/monorepo/pull/8834