Affiliate Marketing
Forum Search


Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 26-06-08
Registered User
 
Join Date: Jun 2007
Posts: 220
Thanks: 8
Thanked 3 Times in 2 Posts
ChristopherB is an unknown quantity at this point
  How to track link clicks in my database?

Hey,

I have a database setup with various products, i would like to create a section called most visited / most popular products listing 10-12 of the most popular products that have been clicked through from my website.

I was wondering if anyone knew a way to do this? every time a link is clicked it adds +1 to say a field in my products tabled called visited

then i can just select all from products order by visited ASC LIMIT 10 sort of thing...

Sorry im using php and mysql, forgot to mention
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 26-06-08
D-Mac's Avatar
Registered User
 
Join Date: Mar 2004
Location: Surrey
Posts: 1,044
Thanks: 10
Thanked 10 Times in 7 Posts
D-Mac is an unknown quantity at this point
  Re: How to track link clicks in my database?

Follow this tutorial to get the exit clicks bit working:
External Link Hit Counter » tutorialtastic.co.uk

Then do what you said, and ..ORDER BY hitsout DESC..
MySQL Tutorial - Order By
__________________
David Macfarlane
PHP Programming Service for Affiliates | Friendly VAT Calculator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26-06-08
Registered User
 
Join Date: Nov 2003
Location: Birmingham
Posts: 486
Thanks: 0
Thanked 7 Times in 6 Posts
aotagain is an unknown quantity at this point
  Re: How to track link clicks in my database?

Plus if you don't want to run the hits query every time the page loads, you could cache the query say weekly, or update regularly some sort of results summary in another table from which you read the output to the webpage.

Having another table to which the hit query results are written will allow you to get clever later on if you feel like it by running different summaries and would allow you to get time-related information about your clicks, not just the totals. ie. you''ll have a set of results, each with a date, so you can record how they change over time.

If you can't do scheduling on the server, you could put a 'last updated' date into the summary table and test the date vs. today's date on a popular web page. When the date difference hits your chosen recording period, run any hits queries you like and record them with today's date.

Its a bit more advanced and perhaps something for later (especially date comparison) but I thought worth mentioning because after 6 months of doing what you are planning to do, we suddenly realised it would have been useful to record progress over time as well as accumulating and showing the totals each time the webpages loaded.

We now have a complex file which runs regularly on demand from a main website page, depending on the date and records all sorts of stuff from the various product tables into another separate results table.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How not to ask a high PR site for a link! pericom The Affiliate Marketing Lounge 13 12-09-08 11:56 AM
How can I track outgoing non affiliate clicks kylah16 Accessibility, Usability & Web Analytics 2 12-04-08 12:52 PM
£20 Discount Code + New Wii Bundles In + Top Pre-Pay Mobile Deals At The Link James@AW Affiliate Window 0 24-01-08 04:34 PM
Link Exchange Ethical Dilemma bulbo Search Engine Strategies 12 14-06-05 03:56 PM
clicks not turning into sales Luke Affiliate Future 7 15-04-05 09:36 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7