HostNode.com :: HostSeeker's Talk
Home Register FAQ Members List Calendar Mark Forums Read
Go Back   HostNode.com :: HostSeeker's Talk > Design Talk > Programming Pool > Tracking paid for links, best methods?
Reply
 
LinkBack Thread Tools Rate Thread Display Modes
(#1 (permalink))
Old
ramprage ramprage is offline
Confirmed User
ramprage is on a distinguished road
 
Posts: 57
Join Date: Feb 2004
Location: Toronto, Canada
Talking Tracking paid for links, best methods? - 06-07-2004, 05:35 PM

What are some of the best methods to track paid links to your website instead of just looking at your visitor logs? Is there some kind of link tracking program where you can setup a link for each partner so you can track the click throughs?

eg: mysite.com?ref=siteA

I know I could write a simple script to do this but I was hoping someone was using something they could recommend?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
(#2 (permalink))
Old
AlienSD AlienSD is offline
Registered User
AlienSD is on a distinguished road
 
Posts: 1
Join Date: Sep 2004
Location: San Diego, CA
09-19-2004, 10:49 AM

Quote:
Originally Posted by ramprage
What are some of the best methods to track paid links to your website instead of just looking at your visitor logs? Is there some kind of link tracking program where you can setup a link for each partner so you can track the click throughs?

eg: mysite.com?ref=siteA

I know I could write a simple script to do this but I was hoping someone was using something they could recommend?
There are different methods of doing it. The easiest one is to do via database. I'll be showing you how to do it using MySQL and PHP.

Code:
//Create table in mysql, assuming that you already have a database setup

create table referrals(
id int(2) not null auto_increment,
name varchar(100) not null,
hits int(10) not null,
);
// Then for each of your referrals, you add then into the database.
insert into referrals values(NULL,'Site A','0');
To process the request and you do:

PHP Code:
<? // page.php

mysql_connect("$db_host","$db_user","$db_pass") or die("Sorry, we couldnt connect to the database.");
mysql_select_db("$db_db") or die("Sorry, we couldnt select the database.");

$q mysql_query("SELECT * FROM referrals WHERE name='$ref'");
if(
mysql_num_rows($q)) {
  
mysql_query("UPDATE referrals SET hits=hits+1 WHERE name='$ref'");
} else { print 
"ERROR: Wrong Referral Site!"; }

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Linux and Windows Hosting Helen Shared Webhosting Special Offers 0 05-12-2004 04:26 PM
Great Deal from Hostony: More disk space, more bandwidth at the SAME PRICE! Helen Shared Webhosting Special Offers 0 05-10-2004 04:30 PM
More disk space, more bandwidth at the SAME PRICE! Helen Shared Webhosting Special Offers 0 05-04-2004 02:54 PM
Subject: Windows 2003 Feature Reach Hosting Plans Helen Shared Webhosting Special Offers 0 04-26-2004 07:29 PM
Windows 2003 Feature Reach Hosting Plans!!! Helen Shared Webhosting Special Offers 0 04-05-2004 04:37 PM


All times are GMT +2. The time now is 09:13 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0
vB.Sponsors
© 2003 - 2007 HostSeeker.com - All rights reserved