Can I redirect one of my affiliate's links?

4 replies
I have a product on clickbank and I want to set up a private sales page for one of my affiliates?

This affiliate wants something specifically for his list and I would like to send his list to a page (other than my homepage) where his affiliate link will be tracked (and where I'm selling my main product I sell at my homepage).

Clickbank says to do this:

"If you choose to, you can set things up on your end to allow affiliates to append parameters to their HopLinks so that their HopLink will be directed to a specific landing page. You would set up your system to grab the parameter and then use a server-side redirect to lead the visitor to the corresponding product page. Please keep in mind that this set up is entirely up to you and does not involve ClickBank. If you are not familiar with this set up please contact a web designer to aid you with the process.?"


...well do you guys know how to do this?

Thanks!
#affiliate #links #redirect
  • Profile picture of the author sitemarketer
    Hi.

    The hoplink sends people to your landing page and passes any extra variables you attach, so if your hoplink is:

    http://myhoplink.com/

    You can give that affiliate a modified hoplink like:

    http://myhoplink.com/?go=1

    And then on your page, you need to stick a little bit of PHP code that looks for that variable "go" and if it is equal to "1", you redirect to the second page.

    For example, you could put this PHP code at the top of your landing page:

    <?PHP
    if ($_GET["go"] == "1")
    {
    header( 'Location: http://www.yoursite.com/special_page.html' ) ;
    }
    ?>

    I'm in a rush, so I didn't check my syntax, but that should be close.

    John
    {{ DiscussionBoard.errors[4636120].message }}
    • Profile picture of the author TheWebGuy
      Thanks for the help! I definitely appreciate it.

      I'm having a little trouble with this though. If you have time, could you tell me where I'd put this php code (also I use wordpress for this site)...

      Thanks again
      {{ DiscussionBoard.errors[4637763].message }}
  • Profile picture of the author Kurt Chrisler
    I use a script for this called Easy Click Mate. Works pretty slick and doesn't require coding, other than installing the software.
    {{ DiscussionBoard.errors[4637997].message }}
  • Profile picture of the author sitemarketer
    To be honest, I'm not really up on the correct way to do this in Wordpress if you choose the PHP route I described. I'm pretty old school and haven't dug into the more recent versions of Wordpress.

    I think it should work if you put the code as the very first thing in your index.php file. However, if you are just sending them to another page in your Wordpress blog, then the PHP page will run again on that page, and you will get in an endless loop, continually reloading the page.

    To fix that, you will need to put an additional check in the PHP code to make sure it doesn't redirect when someone lands on the special page for that affiliate, because they are already there and don't need to be redirected anymore.

    The name of the current page is stored in the PHP variable, $_SERVER['PHP_SELF']. For example, on your page, http://yoursite.com?page_id=191, the $_SERVER['PHP_SELF'] variable will contain "index.php?postid=191". I'm pretty sure that the $_SERVER['PHP_SELF'] variable will ignore permalinks, but I haven't tested any of this.

    So, the code would look something like this:

    <?PHP
    if ( ($_GET["go"] == "1") && ($_SERVER['PHP_SELF'] != "/index.php?page_id=191") )
    {
    header( 'Location: http://www.yoursite.com?pageid=191' ) ;
    }
    ?>

    You would change your page_id to the one for your page in both places. It may be much easier to use the script suggested by Kurt, but if you can make it work this way, it is free.

    Good luck,
    John.
    {{ DiscussionBoard.errors[4638636].message }}

Trending Topics