[PULSE-51] Visitor ID storage: optional localStorage for cross-tab unique visitors #21

Merged
uz1mani merged 17 commits from staging into main 2026-02-11 15:14:13 +00:00
3 changed files with 87 additions and 12 deletions
Showing only changes of commit 2d3d20f1e2 - Show all commits

View File

@@ -12,16 +12,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### Added
- **Visitor ID storage: optional localStorage for cross-tab unique visitors (PULSE-51).**
- Default: cross-tab visitor ID in `localStorage` so the same person with multiple tabs/windows (same origin) is counted as one visitor. Optional `data-storage-ttl` attribute sets TTL in hours; after expiry the script regenerates the ID.
- Optional `data-storage="session"` opts out to per-tab (ephemeral) counting using `sessionStorage`, preserving the previous privacy-first, no-persistent-ID behaviour when desired.
- Script embed snippet and dashboard copy updated to describe the default and the opt-out. No backend or schema changes; events remain keyed by `session_id`.
- **Smarter unique visitor counts.** If someone opens your site in several tabs or windows, theyre now counted as one visitor by default, so your stats better reflect real people.
- **Control over how visitors are counted.** You can switch back to “one visitor per tab” (more private, no lasting identifier) by adding an option to your script embed. The dashboard shows the right snippet for both options.
- **Optional expiry for the visitor ID.** You can set how long the cross-tab visitor ID is kept (e.g. 24 hours); after that its refreshed automatically.
## [0.1.0] - 2026-02-09
### Added
- Initial changelog and release process (PULSE-28).
- Initial changelog and release process.
- Release documentation in `docs/releasing.md` and optional changelog check script.
greptile-apps[bot] commented 2026-02-11 14:38:12 +00:00 (Migrated from github.com)
Review

Missing changelog links

This update removes the reference links at the bottom ([Unreleased], [0.1.0]) but doesn’t add replacements for the new headings ([0.2.0-alpha], [0.1.0-alpha]). As written, ## [0.2.0-alpha] and ## [0.1.0-alpha] will render as dead reference links.

Either keep the headings unlinked (## 0.2.0-alpha) or re-add the reference definitions for the new versions.

Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 19:21

Comment:
**Missing changelog links**

This update removes the reference links at the bottom (`[Unreleased]`, `[0.1.0]`) but doesn’t add replacements for the new headings (`[0.2.0-alpha]`, `[0.1.0-alpha]`). As written, `## [0.2.0-alpha]` and `## [0.1.0-alpha]` will render as dead reference links.

Either keep the headings unlinked (`## 0.2.0-alpha`) or re-add the reference definitions for the new versions.

How can I resolve this? If you propose a fix, please make it concise.
**Missing changelog links** This update removes the reference links at the bottom (`[Unreleased]`, `[0.1.0]`) but doesn’t add replacements for the new headings (`[0.2.0-alpha]`, `[0.1.0-alpha]`). As written, `## [0.2.0-alpha]` and `## [0.1.0-alpha]` will render as dead reference links. Either keep the headings unlinked (`## 0.2.0-alpha`) or re-add the reference definitions for the new versions. <details><summary>Prompt To Fix With AI</summary> `````markdown This is a comment left during a code review. Path: CHANGELOG.md Line: 19:21 Comment: **Missing changelog links** This update removes the reference links at the bottom (`[Unreleased]`, `[0.1.0]`) but doesn’t add replacements for the new headings (`[0.2.0-alpha]`, `[0.1.0-alpha]`). As written, `## [0.2.0-alpha]` and `## [0.1.0-alpha]` will render as dead reference links. Either keep the headings unlinked (`## 0.2.0-alpha`) or re-add the reference definitions for the new versions. How can I resolve this? If you propose a fix, please make it concise. ````` </details>
uz1mani commented 2026-02-11 14:44:10 +00:00 (Migrated from github.com)
Review

Issue: The version headings [0.2.0-alpha] and [0.1.0-alpha] had no reference definitions at the bottom, so they rendered as dead links.
Fix: Re-added the reference link block: [Unreleased], [0.2.0-alpha], and [0.1.0-alpha] with the correct GitHub compare/release URLs.
Why: Keeps the changelog consistent with Keep a Changelog and makes the version headings clickable to the right diffs and release.

Issue: The version headings [0.2.0-alpha] and [0.1.0-alpha] had no reference definitions at the bottom, so they rendered as dead links. Fix: Re-added the reference link block: [Unreleased], [0.2.0-alpha], and [0.1.0-alpha] with the correct GitHub compare/release URLs. Why: Keeps the changelog consistent with Keep a Changelog and makes the version headings clickable to the right diffs and release.
---