Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Modify Jump

Quote Reply
Modify Jump
Hi-

I would like to have a field in the Links database called "Total_Amount". This field would be incremented by the value in a field called "Rate" in the Links_Table whenever the link is clicked.

So, just like the Hits field is incremented by one each time a link is clicked, I would like to have the "Total_Amount" field incremented by the value of the field "Rate".

I tried to see how jump.cgi could be modified to do this but got lost. Does anyone know how/where this type of modification could be done? Thanks!

-jw


Quote Reply
Re: Modify Jump In reply to
Hi,

Just change where the Hits is updated:

$db->update ( { Hits => \"Hits + 1" }, { ID => $id }, { GT_SQL_SKIP_INDEX => 1 } );

to:

$db->update ( { Hits => \"Hits + 1", Total_Amount => \"Total_Amount + Rate" }, { ID => $id }, { GT_SQL_SKIP_INDEX => 1 } );

would do the trick. This is nested inside the IP check, so it would only be updated per unique ip.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Modify Jump In reply to
Fantastic. Thanks very much!

-jw

Quote Reply
Re: Modify Jump In reply to
Alex (or anyone who might know)...

How "strict" it is to increment the Hits counter only for unique IP addresses? In other words, am I missing hits if someone logs on using AOL (for example) and there are several AOL users sharing the same IP Address? I saw somewhere that an IP address is considered unique for 6 hours for the jump.cgi, and am concerned about people using large ISP's, or large organizations such as colleges and universities that might share IP addresses, and legitmate hits not getting recorded...

-jw

Quote Reply
Re: Modify Jump In reply to
If you move the code above up a couple of lines and outside the ip check, then it will count 'all' clicks on the url.

Not sure if this is what you want?

Cheers,
R.


Quote Reply
Re: Modify Jump In reply to
Thanks very much. I'll try that. Actually, I would like to keep the unique IP check in there as long as it isn't cutting off legit hits.

What I'm really not sure of is whether several users of a large ISP such as AOL, Earthlink, or a large university might actually share the same IP address and thus different users clicking on the same link don't get registered as Hits. If they do then that would be a problem, but if they don't then I would like to keep the unique ID check so that someone doesn't just keep clicking on a link and artificially register Hits...

Does anyone know about the sharing of IP addresses at large ISP's?

-jw

Quote Reply
Re: Modify Jump In reply to
I'm pretty sure they do share ip's. I remember reading somewhere that AOL spreads their users out over a range - check out this page for more info:

http://webmaster.info.aol.com/index.cfm?article=15&expand=0,500000000000004,500000000000024&sitenum=2&menuid=43

hope that helps,
Regan.

Quote Reply
Re: Modify Jump In reply to
Regan,

Thanks very much. That's very helpful. Thanks for pointing me to the article. I think I'm going to try a 24 hour period without the Unique IP check and then another 24 hour period with the Unique IP check and see if there is any appreciable difference in total Hits recorded for our directory. Thanks again.

-jw

Quote Reply
Re: Modify Jump In reply to
 
You've got a solution, but for anyone else, the detail_page.cgi plugin will add a field, I think "Hits" that will track both hits to the Detail page (detail_page.cgi) and actual jumps to the site (via jump.cgi)

I modified jump.cgi to do it all, but found two scripts work better at keeping the logic separated.



PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.