Skip to content

docs(customer-analytics): document Calculation option for usage metrics#16530

Open
inkeep[bot] wants to merge 2 commits intomasterfrom
docs-writer-ai-update-2026-04-22T19-15-23-668Z-bda9cv
Open

docs(customer-analytics): document Calculation option for usage metrics#16530
inkeep[bot] wants to merge 2 commits intomasterfrom
docs-writer-ai-update-2026-04-22T19-15-23-668Z-bda9cv

Conversation

@inkeep
Copy link
Copy Markdown
Contributor

@inkeep inkeep Bot commented Apr 22, 2026

Changes

This PR updates the usage metrics documentation to include the new Calculation configuration option added in PostHog/posthog#54347.

Updates to contents/docs/customer-analytics/create-usage-metrics.mdx:

  1. Configuration options table – Added two new rows:

    • Calculation – How events are aggregated: Count of events (default) or Sum of property
    • Property to sum – The numeric property to sum (only shown when Calculation is set to Sum of property)
  2. New "Calculation" section – Added after the existing "Filters" section, explaining:

    • Count of events – Counts the total number of matched events (default behavior)
    • Sum of property – Sums values of a numeric event property across matched events. Useful for tracking cumulative values like API tokens consumed, storage used, or revenue generated.

This PR was created by the Inkeep Content Writer agent, which is maintained by the Docs and Wizard team. Please reach out on Slack for help if needed.

Reflects PR #54347 which adds a math/math_property selector to the
usage metrics config form, allowing Sum of property aggregation in
addition to the default Count of events.
@inkeep inkeep Bot requested a review from arthurdedeus April 22, 2026 19:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Apr 22, 2026 07:38PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Vale prose linter → found 1 errors, 1 warnings, 0 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/customer-analytics/create-usage-metrics.mdx — 1 errors, 1 warnings, 0 suggestions
Line Severity Message Rule
29:49 warning 'formated' is a possible misspelling. PostHogBase.Spelling
44:73 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash

@arthurdedeus
Copy link
Copy Markdown
Contributor

@inkeep
Copy link
Copy Markdown
Contributor Author

inkeep Bot commented Apr 22, 2026

I've reviewed the additional PRs and updated the documentation:

Changes made:

Based on PR #54349, I added documentation for the new Display configuration option:

  1. Configuration options table – Added a new Display row describing the two visualization options: Number (default) and Sparkline

  2. New "Display" section – Added after the "Calculation" section, explaining:

    • Number – Shows a single numeric value with percentage change indicator (default)
    • Sparkline – Shows a bar chart visualization of metric values over the selected interval, along with total value and percentage change

Note: PR #54346 and #54347 were already covered by the existing Calculation documentation in this PR.

@github-actions
Copy link
Copy Markdown
Contributor

Hey @arthurdedeus! This docs PR was generated for you by an agent. You're responsible for reviewing and merging it into production.

  1. Review and approve the PR
  2. Merge the PR
    a. Check the preview env and CI build and merge it yourself
    b. Enable auto-merge if you're confident in the changes

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