This guide covers migrating your analytics from June's SDK (which closely mirrored Segment's API) to Amplitude's SDK.
We'll cover the key changes for tracking events, page views, user identification, and group (account) tracking.
Understanding Differences Between June and Amplitude
June's SDK uses an API similar to Segment's Analytics.js, with methods like `track()`, `identify()`, `page()`, and `group()`.
β
Amplitude's SDK is quite similar, but has its own methods for logging events and setting user or group properties.
Key Differences
Page Views: June had a dedicated `analytics.page()` call to record page views. Amplitude's SDK does not have a direct equivalent method. Instead, Amplitude can automatically log a page view event on initialization (as "[Amplitude] Page Viewed" by default) or you can manually track page views as custom events.
βUser Identification: June's `identify()` call both identifies a user and sets user traits.In Amplitude, identifying a user (assigning a user ID) is typically done with a `setUserId` or by providing `user_id` when logging events. Setting user properties in Amplitude is done via an Identify API (using an Identify object or an identify call) rather than in the event call itself.
Anonymous Id: In June events can have an anonymousId
, in Amplitude the equivalent field is called device_id
βGroup (Account) Tracking: June's `group()` call attached a user to an account/company (with an ID and traits). Amplitude supports group analytics (often called Account-Level Reporting) through a concept of groups. You must define a group type (e.g. "accountId" or "orgId") and assign users to groups with that type. Amplitude allows up to 5 distinct group types per project. Group traits (properties about the account) are set via a separate group identify call in Amplitude, rather than as part of the group call.
To get started with Amplitude's SDK the best place to go is the Amplitude SDK catalog.
Testing
Before switching off June, run both June and Amplitude in parallel
(to a test Amplitude project) to verify that the data captured in Amplitude matches what you expect.
Check that user properties and group properties appear correctly on the Amplitude dashboard. And as always feel free to reach out via the Intercom chat if you need help with migrating.