RedPlanetHQ/core

New Integration: Amplitude

Open

#492 opened on Feb 24, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (184 forks)auto 404
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 integration
  • integrations/linear/ - Project management integration
  • integrations/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 events
  • GET /2/usersearch - Search for users
  • GET /2/useractivity - Get user activity
  • GET /2/cohorts - List cohorts
  • GET /2/cohorts/{id} - Get cohort details
  • GET /2/annotations - List annotations
  • GET /2/charts/{id}/query - Query chart data
  • GET /2/taxonomy/event-types - List event types

Events to Track

  1. Events - All tracked product analytics events
  2. User Activity - User sessions, actions, and behavioral data
  3. Cohorts - User cohort membership and updates
  4. Annotations - Project annotations and notes
  5. Charts/Reports - Saved chart and dashboard data

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement API Key + Secret authentication in account-create.ts
  • Create API utilities in utils.ts with Amplitude HTTP API V2 client
  • Implement sync logic in schedule.ts for 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

Labels

enhancement, integration, new-feature

Contributor guide