You can do it with a trick, not just with a redirect (and ReDJ).
First, let me spend two words on how redirect works...
Normally, when you call an url (e.g.
www.mydomain.com/partnerpage1) from your browser, the response from the server has a return code 200, followed by the content of the page.
When the server want to redirect your browser on a different page, it send you a return code 301 (or 307) followed by the new url. There is no page content at all.
What you can do at this point is, when your browser goes on the new url:
www.partnerpage.com/affiliate-id_05343....
then you can send the content of this new page, and inside you insert a popup code. That's all.
I hope it was clear.
Luigi