enhancementgood first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
Add Amplitude integration to sync product analytics events, user data, cohorts, and behavioral data into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/github-analytics/- Analytics-oriented integrationintegrations/linear/- Project management integrationintegrations/hubspot/- For user/contact data sync reference
Required Files Structure
integrations/amplitude/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Amplitude API utilities
│ ├── account-create.ts # API key setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Amplitude API Integration
OAuth Setup
- Use API Key + Secret Key authentication
- Keys available from Amplitude project settings
- HTTP API V2 (V1 is deprecated)
- Base URL:
https://amplitude.com/api/2
Key Endpoints
POST /2/events- Track events (HTTP API V2)GET /2/export- Export raw event data (date-range based)GET /2/users/{user_id}/events- Get user eventsGET /2/usersearch- Search for usersGET /2/useractivity- Get user activityGET /2/cohorts- List cohortsGET /2/cohorts/{id}- Get cohort detailsGET /2/annotations- List annotationsGET /2/charts/{id}/query- Query chart dataGET /2/taxonomy/event-types- List event types
Events to Track
- Events - All tracked product analytics events
- User Activity - User sessions, actions, and behavioral data
- Cohorts - User cohort membership and updates
- Annotations - Project annotations and notes
- Charts/Reports - Saved chart and dashboard data
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement API Key + Secret authentication in
account-create.ts - Create API utilities in
utils.tswith Amplitude HTTP API V2 client - Implement sync logic in
schedule.tsfor events, users, cohorts - Convert Amplitude analytics data to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Use HTTP API V2 (V1 is deprecated)
- Export API returns gzipped JSON for large data sets
- Date-range based export supports incremental syncing
- Rate limits vary by API endpoint and plan
- Supports both US and EU data centers
- Taxonomy API provides metadata about event types and properties
- Batch event upload supports up to 10 events per request (standard) or 1000+ (batch endpoint)
Resources
- Amplitude API Documentation
- Amplitude SDKs
- Amplitude Developers Portal
- Amplitude API Postman Collection
Labels
enhancement, integration, new-feature