Loading webpage in background without iframe

A little background on my question:

I’m trying to establish my affiliate link (and cookie) in the background when someone visits one of my webpages to place an order (my order page has embeded products from the company I’m an affiliate of). The affiliate links work if I send someone to the company’s product page directly www.companyx. com/?aff=123 but I don’t want them to have to go the the company’s product page (I’d like them to stay on my page and place the order through my embedded products). However this limits my ability to track the individual orders in my affiliate account.

I’ve tried creating a very small iframe and loading the webpage (www.companyx. com/?aff=123) in it, but it’s not creating the local tracking cookie on customers computer like I need it to.

Is there an alternative way for me to load up that page/link that would allow the local cookie to be created? It could load on a single page or on all pages if one way is easier. My goal is for it to be transparent to the user. I’m was also curious if maybe there was a way to do this in the custom code section in the dashboard such that I would be able to set the code type to allow the user to choose cookie consent before it ran.

Thanks for the help!