WEB is this the correct code for a cloaked link redirect?

Discussion in 'OT Technology' started by Falconer, Feb 28, 2009.

  1. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Your "buy" button takes you to www.yourdomain.com/productname.html, and productname.html contains this:
    Code:
    <html>
    [COLOR=#000080]<head>[/COLOR]
    [COLOR=#000080]<title>[/COLOR]YOUR PAGE TITLE[COLOR=#000080]</title>[/COLOR]
    
    [COLOR=#000080]<ANY CODE THAT NEEDS TO BE EXECUTED BEFORE REDIRERECT. GOOGLE ANALYICS OR ANOTHER TRACKER>[/COLOR]
    
    [COLOR=#000080]<meta http-equiv="REFRESH" content=[COLOR=#0000ff]"0;url=http://your-clickbank-link-goes-here"[/COLOR]>[/COLOR]
    
    [COLOR=#000080]</head>[/COLOR]
    [COLOR=#000080]</html>[/COLOR]
     
  2. JesterFX

    JesterFX New Member

    Joined:
    Oct 10, 2004
    Messages:
    4,557
    Likes Received:
    0
    Or you can even just use php and make even more "built in". Then just put it in a file called index.php and you can put it in it's own directory www.yourdomain.com/productname/ and it directs them there.

    Code:
    <?php
      header("Location: http://affilaitelink.com");
    ?> 
     
  3. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Let me make sure I understand that.

    So in www.mydomain.com/productname/ there is a file called "index.php" which contains the code you listed above?

    Can I put google analytics in there, too? i'll want to keep track of how many clicks it gets.
     
  4. JesterFX

    JesterFX New Member

    Joined:
    Oct 10, 2004
    Messages:
    4,557
    Likes Received:
    0
    Yep, that's pretty much the idea of it. Of course you have to edit it with your affiliate link in there thought that is probably obvious.

    As for analytics, really since you are still building your foundation you should start the right way and use real affiliate tracking such as tracking202/prosper202. Might as well train yourself to do it from the start ;). Google analytics is good for some of it but you want to be able to do keyword tracking and such too.
     
  5. hank85

    hank85 sudo shred /dev/sda -f -v -z --iterations=6

    Joined:
    Jul 23, 2008
    Messages:
    4,360
    Likes Received:
    0
    That code won't work for analytics. A php header redirect needs to be done before anything is actually outputted to the user.

    You could code up your own click tracking stuff but that's just a pain in the ass.

    The code you posted isn't realy a cloaking method, it's just a way of redirecting your traffic to your affiliate link. Just makes it for Joe Blow to see where he's going a little difficult, your average user won't go into your code.

    Use the code they provided if you want to track with analytics.
     
  6. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    what are those?
     
  7. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    ok I got my links set up using .htaccess redirect (I had to look through 4 sites before I found one that explained it in a way I could actually understand, lol).

    So now the URL that appears when you mouseover the link looks like it's part of my site, but clicking on it takes you to the affiliate's site.

    Is there a way to prevent your affiliate ID from appearing in the URL window of the affiliate's site? Altho I guess by that point the cookie is already on the user's computer, right?

    In other words, when they click my link, it looks like they're going to: www.mydomain.com/productname

    but they actually get taken to: www.affiliatesite.com/whatever.php?hop=myaffiliateid

    There's no way to actually hide my ID from that URL, right?
     

Share This Page