Skip to content

fix(analytics): subscription success not tracked and signup events not sent to all providers#2256

Merged
dev-rb merged 3 commits intomainfrom
rahul/fix-analytics-sub-success-and-signup-tracking
Mar 30, 2026
Merged

fix(analytics): subscription success not tracked and signup events not sent to all providers#2256
dev-rb merged 3 commits intomainfrom
rahul/fix-analytics-sub-success-and-signup-tracking

Conversation

@dev-rb
Copy link
Copy Markdown
Contributor

@dev-rb dev-rb commented Mar 30, 2026

No description provided.

@dev-rb dev-rb requested a review from a team as a code owner March 30, 2026 15:46
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 676d7ff4-0cc8-4595-8b25-582c9b6a60c9

📥 Commits

Reviewing files that changed from the base of the PR and between 8dc2766 and 26b197c.

📒 Files selected for processing (1)
  • js/app/packages/app/component/auth/LoginOptions.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Improved analytics: subscription success events now include provider details.
    • SSO/login flows report which analytics providers were used for events.
    • Exposed provider support to enable multi-provider analytics reporting.

Walkthrough

Base analytics type is exported and re-exported; Root.tsx now obtains analytics via useAnalytics() and tracks subscription success with analytics.track; LoginOptions.tsx passes provider lists to analytics.track during SSO/login flows.

Changes

Cohort / File(s) Summary
Analytics Type Export
js/app/packages/app/lib/analytics/analytics.ts, js/app/packages/app/lib/analytics/index.ts
AnalyticsProvider changed from a file-local type to an exported type and re-exported from the analytics index.
Root analytics hook
js/app/packages/app/component/Root.tsx
Switched to useAnalytics() and replaced previous tracking call with analytics.track('subscription_success', { type }) on subscriptionSuccess === 'true' (other control flow unchanged).
LoginOptions tracking args
js/app/packages/app/component/auth/LoginOptions.tsx
Imports AnalyticsProvider; derives analyticsProviders based on signupMode and passes that provider array as a third argument to analytics.track() in SSO/login branches.

Possibly related PRs

🚥 Pre-merge checks | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title exceeds the 72-character limit at 92 characters and does not follow the conventional commits format requirement. Shorten the title to under 72 characters while maintaining the fix: prefix, e.g., 'fix(analytics): track subscription success and signup events'
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the analytics tracking fixes and the changes to subscription success logging and signup event provider routing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@js/app/packages/app/component/auth/LoginOptions.tsx`:
- Line 20: The import for AnalyticsProvider is type-only; change the import
statement in LoginOptions.tsx to use TypeScript's type-only import (import type
{ AnalyticsProvider } ...) to clarify it's a type import, and if
AnalyticsProvider is later used as a value anywhere in this file (e.g., in
runtime code or JSX) convert that usage to a proper runtime value or keep a
separate value import; update the import line where AnalyticsProvider is
declared so the compiler and linters treat it as a type-only import.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 10f0e4ff-1c4b-42d9-8bfe-3244117a122e

📥 Commits

Reviewing files that changed from the base of the PR and between 1eb5131 and 8dc2766.

📒 Files selected for processing (4)
  • js/app/packages/app/component/Root.tsx
  • js/app/packages/app/component/auth/LoginOptions.tsx
  • js/app/packages/app/lib/analytics/analytics.ts
  • js/app/packages/app/lib/analytics/index.ts

@dev-rb dev-rb merged commit 6c60d3a into main Mar 30, 2026
21 of 22 checks passed
@dev-rb dev-rb deleted the rahul/fix-analytics-sub-success-and-signup-tracking branch March 30, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants