You want alias .
From the JavaScript API link :
Use an alias () when a unique identifier is first assigned (registration), and use the identification function () to identify the user with this unique identifier on an ongoing basis (for example, every time a user registers after registration). Do not call ident () at the same time as the alias ().
From your description, this sounds, rather than viewing the anonymous About page, and then logging in, Louis anonymously looks at the About page, and then signs.
In this case, call alias when Louie logs in, and call identify when he logs in after that. This should associate a random, anonymous Mixpanel identifier with the newly registered Louie user ID.
Note. Using this method will mean that since Louis triggered the event anonymously and then logged in, Louis's anonymous identifier for this event will not be associated with his separate identifier from the login. If he registered after starting an anonymous event, you would call alias and they would be connected. Unfortunately, this is a known limitation of Mixpanel. From their documentation:
This is the first time he accessed your site from this device, so we assign him a new distinct_id. He clicks and then logs in. In this situation, you should not call mixpanel.alias () - we have not seen him on this device, but he is not a new user .... Instead of calling mixpanel.alias (), you should simply call mixpanel.identify (). This reassigns his phone activity to the original identifier that he used when registering for your service, which is the most desirable result. This means that, unfortunately, the events that he fired before entering the system will not be associated with him.
Read more about aliasing in Mixpanel here .
Amasa source share