create a url on an email template that will contain id={{Contact.id}}

Unfortunately {{contact.id}} isn’t available as a HubSpot personalization token, but you can use {{contact.email}} as a unique identifier.

- see How to distribute multiple unique links with one email?