hey guys. Gettin pretty into my article marketing now, does anyone know of a program or code I can put on my website to track which article makes a sale? Thanks in advance! Owen.
Easy. Here's a quick, semi-ghetto way. The link in your resource box should look something like this: http://www.yourdomain.com/?id=4323243 ... then on the yourdomain.com page you'll have some PHP GET code like this: <?php $track = $_GET["id"]; ?> PHP: ... and then all of the hoplinks on your page (yourdomain.com) will look like this: <a href="http://yourname.hop.clickbank.net/?TID=<?php echo $track; ?>">ANCHOR TEXT</a> PHP: Use a different ID for each article... i.e. http://www.yourdomain.com/?id=34234, http://www.yourdomain.com/?id=asd34234... etc. Make a spreadsheet (or database) that shows you which article corresponds to which ID (i.e. ID in one column, article title/link in another column). Every time you make a sale look at the TID, find the TID in the "ID" column of your spreadsheet (or database) and you'll find out which article made the sale. Done. You could add some if statements and only echo the TID part of the link if an ID exists in the URL, etc. but I've gotta head out so I don't have the time right now... but the above will work either way.
Here's a better version: First make sure your page file extension is PHP. Then put this at the top of your page... <?php $id = $_GET["id"]; function trackit(){ global $id; if(isset($id)){ echo "?TID=$id"; } else { echo ""; } } ?> PHP: ... and make hop links look like this: <a href="http://yourname.hop.clickbank.net/<?php trackit(); ?>">ANCHOR TEXT</a> PHP: ... then make sure all links to your website that you want to track have an ID appended to the end of the path (i.e. ?id=1234, so http://www.yourdomain.com/?id=1234 or http://www.yourdomain.com/landingpage.php?id=1234, etc.). ... this works for tracking sales from articles, keywords in PPC campaigns, etc.
track it and cloack it the out.php file use this for outlinks out.php?id=1 <?php session_start(); $lnk[1]="http://xxxxxxxxxxxxxxxxxxx.hop.clickbank.net/"; $lnk[2]="http://xxxxxxxxxxxxxxxxxxx.hop.clickbank.net/"; $lnk[3]="http://xxxxxxxxxxxxxxxxxxx.hop.clickbank.net/"; $lnk[4]="http://xxxxxxxxxxxxxxxxxxx.hop.clickbank.net/"; $lnk[5]="http://xxxxxxxxxxxxxxxxxxx.hop.clickbank.net/"; $r=""; if (isset($_SESSION['eza'])) { $r="?tid=" . "eza" . $_SESSION['eza']; } if (is_numeric($_GET['id'])) { header ('Location: ' . $lnk[$_GET['id']] . $r); } exit; ?> PHP: use <?php include("trck.php") ?> at the page you want to track and the referall will be stored throughout the entire visit inside a cookie trck.php <?php session_start(); $ref=""; if (isset($_SERVER['HTTP_REFERER'])) { $ref = $_SERVER['HTTP_REFERER']; } if ($ref=="") { }else { $arr=(parse_url($ref)); if (isset($arr['query'])) { $r=$arr['query']; $s=""; parse_str($r,$s); if (isset($s['id'])) { $_SESSION['eza']=$s['id']; } } } ?> PHP: