Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Insert Value to ClickTrack Table

Quote Reply
Insert Value to ClickTrack Table
Hi-

I have been trying to figure out a way to modify Jump.pm so that it adds a few new items to the ClickTrack table. I have added the columns: LinkOwner and the Full_Category_Name to the ClickTrack table, and would like to include this information from the Link that is being clicked. I have been trying things with the code from Jump.pm, with no luck:

-------------------------

my $click_db = $DB->table ('ClickTrack');

my $rows = $click_db->count ( { LinkID => $id, IP => $ip, ClickType => 'Hits'} );

if (! $rows) {

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

$click_db->insert ( { LinkID => $id, IP => $ip, ClickType => 'Hits', Created => \"NOW()"} );

-------------------------------

Does anyone know how this could be modified to add the LinkOwner and Full Category Name ( in addition to the IP, Creation Date, etc.) for the link being clicked on?

Any help would be much appreciated Smile

-FrankM
Quote Reply
Re: [FrankM] Insert Value to ClickTrack Table In reply to
What is it giving you? Syntax Error's?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Insert Value to ClickTrack Table In reply to
Thanks very much for your reply. Actually, the code above works fine, I just can't seem to add the additional parameters to get it to insert the LinkOwner and the Full Category name into the ClickTrack table.

--FrankM
Quote Reply
Re: [FrankM] Insert Value to ClickTrack Table In reply to
I would imagine your best bet would be to pass it along in Jump.cgi, (i.e Jump.cgi?ID=<%ID%>&title=<%title%>), and then use something like $IN->param('title') to grab it in Jump.pm. You could do a similar thing with the owner I would imagine.

Hope that helps.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Insert Value to ClickTrack Table In reply to
Thanks, I was hoping, though, that the field for the LinkOwner could be used within Jump.pm, and also that somehow the link's full Category Name could also be gotten within Jump.pm. For the LinkOwner, I tried:

$click_db->insert ( { LinkID => $id, IP => $ip, ClickType => 'Hits', LinkOwner => $username, Created => \"NOW()"} );

But that didn't work. I think I must be using the wrong parameter where I specify $username.

--FrankM
Quote Reply
Re: [FrankM] Insert Value to ClickTrack Table In reply to
I'm not sure if it is available. You could always connect to links_Links and grab the link owner Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Insert Value to ClickTrack Table In reply to
Thanks, I've been trying without any success. Does anyone know if it's possible to get a field from the Links table for the specific link and then have it inserted into the ClickTrack table?

--FrankM
Quote Reply
Re: [FrankM] Insert Value to ClickTrack Table In reply to
In oder to insert additional field in the ClickTrack database, you need to edit the ClickTrack.def file located /def.

Good luck :)