Skip to content

feat: consent analytics#2512

Merged
chaitanyapotti merged 3 commits into
masterfrom
feat/consent-analytics
Jun 3, 2026
Merged

feat: consent analytics#2512
chaitanyapotti merged 3 commits into
masterfrom
feat/consent-analytics

Conversation

@lwin-kyaw
Copy link
Copy Markdown
Contributor

@lwin-kyaw lwin-kyaw commented Jun 3, 2026

Jira Link

https://consensyssoftware.atlassian.net/browse/EMBED-53?atlOrigin=eyJpIjoiZjE1ODBiMDE4YmJjNGI5YTkzNjZmMTQ5N2RiYTA4MTEiLCJwIjoiaiJ9

Description

Add analytics related to the consent flow.

How has this been tested?

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Analytics

Checklist

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Low Risk
Changes are observability-only (analytics + event payload typing) with no auth or consent logic changes beyond passing connector metadata; lockfile updates are routine version bumps.

Overview
Adds Segment analytics for the user consent flow and related legal-link clicks across modal and no-modal.

New ANALYTICS_EVENTS cover consent started, accepted, declined, and errored, plus Terms of Service and Privacy Policy link clicks. The modal SDK tracks accept/decline (with connector context and error messages on failure) in modalManager, fires User Consent Started when the consent UI appears in loginModal, and records ToS/privacy clicks from the Footer and consent Loader via AnalyticsContext.

CONSENT_REQUIRING now carries partial connected-event data (connectorName) from noModal so analytics can attribute the connector; consent event TypeScript types were updated accordingly. Tests were adjusted to use LinkedAccountInfo instead of ConnectedAccountInfo. Lockfiles bump workspace packages from 11.0.0-beta.2 to 11.0.1 and include incidental optional-native dependency metadata churn.

Reviewed by Cursor Bugbot for commit 7826580. Bugbot is set up for automated code reviews on this repo. Configure here.

@lwin-kyaw lwin-kyaw requested review from a team as code owners June 3, 2026 07:31
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jun 3, 2026 7:48am

Request Review

Comment thread packages/modal/src/ui/loginModal.tsx
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c4337ad. Configure here.

Comment thread packages/modal/src/ui/components/Footer/Footer.tsx
Comment thread packages/modal/src/modalManager.ts
@chaitanyapotti chaitanyapotti merged commit ba30ca8 into master Jun 3, 2026
7 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/consent-analytics branch June 3, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants