WE are linking to various external websites and we want to keep track of how many people click each link.
I guess I need a database (we have mssql), but I am having trouble getting my head around the logic required.
1. Is it best to log each time a link is clicked as a seperate row then use a count on the DB for certain entries such as url =
2. or is it best to create one row per link and increment a number each time it's clicked?
If I go for 1 I can put a new link on the website pointing to my file (links.asp?url= and not have to update the DB, but if I go for option 2 I would have to add the row to the DB before the link is made live.
What would you do folks?
I guess I need a database (we have mssql), but I am having trouble getting my head around the logic required.
1. Is it best to log each time a link is clicked as a seperate row then use a count on the DB for certain entries such as url =
2. or is it best to create one row per link and increment a number each time it's clicked?
If I go for 1 I can put a new link on the website pointing to my file (links.asp?url= and not have to update the DB, but if I go for option 2 I would have to add the row to the DB before the link is made live.
What would you do folks?