On this page

Migrate From Segment

Amplitude handles both Analytics and CDP needs. This document covers how to:

  1. Migrate your source and destination configuration.
  2. Update your SDK implementation to send data to Amplitude.
  3. Validate the migration.

The following table maps Segment offerings to their Amplitude equivalents.

Recommended best practice

Follow a strict release process and configure multiple environments. Validate changes within each environment before deploying.

Add a source

To add a new source:

  1. From Data, click Sources in the Connections section.
  2. Click Add Source.
  3. Browse or search for the source you want to add.
  4. Follow the on-screen prompts.

For detailed instructions, refer to the documentation for the source you want to add.

Update SDK implementation

Segment and Amplitude SDKs both capture first-party data by tracking user interactions, and they work similarly aside from syntax differences. The following table maps concepts between Segment and Amplitude.

SegmentAmplitudeNotes
write_keyapi_keyUnique key that validates the source of the data.
WorkspaceProjectProjects organize your data.
UserUserThe user performing the action.
IdentifyIdentifyIdentify updates user properties.
TrackEventAn event in Amplitude tracks an action a user performs.
ScreenEventCreate an event to track screen views.
PageEventCreate an event to track page views.
GroupGroupA group is a collection of users. In Amplitude, one user can belong to multiple groups. Each group can have properties that you can query or forward when any user in the group performs an action.
PluginsPluginsPlugins extend Amplitude by running custom code on every event.

Documentation for Browser 2 SDK.

Identify

Segment

typescript
analytics.identify('12091906-01011992', {
  name: 'Grace Hopper',
  email: 'grace@usnavy.gov'
});

Amplitude

typescript
setUserId('12091906-01011992');
identify(
  Identify()
    .set('name', 'Grace Hopper')
    .set('email', 'grace@usnavy.gov')
);

Track

Segment

typescript
analytics.track('Article Completed', {
  title: 'How to Create a Tracking Plan',
  course: 'Intro to Analytics',
});

Amplitude

typescript
track('Article Completed', {
  title: 'How to Create a Tracking Plan',
  course: 'Intro to Analytics',
});

Group

Segment

typescript
analytics.group('UNIVAC Working Group', {
  principles: ['Eckert', 'Mauchly'],
  site: 'Eckert–Mauchly Computer Corporation',
  statedGoals: 'Develop the first commercial computer',
  industry: 'Technology'
});

Amplitude

Assign user to a group:

typescript
amplitude.setGroup('Working Group', 'UNIVAC')

Update properties of a group:

typescript
groupIdentify(
  'Working Group',
  'UNIVAC' ,
  new Identify()
    .set('principles', ['Eckert', 'Mauchly']);
    .set('site', 'Eckert–Mauchly Computer Corporation');
    .set('statedGoals', 'Develop the first commercial computer');
    .set('industry', 'Technology')
);

For all other SDKs, refer to the relevant SDK documentation.

Validate events

Data validation is a critical step in instrumentation. Validate your event data using Amplitude's debugging tools.

Add a destination

To add a new destination:

  1. From Data, click Destinations in the Connections section.
  2. Click Add Destination.
  3. Browse or search for the destination you want to add.
  4. Follow the on-screen prompts.

For detailed instructions, refer to the documentation for the destination you want to add.

Migration checklist

Validate the migration to minimize impact on downstream data consumers.

  • [x] Added all sources to Amplitude
  • [x] Migrated existing tracking code to Amplitude SDKs
  • [x] Validated events are flowing in to Amplitude correctly
  • [x] Added all destinations to Amplitude
  • [x] Validated data is flowing into destinations correctly
  • [x] Validated downstream consumers aren't affected (for example, BI, Mktg, ML, Ops)

Frequently asked questions

Was this helpful?