Add meaningful product usage analytics - #112
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Adds a small, provider-neutral product analytics layer and wires it to real product outcomes so Vercel pageviews can be separated from meaningful Posecode usage. No new analytics vendor is introduced.
Event dictionary
preset_openedsource,preset_ideditor_changeddocument_kindrender_succeededviewer.load()for a new meaningful revisiontrigger,document_kindshare_createdshare_kindembed_docs_clicked/for-productslocationinstall_command_copiedcommand,locationPreset sources distinguish
library,direct_url,shared_link, andlanding_cta. Editor changes are deduplicated to the first user edit per page session. Render events are revision-deduplicated and never fire from the animation loop.Privacy and reliability
fix/reduce-contact-warningsworktree changes are not included in this branch or PR.Provider and manual production setup
Vercel Hobby includes pageviews but does not support custom events; custom events require Pro or Enterprise. Pageviews remain enabled as before. On an eligible production project:
VITE_PRODUCT_ANALYTICS_PROVIDER=vercelfor Production.Full details are in
docs/product-analytics.md.Validation
npm test— 38 files, 406 tests passednpm run typecheck— passednpm run build— passedgit diff --check— passedThe production build retains the existing renderer chunk-size warning; no new build failure was introduced.