We have a webpart that shows the communities for which a user is a member. We have a request from management to change it to show the LAST 10 sites (communities/teamsites/projectsites) that the user has visited as a member.

Is there a way to do this on SP2013?


1 Answer 1


Yes, there are two parts you'll need to build.

Part 1: A way to track which sites a person visits. This may be a httpmodule, or some JS/ajax in your masterpage, or a control in your masterpage or a webpart that is on the landing page of every site, etc. Something that will record in a database somewhere the userid, site title, site url, and datetime of the visit.

Part 2: Write your webpart to query the database and display the results. You can query the DB to only display the TOP 10 distinct urls and order by the last visited date descending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.