feat: attribution implementation - #211
Merged
Merged
Conversation
|
Your Vercel team Analytics Test Projects is not permitted to deploy from this git repository. Contact an administrator to add github organization vercel as a Protected Git Scope in Analytics Test Projects on Vercel. Once added, commit again to see your changes. Learn more: https://vercel.com/docs/security/protected-git-scopes |
feugy
marked this pull request as ready for review
September 21, 2026 14:29
AndyBitz
approved these changes
Sep 21, 2026
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.
🖖 What's in there?
reset()to forget the user and group set byidentify()andgroup(), for example on logout.identify,groupandresetfrom every framework entry (/react,/next,/remix,/vue,/sveltekit,/sveltekit-next,/nuxt), not only from the root.track()acceptsuserId,groupIdandpropsin its options, liketrackExposure()already did.trackExposure()also accepts them in its options, which take precedence over the same fields on the input.🤺 How to test?
pnpm -F @vercel/analytics testpnpm -F @vercel/analytics build, then check that eachdist/**/index.d.tsexportsgroup,identifyandreset, and thatdist/server/index.d.tsdoes not expose__cdp.🔬 Notes to reviewers
reset()only pusheswindow.va('reset'). The script remembers and clears the profile; that logic lives in vercel/front#87213, which must deploy first.propsgoes throughparseProperties()like event properties: throws in development, strips in production.server/profiles.tsis renamed toserver/attribution.tsand gathers the sharedAttributiontype andattributionPayload()helper next toidentify/group. Public exports are unchanged.🔗 Related PRs
userId,groupId,propsto every row; handlesreset.