How to open affiliate link in new tab automatically?

by TODU
8 replies
hello, on my WordPress blog I want add option:
when somebody will to visit on my site, I want that my ClickBank affiliate link opening in new tab momentally (or after several seconds) how to make this?


antiviruses or browsers will add my site in black list after this?
#affiliate #automatically #link #open #tab
  • Profile picture of the author nodesolomon
    To open a new tab, if your using HTML

    Code:
    <a href="http://yourlink.com" target="_blank">Click Here so i make money :) </a>
    just add the target attribute to the a HTML element.

    - in modern browsers. this will open a new tab
    - in older browsers, it will open a new window(i dnt think you have to worry about this, just saying)

    hope that helps!!!

    regards

    EDIT: oh sorry i just read your thread again, you want the link to open in a new tab after a couple of seconds, you could use jquery(javascript)

    html :
    Code:
    <a  id="afflink" href="#">Click me so i can make money</a>
    Javascript:

    Code:
    $("#afflink").click(function() {
           setTimeout(function() {
                window.open(
                   'https://yourlink.com',   '_blank' 
            );
         
          }, 2000); // 2000 for 2 seconds, 1000 for 1 second etc
    });
    hope thats helps, sorry i misunderstand your question
    Signature

    read my collection of Famous Quotes
    Free Online Movies

    {{ DiscussionBoard.errors[7775193].message }}
    • Profile picture of the author TODU
      Originally Posted by nodesolomon View Post

      To open a new tab, if your using HTML

      Code:
      <a href="http://yourlink.com" target="_blank">Click Here so i make money :) </a>
      just add the target attribute to the a HTML element.

      - in modern browsers. this will open a new tab
      - in older browsers, it will open a new window(i dnt think you have to worry about this, just saying)

      hope that helps!!!

      regards

      EDIT: oh sorry i just read your thread again, you want the link to open in a new tab after a couple of seconds, you could use jquery(javascript)

      html :
      Code:
      <a  id="afflink" href="#">Click me so i can make money</a>
      Javascript:

      Code:
      $("#afflink").click(function() {
             setTimeout(function() {
                  window.open(
                     'https://support.wwf.org.uk/earth_hour/index.php?type=individual',
                 '_blank' 
              );
           
            }, 2000); // 2000 for 2 seconds, 1000 for 1 second etc
      });
      hope thats helps, sorry i misunderstand your question
      Thanks for reply, you don't understand me. I want that it open automatically, without request by visitor.
      {{ DiscussionBoard.errors[7775251].message }}
      • Profile picture of the author nodesolomon
        Originally Posted by TODU View Post

        Thanks for reply, you don't understand me. I want that it open automatically, without request by visitor.
        Code:
        $(document).ready(function() {
            setTimeout(function() {
                    window.open(
                       'https://support.wwf.org.uk/earth_hour/index.php?type=individual',
                   '_blank' 
                );
             
              }, 2000);
        });
        this will open the page after the web page fully loads, without the users click
        Signature

        read my collection of Famous Quotes
        Free Online Movies

        {{ DiscussionBoard.errors[7775265].message }}
  • Profile picture of the author Michael71
    This jQuery function mentioned above opens afer 2 seconds... no interaction needed.
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7775266].message }}
  • Profile picture of the author SteveSRS
    I would like to mention opening affiliate link automatically like this is kinda unethical and might even get you kicked off affiliate networks.
    {{ DiscussionBoard.errors[7775493].message }}
  • Profile picture of the author cmcguinness
    Definitely it will get stopped by pop-up blockers.
    {{ DiscussionBoard.errors[7775529].message }}
    • Profile picture of the author lamthanhphong
      Originally Posted by cmcguinness View Post

      Definitely it will get stopped by pop-up blockers.
      Completely agree.
      {{ DiscussionBoard.errors[10447821].message }}
  • Profile picture of the author zozoreview
    I think you should use Wordpress.
    if you use website create with PHP
    <a href="link" rel="nofollow" target="_blank">Product Name</a>
    {{ DiscussionBoard.errors[10546093].message }}

Trending Topics