---
title: Migrate from Segment to Amplitude
description: "Migrate from Segment to Amplitude: move sources and destinations, map identify, track, page, group, and alias calls to the Amplitude SDK, and validate events with a checklist."
product: general
lang: en
last_updated: 2026-11-10
token_estimate: 2762
---
# Migrate from Segment to Amplitude

Migrating from Segment moves your event collection and data routing to Amplitude, which covers both [Analytics](https://amplitude.com/amplitude-analytics) and [CDP](https://amplitude.com/customer-data-platform) workloads. The migration has three parts:

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

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.

| Segment | Amplitude |
| --- | --- |
| [Connections](https://segment.com/product/connections/) | [Sources](https://amplitude.com/docs/data/source-catalog) & [Destinations](https://amplitude.com/docs/data/destination-catalog) |
| [Profiles](https://segment.com/product/profiles/) | [Predictive analytics](https://amplitude.com/docs/analytics/predictive/predictive-analytics) |
| [Protocols](https://segment.com/product/protocols/) | [Data Management](https://amplitude.com/docs/data) |

> **Tip:** Keep Segment and send data to Amplitude
>
> If you plan to keep Segment as your collection layer, you don't need to change your tracking code. Connect Segment's Amplitude (Actions) destination instead. Refer to [Segment](https://amplitude.com/docs/data/source-catalog/segment).

> **Info:** Recommended best practice
>
> Follow a strict release process and [configure multiple environments](https://amplitude.com/docs/data/amplitude-data-settings). Validate changes within each environment before deploying.

## Add a source

To add a [new source](https://amplitude.com/docs/data/source-catalog):

1. In _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](https://amplitude.com/docs/data/source-catalog) 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.

| Segment | Amplitude | Notes |
| --- | --- | --- |
| write\_key | api\_key | Unique key that validates the source of the data. |
| Workspace | Project | [Projects](https://amplitude.com/docs/admin/account-management/manage-orgs-projects) organize your data. |
| User | User | The user performing the action. |
| Identify | `setUserId` and Identify | `setUserId` sets the user ID. Identify updates user properties. |
| Track | Event | An [event](https://amplitude.com/docs/apis/analytics/http-v2/) in Amplitude tracks an action a user performs. |
| Screen | Event | Create an event to track screen views. |
| Page | Event | Browser SDK 2 tracks page views by default as `[Amplitude] Page Viewed`. Refer to [Autocapture differences](#autocapture-differences). |
| Group | Group | A 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. |
| Alias | None | Amplitude automatically merges anonymous activity with the known user. Refer to [Alias](#alias). |
| Plugins | Plugins | Plugins extend Amplitude by running custom code on every event. |

#### Browser

Documentation for [Browser 2 SDK](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2/get-started).

### Identify

#### Segment

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

#### Amplitude

```typescript
amplitude.setUserId("12091906-01011992");
amplitude.identify(
  new amplitude.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
amplitude.track("Article Completed", {
  title: "How to Create a Tracking Plan",
  course: "Intro to Analytics",
});
```

### Page

#### Segment

```typescript
analytics.page("Pricing");
```

#### Amplitude

Browser SDK 2 tracks page views by default, so you can remove `page()` calls. To track a named page view yourself, turn off `autocapture.pageViews` and send an event:

```typescript
amplitude.track("Page Viewed", { name: "Pricing" });
```

### 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
amplitude.groupIdentify(
  "Working Group",
  "UNIVAC",
  new amplitude.Identify()
    .set("principles", ["Eckert", "Mauchly"])
    .set("site", "Eckert–Mauchly Computer Corporation")
    .set("statedGoals", "Develop the first commercial computer")
    .set("industry", "Technology"),
);
```

#### iOS

Documentation for [iOS Swift SDK](https://amplitude.com/docs/sdks/analytics/ios/ios-swift-sdk/get-started).

### Identify

#### Segment

```swift
Analytics.shared().identify("abc", traits: ["email": "abc@domain.com"])
```

#### Amplitude

```swift
amplitude.setUserId(userId: "abc")
amplitude.identify(
  identify: Identify().set(property: "email", value: "abc@domain.com")
)
```

### Track

#### Segment

```swift
Analytics.shared().track("Button Clicked", properties: ["Hover Time": "100ms"])
```

#### Amplitude

```swift
amplitude.track(eventType: "Button Clicked", eventProperties: ["Hover Time": "100ms"])
```

### Group

#### Segment

```swift
Analytics.shared().group("OrgName-xyz", traits: ["plan": "enterprise"])
```

#### Amplitude

Assign user to a group:

```swift
amplitude.setGroup(groupType: "orgName", groupName: "xyz")
```

Update properties of a group:

```swift
amplitude.groupIdentify(
  groupType: "orgName",
  groupName: "xyz",
  identify: Identify().set(property: "plan", value: "enterprise")
)
```

#### Android

Documentation for [Android Kotlin SDK](https://amplitude.com/docs/sdks/analytics/android/android-kotlin-sdk/get-started).

### Identify

#### Segment

```kotlin
Analytics.with(context).identify("abc", Traits().putEmail("abc@domain.com"), null)
```

#### Amplitude

```kotlin
amplitude.setUserId("abc")
amplitude.identify(Identify().set("email", "abc@domain.com"))
```

### Track

#### Segment

```kotlin
Analytics.with(context).track("Product Viewed", Properties().putValue("name", "Moto 360"))
```

#### Amplitude

```kotlin
amplitude.track(
  "Product Viewed",
  mutableMapOf<String, Any?>("name" to "Moto 360")
)
```

### Group

#### Segment

```kotlin
Analytics.with(context).group("orgName-xyz", Traits().putValue("plan", "enterprise"))
```

#### Amplitude

Assign user to a group:

```kotlin
amplitude.setGroup("orgName", "xyz")
```

Update properties of a group:

```kotlin
amplitude.groupIdentify("orgName", "xyz", Identify().set("plan", "enterprise"))
```

For all other SDKs, refer to the relevant [SDK documentation](https://amplitude.com/docs/sdks/analytics).

### Alias

Segment uses `alias()` to link an anonymous ID to a known user ID. Amplitude doesn't need a separate alias call. When you call `setUserId()`, Amplitude merges the anonymous events from the current device ID with that user ID. For details, refer to [Track unique users](https://amplitude.com/docs/data/sources/instrument-track-unique-users).

Amplitude doesn't merge two different user IDs automatically. To map one user ID to another across projects, use the [User Mapping (Aliasing) API](https://amplitude.com/docs/apis/analytics/user-mapping), which requires the Portfolio add-on.

### Minimum ID length

Amplitude requires user IDs and device IDs to have at least 5 characters. If an ID is shorter, Amplitude removes it from the event. If the event then has neither a user ID nor a device ID, Amplitude can reject it. Segment has no minimum ID length, so check for short IDs such as numeric database keys (`"42"`) before you migrate.

To accept shorter IDs, either:

- Set the [`minIdLength`](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2/reference#configuration-options) option when you initialize Browser SDK 2.
- Pass `min_id_length` in the request options for the [HTTP V2 API](https://amplitude.com/docs/apis/analytics/http-v2).

### Autocapture differences

Segment's Analytics.js sends only the calls you write, plus one `page()` call in the default snippet. Browser SDK 2 captures some events by default, so remove your own calls for the same interactions to avoid duplicates. With the default configuration, Browser SDK 2 captures:

- Page views
- Sessions (start and end)
- Marketing attribution
- Form interactions (start and submit)
- File downloads
- Page URL properties on every event

Element clicks, frustration interactions (such as rage clicks), web vitals, and network requests are off by default. For all autocapture options, refer to [Autocapture](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2/instrument-and-configure#autocapture).

## Validate events

Data validation is a critical step in instrumentation. Validate your event data using Amplitude's debugging [tools](https://amplitude.com/docs/analytics/debug-analytics).

## Add a destination

To add a [new destination](https://amplitude.com/docs/data/destination-catalog):

1. In _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](https://amplitude.com/docs/data/destination-catalog) 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

#### How long does it take to migrate?

Migration time depends on how you implemented your CDP. Most teams should plan a few months to complete the migration. Updating your taxonomy and tracking plan can require more upfront planning.

#### What if I don't see an integration that I need?

Amplitude regularly adds new integrations. Add a request in-product or ask your CSM for a timeline.

#### What if I have an existing CDP contract?

Contact your CSM or AE to discuss available options.

