Privacy Policy - [PAGE]
Event tracking respects user privacy settings and can be disabled through the application settings. No personally identifiable information is collected without explicit user consent.
Thunderbolt uses PostHog for analytics to track user interactions and application usage. All events follow a structured naming convention for better organization and analysis.
Events follow the pattern: <feature>_<action>
- Feature: The main area of the application (e.g.,
chat,task,automation) - Action: The specific action being performed (e.g.,
send_prompt,add,create)
chat_send_prompt- User sends a message to the AIchat_receive_reply- AI generates a responsechat_select- User selects a chat threadchat_new_clicked- User creates a new chatchat_delete- User deletes a chatchat_clear_all- User clears all chats
model_select- User selects a different AI model
settings_theme_set- User changes the application themesettings_name_set- User sets their preferred name initiallysettings_name_update- User updates their preferred namesettings_name_clear- User clears their preferred namesettings_location_set- User sets their location initiallysettings_location_update- User updates their locationsettings_localization_update- User updates localization settings (temperature, wind speed, precipitation, time format, language)settings_database_reset- User resets the application databasesettings_data_collection_enabled- User enables data collectionsettings_data_collection_disabled- User disables data collection
task_add- User adds a new tasktask_mark_complete- User marks a task as completetask_update_text- User edits task texttask_reorder- User reorders taskstask_search- User searches through tasks
automation_modal_create_open- Create automation modal opensautomation_create- New automation is createdautomation_modal_edit_open- Edit automation modal opensautomation_update- Existing automation is updatedautomation_run- Automation is executedautomation_delete_clicked- Delete automation button is clickedautomation_delete_confirmed- Automation deletion is confirmed
content_view_open- Content view opens (with properties:view_type,tool_namefor object views,sideview_typefor sideviews)content_view_close- Content view closes (with property:view_type)preview_open- Preview webview opens from a link clickpreview_close- Preview webview closespreview_copy_url- User copies URL from preview headerpreview_open_external- User opens preview URL in external browser
ui_shortcut_use- User uses a keyboard shortcutui_sidebar_open- Sidebar opensui_sidebar_close- Sidebar closes
Events are tracked using the trackEvent function from src/lib/posthog.tsx:
import { trackEvent } from '@/lib/posthog'
// Track a simple event
trackEvent('chat_send_prompt')
// Track an event with properties
trackEvent('chat_send_prompt', {
model: 'gpt-4',
length: 150,
})All event names are typed using the EventType union type, ensuring:
- Only valid event names can be used
- Autocomplete support in IDEs
- Compile-time error checking for typos
To add a new event:
- Add the event name to the
EventTypeunion insrc/lib/analytics.tsx - Use the
<feature>_<action>naming convention - Add the tracking call in the appropriate component
- Include relevant properties for analytics insights
- Update this file to document it