Affiliates and order form links on external websites


I have a Wordpress presentation website with some “Buy” buttons which redirect to some order forms in Infusionsoft.

I want to sign up an affiliate so I generated a link for him to my website (e.g. The result is that the link is transformed to my website url and appended an ?cookieUUID=xxxx

Because I did not know any better, I have written a custom JS which updates all “Buy” links to include that ?cookieUUID=xxxx

If I paste the order form link directly in the browser and append the query string by hand it works. If however I click on a button from my website, upon arrival in the order form page, Infusionsoft adds another &cookieUUID=yyyyy in addition to the one I set.

Does anyone know why and how to solve this?