Migrate From Segment

If you're looking for a platform that can handle both your Analytics and CDP needs, Amplitude can.

This document covers the necessary steps to:

  1. Migrate your Source and Destination configuration
  2. Update SDK implementation to send data to Amplitude
  3. Validate the migration is successful

Review the offerings that are available for Segment and how that stacks up to Amplitude.

Segment Amplitude
Connections Sources & Destinations
Profiles Audiences
Protocols Data Management

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, see the documentation for the source you want to add.

Update SDK implementation

Both Segment and Amplitude SDKs capture first party data by tracking user interactions. Other than some nuances around syntax, they work similarly. Here is high level mapping of concepts between Segment & Amplitude.

Segment Amplitude Notes
write_key api_key Unique key to validate source of the data.
Workspace Project Projects allow you to organize your data.
User User User who is performing action.
Identify Identify Identify updates properties/attributes of the user.
Track Event Event in Amplitude tracks the action user is performing.
Screen Event Create an Event to track Screen views.
Page Event Create an Event to track Page views.
Group Group Group is a collection of users. In Amplitude one user could belong to multiple groups. Each group can have properties/attributes that are then available to query/forward on actions performed by any user in the group.
Plugins Plugins Plugins let you extend Amplitude by running a sequence of custom code on every event.

Documentation for Browser 2 SDK.

Identify

Segment

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

Amplitude

1setUserId('12091906-01011992');
2identify(
3 Identify()
4 .set('name', 'Grace Hopper')
5 .set('email', 'grace@usnavy.gov')
6);

Track

Segment

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

Amplitude

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

Group

Segment

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

Amplitude

Assign user to a group:

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

Update properties of a group:

1groupIdentify(
2 'Working Group',
3 'UNIVAC' ,
4 new Identify()
5 .set('principles', ['Eckert', 'Mauchly']);
6 .set('site', 'Eckert–Mauchly Computer Corporation');
7 .set('statedGoals', 'Develop the first commercial computer');
8 .set('industry', 'Technology')
9);

Documentation for iOS Swift SDK.

Identify

Segment

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

Amplitude

1Amplitude.instance().setUserId("abc")
2Amplitude.instance().identify(
3 AMPIdentify()
4 .set("email", value: "female")
5 .set("age",value: NSNumber(value: 20))
6)

Track

Segment

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

Amplitude

1Amplitude.instance().logEvent("Button Clicked", withEventProperties: ["Hover Time": "100ms"] )

Group

Segment

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

Amplitude

Assign user to a group:

1Amplitude.instance().setGroup("orgName", groupName:NSString(string:"xyz"))

Update properties of a group:

1Amplitude.instance().groupIdentifyWithGroupType(
2 "orgName",
3 groupName:NSString(string:"xyz"),
4 groupIdentify:AMPIdentify().set("plan", value: "enterprise")
5)

Documentation for Android Kotlin SDK.

Identify

Segment

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

Amplitude

1amplitude.setUserId("abc")
2amplitude.identify(Identify().set("email", "abc@domain.com"))

Track

Segment

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

Amplitude

1amplitude.track(
2 "Product Viewed",
3 mutableMapOf<String, Any?>("name" to "Moto 360")
4)

Group

Segment

1Analytics.with(context).group("abc", "orgName-xyz", Traits().putplan("enterprise"))

Amplitude

Assign user to a group:

1amplitude.setGroup("orgName", "xyz");

Update properties of a group:

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

For all other SDKs, see the relevant SDK documentation.

Validate events

Data validation is a critical step in the instrumentation process. Amplitude lets validate your event data via Amplitude's debugging tools.

Add a destination

You can add a new destination in just a few clicks.

  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, see the documentation for the destination you want to add.

Migration checklist

It's important to validate the migration to make sure there is minimal impact on downstream data consumers.

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

Frequently asked questions

How long does it take to migrate?

This depends on how you implemented your CDP. Most teams should plan a few months to be able to complete your migration. If you're looking to update your taxonomy and tracking plan, this could require more upfront planning.

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

Amplitude regularly adds new integrations so either add a request in-product or ask your CSM and for a timeline.

What if I have an existing CDP contract?

Contact your CSM or AE to discuss what options are available.

Was this page helpful?

Thanks for your feedback!

July 2nd, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.