We're building a drupal website that integrates with Marketo via webforms.

Whenever a visitor submits a webform, they get a _mkto_trk cookie that looks similar to the one in the api documentation ( <numbers-letters-numbers>&token:_mch-<domain>-<number>-<number> ) but when they visit a subdomain, or refresh the page, or visit a different page, they get a different value for the same cookie : <our_marketo_user_id>&token:_mch-<domain>-<number>-<number>

Is this behaviour intended ? If so, how can i link the two cookies to one lead ? If not, any idea what's causing this issue ?

Basically, if your website is www.company.com, Marketo will set the cookie domain to be ".company.com" so that all subdomains should be able to read the same cookie. For example, if you go to blog.company.com, it will be using the same cookie

If your root domain name is different ... for example anothercompany.com, a new munchkin will be generated.