Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Interesting issue/filling out forms
New Posts  All Forums:Forum Nav:

Interesting issue/filling out forms

post #1 of 4
Thread Starter 
I was recently approached by a company to fix an issue they have trusting a partner site. Website A refers customers to website B. Website B pays website A for revenue generated.
And now website A is raising it's eyebrows due to the traffic they are seeing does not match the check they get cut.

I looked into it. Website B only uses javascript for their submission form. What would be the best solution to have a copy of the information submitted from users that start at website A and click a link to website B?
Dorm heater
(14 items)
 
  
CPUMotherboardGraphicsRAM
pII 550 x3 lapped Gigabyte MA74GM-S2 MSI 7770 2x4gbG.SKILL Ripjaws 
Hard DriveCoolingOSCase
Caviar blue 640gb Cooler Master Rifle 120mm Windows 7 Professional NZXT Vulcan 
  hide details  
Reply
Dorm heater
(14 items)
 
  
CPUMotherboardGraphicsRAM
pII 550 x3 lapped Gigabyte MA74GM-S2 MSI 7770 2x4gbG.SKILL Ripjaws 
Hard DriveCoolingOSCase
Caviar blue 640gb Cooler Master Rifle 120mm Windows 7 Professional NZXT Vulcan 
  hide details  
Reply
post #2 of 4
Are you helping Website A? What kind of information do you wish to gather from these users?
The way I understand it, you want to know how many people click a link to get to Website B. In this case, I would add an onclick handler for each link using javascript, then when a link is clicked a function would execute whatever code you want.

E.g.

Quote:
<script type='text/javascript>
function clickedLink(link){
alert(link);
//ajax code to send link to a php script
window.location=link;
}
</script>
<body>
<a href="http://www.domain.com" onclick="clickedLink(this);return false;">Test</a>
If you are using Google Analytics, they have a similar solution here: http://www.google.com/support/analyt...y?answer=55527

Here is a thread at stackoverflow with a similar issue:
http://stackoverflow.com/questions/9...-in-javascript
CM HAF 932
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 P5Q-Pro Sapphire 4850 OCZ 2x2GB PC2-8500 
Hard DriveOptical DriveOSMonitor
2xWD 320GB Caviar Pioneer 215D Vista 64bit Samsung T200 
PowerCase
Enermax Infiniti 720W CM HAF 932 
  hide details  
Reply
CM HAF 932
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8400 P5Q-Pro Sapphire 4850 OCZ 2x2GB PC2-8500 
Hard DriveOptical DriveOSMonitor
2xWD 320GB Caviar Pioneer 215D Vista 64bit Samsung T200 
PowerCase
Enermax Infiniti 720W CM HAF 932 
  hide details  
Reply
post #3 of 4
+1 on a what darius said. Seems like the easiest route to see who is clicking to go to site B. On the other hand, wonder why you guys weren't doing that in the first place.
post #4 of 4
Or you could create a database and record via PHP the HTTP_REFERRER and IP ADDRESS

Code:
<?PHP

$referrer = $_SERVER['HTTP_REFERER'];
$ip = $_SERVER['REMOTE_ADDR'];

mysql_connect($host_name, $user_name, $password);
@mysql_select_db($database) or die('We are currently experiencing technical difficulties. Please try accessing again in one hour.'); //Error if it doesn't work
$query = "UPDATE referers SET refererID = '$referrer', ipAddress = '$ip', timestamp = CURDATE()";
mysql_query($query);

mysql_close();

?>
This would make a queriable database so you know when a person clicked to the site, where they came from, and their unique IP. You MAY have to include a privacy policy stating in it you collect unique identifying information from each user... yada yada yada to CYA.

Yes, the code is very crude, but it explains my idea. If you're interested in doing something like this I would be more than willing to refine the code and make it all pretty for you, PM me.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Interesting issue/filling out forms