By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,318 Members | 554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,318 IT Pros & Developers. It's quick & easy.

Record external links hits to database

100+
P: 229
Hi, Can anyone point me in the direction of some asp code to record the hits to all my internal links, not my site. I have 50 external links on one page and would like to know which of the these are being visited.

Thanks in advance
Richard
Nov 9 '07 #1
Share this Question
Share on Google+
6 Replies

100+
P: 229
Hi, Sorry I realise that by mistake this is in the wrong category. sorry I forgot to add.

I need the results to update my database. So record the number of hits to my database.
Thanks
Richard
Nov 9 '07 #2

100+
P: 229
Hi, I have 50 external links on one page and would like to know which of the these are being visited an how often. This info I need to be sent to my database. I then need the results in the database field to correspond with the links to which they relate. Dont know if this is possible.

Thanks in advance
Richard

I am sorry to repeat this question as I accidently put it in the article section and could find no way to remove it.
Nov 10 '07 #3

100+
P: 229
Hi, I have 50 external links on one page and would like to know which of the these are being visited an how often. This info I need to be sent to my database. I then need the results in the database field to correspond with the links to which they relate. Dont know if this is possible.

Thanks in advance
Richard

I am very sorry to repeat this question as I accidently put it twice in the article section and much as I tried could not find no way to remove it. Sorry for the mistake!
Nov 10 '07 #4

markrawlingson
Expert 100+
P: 346
This would be pretty tricky because you need to record the information after the user hits the link - but you really don't have much time to do that because once the user hits the link - the page is gone and any processes running on that page are terminated. You could use AJAX but I doubt it would work properly.

I'd say probably the best thing to try would be to have a framed page where the links are sent to, just a small bar at the top which would hold the code to record the link to your database, and the main frame would load the actual external link. You could even reload the page without the frame once the external link has been visited.

Sincerely,
Mark
Nov 11 '07 #5

bartonc
Expert 5K+
P: 6,596
I am sorry to repeat this question as I accidently put it in the article section and could find no way to remove it.
Done .
Nov 11 '07 #6

100+
P: 229
Hi, In the interests of information exchange, It has been suggested to me elsewhere that a possible solution would be to direct the links to another page on my site, from where they are redirected with javascript to the actual site. That way the hits to that page could be counted.
I am goin to try that
Thanks
Richard
Nov 12 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.