Alias with integration to amplitude with python sdk

Using the python sdk analytics.alias seems to have no effect in amplitude.

For example I can do:


analytics.track("Alan", "Did a thing")

analytics.alias("Alan", "Bob")

At this point Amplitude still tells me "Alan" "Did a thing" and "Bob" is nowhere to be seen, whereas I would expect "Bob" to have replaced Alan.

If I then try:


analytics.track("Bob", "Did another thing")

Amplitude shows that "Alan" "Did a thing" and that "Bob" "Did another thing". But there is no relationship at all drawn between the two.

Am I misunderstanding something? Ultimately I want to make sure that I can take someone with an anonymous_id and give them a user_id without creating a new user.

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hey Alexander, Segment's Amplitude integration doesn't support the alias method; rather, users are connected - if you're tracking via the server - as long as you pass both the old id and new id into an identify event. Did you check out our Amplitude documentation on identifying users and assigning new ids? It seems to address your specific use case. :)


    Success Engineer, Segment

    Reply Upvote
  • Brennan What is the best practice for passing both the old and new id into an identify even in python? Can you give an example of what the call should look like?

    Reply Upvote