Unique page views in Amplitude differs from Segment data


We have a Segment - Amplitude events pipeline.

Recently I found that the unique number of page views in Segment differs from Amplitude.


Segment data:

I take all page views and GROUP BY COALESCE(UserId, AnonymousId)



Simply a segmentation by `Views` (Page event) + Unique users.


The difference is about 20%, so I’m trying to figure out which value is correct, or how is the unique number is calculated?


Best answer by jmagg 20 May 2022, 21:54

View original

4 replies

Userlevel 5
Badge +6

Hi @user73 - appreciate your question! The difference in unique user counts between Segment & Amplitude can be attributed to how Amplitude tracks unique users. To ensure an accurate count of unique users, Amplitude employs a solution using a combination of device IDs, user IDs, and Amplitude IDs. This article explains how that process works, and the roles each of these properties plays in it. Because this way of tracking users is unique to Amplitude, I'd imagine Segment tracks users differently, which is why the counts do not match between the two platforms. Hope this helps clarify & please let me know if you have any questions!


thank you for your answer.

I’m wondering how do identify the device if Segment does not provide such info?

I don’t need to reproduce exactly the same algorithm, but to have some correlation with the Amplitude as we are using it as a main tool for analytics, but also have some boards based on unique users views. 

Userlevel 5
Badge +6

Hi @user73 - Segment (cloud-mode) sends data to Amplitude via the HTTP API. When an event is sent via HTTP API & a device_id is not sent with the event, it will be automatically set to a hashed version of the user_id. If a device_id is sent with the event, we ingest that information exactly as it's sent to us. Also, here is a document on how Segment sets device ID for Amplitude events. 
Does this information help?

Userlevel 6
Badge +9

Thank you @jmagg I’ve just marked this as the best answer!