Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Need help for visitor counterNeed help for visitor counter
Previous
 
Next
New Post
7/12/2007 1:39 AM
 

I've a unique requirement, for which all my trials have failed on the backend. Please let me know if you can suggest something.

I want to track the number of times EACH user visits and store it somewhere as I have to take some specific action based on it. The project_sitelog table in the database must supposedly have that kind of informaiotn from which I can find out the info I need. I did a simple select query in a reports module and calculated the number of times a user had to use the url '%login%' or '%register%', as far as i know it worked initially, but the problem is because of some sort of caching the counter doesn;t get updated at times for 10-15 min after the user has logged out.

 

Then I tried using Transact-SQL triggers on aspnet_users table and tried incrementing a counter for everytime the lastactivity date for that user changed, but I cannot make it work because there is no row level trigger I can use, all rows get updated, I have a fair amount of knowledge in SQL, dont' know if I'm missing somehting obvious. Not too confident of modifying the login.ascx.vb files under the portal.

 

Please help. Again, my requirement is that I want to calculate the 'visits' counter for each user and store it in a table in the database.

 
New Post
7/12/2007 3:11 PM
 

 

figured it out!!

CREATE TRIGGER [triggerName] ON [dbo].[aspnet_Users]
AFTER UPDATE
AS
IF update(lastactivitydate)
Begin
insert into user_table1 (username) select username from deleted
End

 

user_table1 will have other columns as may be necessary, a simple count of username will give the number of times a user has logged in....

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Need help for visitor counterNeed help for visitor counter


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out