Skip to content

Commit

Permalink
chore: new segment event (invite) [INS-3938]
Browse files Browse the repository at this point in the history
  • Loading branch information
filfreire committed Jun 6, 2024
1 parent 6b22f1d commit a2840f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/insomnia/src/ui/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum SegmentEvent {
documentCreate = 'Document Created',
mockCreate = 'Mock Created',
loginSuccess = 'Login Success',
inviteTrigger = 'Invite Triggered From App',
exportAllCollections = 'Exported All Collections',
kongConnected = 'Kong Connected',
kongSync = 'Kong Synced',
Expand Down
2 changes: 2 additions & 0 deletions packages/insomnia/src/ui/routes/organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { VCSInstance } from '../../sync/vcs/insomnia-sync';
import { migrateProjectsIntoOrganization, shouldMigrateProjectUnderOrganization } from '../../sync/vcs/migrate-projects-into-organization';
import { insomniaFetch } from '../../ui/insomniaFetch';
import { invariant } from '../../utils/invariant';
import { SegmentEvent } from '../analytics';
import { getLoginUrl } from '../auth-session-provider';
import { Avatar } from '../components/avatar';
import { CommandPalette } from '../components/command-palette';
Expand Down Expand Up @@ -477,6 +478,7 @@ const OrganizationRoute = () => {
className="px-4 text-[--color-font-surprise] bg-opacity-100 bg-[rgba(var(--color-surprise-rgb),var(--tw-bg-opacity))] py-2 h-full font-semibold border border-solid border-[--hl-md] flex items-center justify-center gap-2 aria-pressed:opacity-80 rounded-md hover:bg-opacity-80 focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"
onPress={() => {
window.main.openInBrowser(`${getAppWebsiteBaseURL()}/app/dashboard/organizations/${organizationId}/collaborators`);
window.main.trackSegmentEvent({ event: SegmentEvent.inviteTrigger });
}}
>
<Icon icon="user-plus" />
Expand Down

0 comments on commit a2840f7

Please sign in to comment.