Hey all, Has anyone tried to get a list of all the aliases for a user? My backend engineer has tried running both API and JQL queries, and, at best, I can only get two of the unique IDs. I have some users who may have 5 or 6.
you can get them in the UI by clicking under their name and expanding the distinct id field
I don't know how to do it programatically though
yeah, that's the problem I'm running into. We need to pull it programmatically, and the output only ever produces a maximum of two, regardless of how many are in the array
if anyone has any insight on how to make it work for a api or jql call, we'd certainly appreciate the insight! We've got a ticket in with support, so, if we find out from elsewhere, I'll pop the answer in here, too
are you on legacy ID merge or original?
double-checking with my lead. Just a moment!
original is my understanding
i don't think aliases do anything or much for original id merge
they're mostly for legacy id merge
all right, here's what support gave us: We have an undocumented endpoint with our Query API /engage that can retrieve the distinct_ids in a cluster (programmatically). However, with this Alias endpoint, it does not have a way to query multiple distinct_ids/aliases at once (it can only query one alias/distinct_id at a time). Additionally, this endpoint is subject to the rate limits with our Query API (Formatted API) which can be found here: https://developer.mixpanel.com/reference/rate-limits so it may not work for your use case since you’re looking for a couple thousand users. Note - here is an example request:
curl --request POST \
--url 'https://mixpanel.com/api/2.0/engage/aliases?project_id=YOURPROJECTID' \
--header 'Accept: application/json' \
--header 'Authorization: Basic BASE_64_ENCODED_API_SECRET' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data distinct_id=TheUUIDFromInternalDB
With the above in mind, I took a look at your account and I see it has the Data Pipelines package. With the package, it has a People Pipeline which exports an “Identity Mapping Table” to see and query identity clusters from a Mixpanel Project: https://docs.mixpanel.com/docs/data-pipelines/schematized-export-pipeline#user-identity-resolution My recommendation is to create a Schematized People Pipeline export to one of your data warehouses, and you can then use the identity mapping table going forward to find the clusters.
ah that makes a lot of sense, the api endpoint is likely what they use on the frontend to display those ids in the user profile, which is why it only works one at a time and has strict limits on it
I suppose you could also write a script that calls the users one by one and does exponential backoff when the limit is reached, and then you just run it for however long it takes
Bummer, yeah. It's definitely going to be a long road to finishing it
60 queries per hour comes to 100 hours for 6000 users, so like 5 days? it's not crazy, especially if you start it on a Friday and let it run through the weekend
iirc, it's a little over 4200, so it's even a little better than that. I'll see what my guy says. Appreciate your insight!