Skip to content

Comments

Added docs for custom events.#1633

Open
thoragudf wants to merge 1 commit intomainfrom
custom-events
Open

Added docs for custom events.#1633
thoragudf wants to merge 1 commit intomainfrom
custom-events

Conversation

@thoragudf
Copy link
Contributor

@thoragudf thoragudf commented Feb 20, 2026

@thoragudf thoragudf requested a review from logason February 20, 2026 15:19
@vercel
Copy link

vercel bot commented Feb 20, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 20, 2026 3:19pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

Documentation 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

Cohort / File(s) Summary
Metrics Documentation Expansion
pages/data-design/avo-tracking-plan/metrics.mdx
Comprehensive updates: added Callout component imports, rewrote introductory narrative linking what is tracked to why, replaced Purpose Meeting framework mentions with embedded Callouts and links, reworked "How metrics work" section with concrete examples, converted metric types list to structured Markdown table, expanded Creating a metric subsection with step-by-step guidance, added new Nesting rules subsection detailing constraints and visibility, and updated What's next section with new Journeys PageLink.
Data Design Start Page Update
pages/data-design/start-data-design.mdx
Expanded Step 5 to include Custom Event as an additional selectable metric type with link to Metrics page.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • logason
  • klaraavo
  • ivark16

Poem

🐰 Metrics and events now dance in structured rows,
With nesting rules clear and Journeys that flow,
Custom Events guide the way forward and bright,
From Purpose to Callouts—all documented right! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the PR, which adds comprehensive documentation for custom events including nesting rules, examples, and updated guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch custom-events

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +67 to +75
### 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.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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).
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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.

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.

1 participant