You basically have two options, either using the Munchkin associateLead JS API function or using the Soap API syncLead function and passing in the cookie value along with the email address.
Documentation for both is available here:
http://developers.marketo.com/