# velt-view-analytics-best-practices

> Claude/Codex skill by [@velt-js](https://omgskills.com/library/velt-js/index.md) · 0 stars · Updated 2026-06-24

Best practices for Velt View Analytics — the 'who viewed this document today' indicator with a count badge, recent-viewers dialog, and date- or user-aggregated subscriptions. Use whenever the user is adding the VeltViewAnalytics component, scoping it to a sub-document via type='location' + location-id, reading unique-view counts via the React hooks (useUniqueViewsByUser / useUniqueViewsByDate) or the non-React observable form (client.getViewsElement().getUniqueViewsByUser/ByDate().subscribe), building a custom trigger or viewer-list overlay via the velt-view-analytics-wireframe / velt-view-analytics-dialog-wireframe / velt-view-analytics-bottom-sheet-wireframe tags, or binding componentConfig.\* template variables (todayViewsCount, totalUniqueViewsCount, treadsVisible, userViews, bottomSheetMode). Trigger on any task involving Velt View Analytics, document view counts, recent-viewers lists, viewers-by-date trends, view aggregation, or VeltViewAnalytics customization — even when the user does not explicitly say 'Velt' or 'view analytics'.

## Install

```sh
git clone https://github.com/velt-js/velt-plugin-cursor /tmp/velt-plugin-cursor && ln -s /tmp/velt-plugin-cursor/skills/velt-view-analytics-best-practices ~/.claude/skills/velt-view-analytics-best-practices
```

## From README

Velt View Analytics Best Practices Implementation guide for the Velt View Analytics feature — a "who viewed this document today" indicator with a trigger badge, a recent-viewers dialog (desktop) and bottom sheet (mobile), and observable / hook APIs for aggregating views by user or by date. When to Apply Reference these guidelines when: Placing (or ) in your toolbar Scoping to a sub-document with type="location" + location-id Reading unique-view counts from React (useUniqueViewsByUser, useUniqueViewsByDate hooks) or non-React (client.getViewsElement().get().subscribe(...)) code Building a fully custom trigger badge / viewer list using the wireframe tags ( , , ) Reading componentConfig. template variables (todayViewsCount, totalUniqueViewsCount, treadsVisible, userViews, bottomSheetMode, etc.) For general SDK , see velt- -best-practices for VeltProvider, auth, and document identity.

## Links

- HTML page: https://omgskills.com/library/velt-js/velt-plugin-cursor/skills/velt-view-analytics-best-practices/
- GitHub: https://github.com/velt-js/velt-plugin-cursor
- Author: [@velt-js](https://omgskills.com/library/velt-js/index.md)

## More from this repo

- [install-velt](https://omgskills.com/library/velt-js/velt-plugin-cursor/skills/install-velt/index.md) — Full guided installation of the Velt collaboration SDK into a React or Next.js project.
   - [@velt-js](https://omgskills.com/library/velt-js/index.md) · 0 stars
- [velt-activity-best-practices](https://omgskills.com/library/velt-js/velt-plugin-cursor/skills/velt-activity-best-practices/index.md) — Velt Activity Logs implementation patterns and best practices for React, Next.js, and web applications.
   - [@velt-js](https://omgskills.com/library/velt-js/index.md) · 0 stars
- [velt-approval-engine-best-practices](https://omgskills.com/library/velt-js/velt-plugin-cursor/skills/velt-approval-engine-best-practices/index.md) — Best practices for the Velt Approval Engine — the declarative workflow runtime for multi-step agent + human approval...
   - [@velt-js](https://omgskills.com/library/velt-js/index.md) · 0 stars
