Usually they don't, they just need to fire an event with the analytics properties from the link and whatever persistent identities are available on the client side (device ID, fingerprint etc.), and then keep firing new events with at least one of those identities. The link URL or query string will have the user's canonical identities in it already.
When IDs don't persist across domains or subdomains there are also plenty of methods that don't involve passing via URL or tripping reasonable network security, and that work for >99% of user clients.