M
M
Michael Compass2020-06-25 21:49:06
HTML
Michael Compass, 2020-06-25 21:49:06

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

2 answer(s)
N
Nadim Zakirov, 2020-06-25
@mik777em

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>

It’s not for me to moralize you, but I vanguy that the search engines will quickly ban you if you decide to use it.

N
Nikita Shinkevich, 2020-06-25
@domres

...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 question

Ask a Question

731 491 924 answers to any question