How can I track which articles make sales?

Discussion in 'ClickBank' started by oworsnop, Feb 25, 2010.

  1. #1
    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.
     
    oworsnop, Feb 25, 2010 IP
  2. ParthS

    ParthS Peon

    Messages:
    422
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't.
     
    ParthS, Feb 25, 2010 IP
  3. onlinemoniez

    onlinemoniez Peon

    Messages:
    194
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes you can. A simple way is to redirect each article to a unique domain using TIDs.
     
    onlinemoniez, Feb 25, 2010 IP
  4. weirdcreativetype

    weirdcreativetype Peon

    Messages:
    50
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    weirdcreativetype, Feb 25, 2010 IP
  5. weirdcreativetype

    weirdcreativetype Peon

    Messages:
    50
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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. :)
     
    weirdcreativetype, Feb 25, 2010 IP
  6. dlm

    dlm Peon

    Messages:
    3,123
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Great advice as usual :rolleyes:
     
    dlm, Feb 25, 2010 IP
  7. EMO_Ralez

    EMO_Ralez Peon

    Messages:
    386
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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:
     
    EMO_Ralez, Feb 25, 2010 IP
  8. waxman1000

    waxman1000 Peon

    Messages:
    1,365
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You can do the above, or you can simply install a statcounter code on your site and you are done.
     
    waxman1000, Feb 25, 2010 IP
  9. Mike Tidball

    Mike Tidball Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Waxman1000.. the code is way above me so I like the simple solutions. Do you recommend one
     
    Mike Tidball, Feb 25, 2010 IP
  10. lqbk

    lqbk Peon

    Messages:
    216
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    good tutorial!
     
    lqbk, Feb 25, 2010 IP
  11. oworsnop

    oworsnop Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks Weirdcreativetype and EMO_Ralez.

    Really helpful tutorials, much appreciated.
     
    oworsnop, Feb 26, 2010 IP