Repository navigation
Measure returning browsers, visits and model engagement - #69
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mix Studio's memory-only analytics identity made reloads look like unrelated users, and LTX 2.5 submissions were mislabeled as LTX 2.3. Persist a random browser ID per origin, create a fresh visit ID per page load/re-enable, and distinguish model request labels so audience reach, repeat visits, and engagement can be measured separately.
Keep the existing notice and Preferences control, update the copy for the saved ID, preserve existing opt-outs, synchronize opt-out across tabs, clear the ID on disable, and reject stale queued identities. The SDK retains memory persistence; person profiles and automatic collection stay disabled. Event filtering excludes prompts, media, URLs, device details, and arbitrary model text while preserving valid transport UUIDs for deduplication.
Add a local aggregate-report CLI and measurement documentation. Reports separate legacy identities from v2 browser counts and clearly label accepted API requests rather than completed generations. No live PostHog dashboard or production machine was changed.
Validation: 1,310 tests passed, 2 skipped; syntax and whitespace checks passed. An isolated Chrome fixture using the current real PostHog SDK intercepted all network traffic and verified two visits under one browser ID, LTX 2.5 model labeling, excluded private properties, and no requests after opt-out.