How do you track traffic out? Traffic Trading Help

Discussion in 'HTML & Website Design' started by 5867dude, Oct 11, 2009.

  1. #1
    Hi,
    I want to kick-start my new arcade, splatzgames.co.uk (i am redesigning it right now!) and notice a lot of arcades now have a pre game page that when you click on the thumbnail it takes you to another site. (a good example is gamehopper.net)

    I want to know how you can track the traffic that leaves Site A to go to Site B so I know how much traffic Site B should send me back. :D
     
    5867dude, Oct 11, 2009 IP
  2. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #2
    Instead of Site A goes to Site B, use this:
    Site A goes to redirection page
    Redirection page go to Site B

    You control the redirection page. At least, you know where your visitor wanted to go. As far as I know, you can't tell for sure if he arrived or not at destination.
     
    ForumJoiner, Oct 11, 2009 IP
  3. 5867dude

    5867dude Peon

    Messages:
    266
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How can I track the traffic of the redirection page?
     
    5867dude, Oct 11, 2009 IP
  4. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #4
    Let's say the redirection page is called redirect.php. You can use the following code, which will write in the file log.txt the number of visitors
    <?php
    	
    	// We log the number of visitors
    	$handle = fopen ('log.txt', "a");
    	fwrite ($handle, "New visitor\r\n");
    	fclose ($handle);
    
    	// We redirect
    	header ('Location: http://www.destinationsite.com/new_page.html');
    ?>
    
    Code (markup):
    If you want more details, you can insert the Google Analitycs' code on that page, instead of the log.
     
    ForumJoiner, Oct 12, 2009 IP
    5867dude likes this.
  5. 5867dude

    5867dude Peon

    Messages:
    266
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks that works! Really Appreciate it! :D
     
    5867dude, Oct 12, 2009 IP
  6. dcristo

    dcristo Illustrious Member

    Messages:
    19,796
    Likes Received:
    1,201
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    5
    #6
    Is it a wordpress blog? If so, you can install this plugin to track outbound clicks.

    If its not a wordpress blog, you can tag outbound links with the javascript onclick function.
     
    dcristo, Oct 12, 2009 IP
    5867dude likes this.