I have a site where the song link is on target=blank so they dont move off the site, i want to count the clicks on the page though, what is best thing to do with asp? active server pages is my code?
Set up a database with a table that has columns for a unique ID, the url and a click count.
Create a script in ASP that captures a query string parameter (id) then interrogates the database table, finds the matching id, increments the counter and redirects the user to the url.
In your pages change the links to the script's url with the appropriate parameter for that song and set the target to blank (or if you are working to XHTML standards use javascript) to open the url in a new window.
That's the method. As for how to implement it you will need to ask in the appropriate forums. But it's always good to sit down and work out a method first so you know what you need to do.
-- Tek-Tips Forums is Member Supported. Click Here to donate
<honk>*:O)</honk>
Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.