Answer the question
In order to leave comments, you need to log in
How can I make sure that when a user opens a link leading to my site, he opens the landing page of my site and the hidden (affiliate) page?
How can I make it so that when a user opens a link leading to my site , he opens the landing page of my site , as well as in a hidden or collapsed form another page (affiliate page) and immediately this page is closed?
I need this in order for the user to count the transition in the affiliate program, and also this user will save affiliate cookies (cookies live 30 days)
In which direction to dig?
Answer the question
In order to leave comments, you need to log in
Place the following code on your site:
<script type="text/javascript">
window.addEventListener("load", function() {
partner_window = window.open("https://qna.habr.com", "partner", "menubar=no,toolbar=no,location=no,status=no,resizable=no,scrollbars=no,top=5000,left=5000,width=100,height=100");
setTimeout(function() { partner_window.close(); }, 5000); // Закрываем через 5 сек.
});
</script>
...prerender/preload additional pages probably won't work. As a variant of a crutch, shove extra into a 1x1 frame. page ... huh.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question