Skip to content

feat: offer event tracking as onboarding option - #37

Open
bespoyasov wants to merge 10 commits into
mainfrom
feat/offer-tracking-events
Open

feat: offer event tracking as onboarding option#37
bespoyasov wants to merge 10 commits into
mainfrom
feat/offer-tracking-events

Conversation

@bespoyasov

@bespoyasov bespoyasov commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator
  • Adds event tracking as an option for onboarding goals
  • Allows multi-selection for onboarding goal selector
Screenshot 2026-08-20 at 13 40 45 Screenshot 2026-08-20 at 13 40 50

@bespoyasov
bespoyasov marked this pull request as ready for review August 20, 2026 12:31

@filipmyllari filipmyllari left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a few comments 😄

}

- \`<session recording SDK package name>\``;
if (!goals.includes('feature-flags')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Duplicate .env + SDK init entries when event-tracking is selected alone

When goals doesn't include feature-flags, lines 44–47 unconditionally add .env and SDK initialization entries. But if only event-tracking is selected, the template also adds at line 41 — resulting in a vague dep line alongside the specific .env/init entries. More importantly, if goals is ['session-recordings'] alone, you get both the session-recording-specific entry point line and a second generic "added SDK initialization" line, which produces duplicate/confusing "entry point file" entries.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I think it can be completely reworked now; have an idea

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is 'done' ever reachable now that you removed it from line 21?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

True; phasing is gone, I'll remove everything related to it, thanks!

Comment on lines +88 to +93
function goalPreamble(goals: OnboardingGoal[]): string {
const labels = goals.map((g) => GOAL_LABELS[g]);
if (labels.length <= 2) return labels.join(' and ');
return labels.slice(0, -1).join(', ') + ', and ' + labels.at(-1);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would prob add an empty guard here if values.length somehow comes here as 0 😊

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Conceptually, if it is 0, then the onboarding is considered “skipped,” but I suppose a general check wouldn't hurt still

Comment on lines +25 to +30
<Box marginTop={1}>
<Text color={Colors.warning}>
{Icons.star} Event Tracking works best with a managed warehouse or an existing
warehouse setup.
</Text>
</Box>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The warehouse note for Event Tracking is always displayed, even on non-browser frameworks that don't show Session Recordings. This is intentional since Event Tracking is in BASE_GOALS, but it means the note renders even if the user doesn't intend to select Event Tracking. Consider showing it conditionally (e.g. only when Event Tracking is toggled on), or if the always-visible note is intentional, this is fine — just flagging as a UX consideration.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, sounds reasonable, will add this, thanks!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Although, on the second thought, having it right away makes is easier to make an informed choice without the need to switch focus when selecting option 🤔

I'd say, let's keep it “as is” for now and if we notice it inconvenient, change it?

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