Skip to content

feat: add Aptabase analytics tracking - #23

Merged
stepandel merged 4 commits into
masterfrom
feature/add-aptabase-analytics
Feb 2, 2026
Merged

feat: add Aptabase analytics tracking#23
stepandel merged 4 commits into
masterfrom
feature/add-aptabase-analytics

Conversation

@stepandel

Copy link
Copy Markdown
Owner

Summary

  • Adds Aptabase analytics integration using @aptabase/electron
  • Tracks key user actions and app lifecycle events
  • Simple, non-intrusive implementation with environment variable configuration

Tracked Events

  • app_started: When the app launches
  • app_closed: When the app quits
  • pinecone_connected: When user successfully connects to Pinecone
  • vectors_searched: When user searches vectors (includes topK parameter)
  • index_duplicated: When user duplicates an index (includes vector count)

Implementation Details

  • Created electron/analytics.ts module for centralized analytics management
  • Analytics only initialize if APTABASE_APP_KEY environment variable is set
  • All tracking calls fail silently if analytics is not initialized
  • No user-facing changes or UI modifications

Setup

To enable analytics, set the APTABASE_APP_KEY environment variable or update the placeholder in electron/analytics.ts.

Test plan

  • Verify app starts without errors when no analytics key is provided
  • Verify analytics events are tracked when key is configured
  • Test all tracked user actions: connect, search, duplicate index
  • Confirm no console errors or warnings in production

🤖 Generated with Claude Code

stepandel and others added 2 commits February 1, 2026 11:46
Some embedding models have strict limits on batch sizes and were
crashing during namespace duplication when trying to generate
embeddings for 100 vectors at once. Reducing the batch size to 50
provides better compatibility with various embedding APIs while
still maintaining reasonable performance.

This affects:
- cloneNamespace: processes 50 vectors per batch
- upsertVectors: batches in groups of 50
- batchImport: imports in batches of 50

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds analytics tracking using @aptabase/electron to monitor app usage and
key user actions. The implementation is simple and non-intrusive.

Tracked events:
- app_started: When the app launches
- app_closed: When the app quits
- pinecone_connected: When user connects to Pinecone
- vectors_searched: When user searches vectors (includes topK param)
- index_duplicated: When user duplicates an index (includes vector count)

To enable analytics, set the APTABASE_APP_KEY environment variable or
update the placeholder in electron/analytics.ts.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Feb 2, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

stepandel and others added 2 commits February 1, 2026 16:47
- index_created (cloud, region, metric, dimension)
- index_deleted
- namespace_duplicated (vectorsCopied)
- vector_created
- vector_updated
- vectors_deleted (count)
- vectors_imported (count)

All events use only generic metadata - no private data exposed.
@stepandel
stepandel merged commit 4a09e87 into master Feb 2, 2026
1 check passed
@stepandel
stepandel deleted the feature/add-aptabase-analytics branch February 2, 2026 06:38
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.

1 participant