-
Notifications
You must be signed in to change notification settings - Fork 7
Blocked webs/apps event Posthog #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- New event: 'apps_and_websites_blocked'
2. Added Analytics Properties (src/lib/analytics.ts:164-170)
- blocked_apps_count: Number of apps being blocked
- blocked_websites_count: Number of websites being blocked
- total_blocked_count: Total count of blocked items
- is_block_list: Whether it's a block list or allow list
- blocked_app_names: Array of app names being blocked
- blocked_website_names: Array of website names being blocked
3. Created Analytics Data Function (src/api/ebbApi/blockingPreferenceApi.ts:150-187)
- New function getWorkflowBlockedAppsAnalytics() that:
- Reuses the same logic as getWorkflowBlockedApps() to get all blocked apps
- Separates apps from websites based on the is_browser flag
- Returns detailed analytics data including counts and names
4. Added Tracking Call (src/pages/FlowPage/FlowPage.tsx:70-79)
- Tracks the event when blocking starts
- Includes all the analytics data along with workflow info
- Only visible on PostHog dashboard for internal analysis
Now when users start a focus session, you'll be able to see in PostHog:
- How many apps/websites are being blocked per session
- Which specific apps/websites are most commonly blocked
- Whether users prefer block lists vs allow lists
- Patterns across different workflows
Added PostHog event tracking to monitor when users attempt to access blocked apps/websites during focus sessions. Changes: - Added 'app_or_website_block_attempt' event type in analytics.ts - Added 'blocked_item_name' property to track specific blocked items - Listen to 'on-app-blocked' event in useNotificationListener.ts - Extract trackBlockedApps() helper function for cleaner code - Use app_external_id for websites (URLs) and app_name for apps - Each block attempt fires a separate PostHog event
|
|
||
| The monitoring service is a Rust application that runs on your computer and is responsible for recording your activities. It is designed to be run as a background service and will not interfere with your workflow. Makes use of the os-monitor crate to monitor your activities and then record them to the database on your device. | ||
|
|
||
| # [Monitor](https://github.com/CodeClimbersIO/os-monitor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accident*
src/hooks/usePermissions.ts
Outdated
| const permissions = licenseData?.permissions || defaultPermissions | ||
| // In dev mode, grant all pro permissions | ||
| const isDevMode = isDev() | ||
| console.log('[usePermissions] isDev:', isDevMode, 'import.meta.env.DEV:', import.meta.env.DEV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove console logs
src/hooks/usePermissions.ts
Outdated
| ? devPermissions | ||
| : (licenseData?.permissions || defaultPermissions) | ||
|
|
||
| console.log('[usePermissions] permissions:', permissions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
Track individual app/website block attempts in PostHog